Mathlib Phrasebook

5.1. First examples🔗

Mathlib has a theory of differential calculus. Given functions:

variable (f : ) (g : )

Mathlib has tools as follows:

  1. Differentiable f asks whether f is differentiable everywhere.

  2. x, HasDerivAt f (g x) x asks whether g is the derivative of f everywhere.

  3. deriv f is the derivative of f (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