English
The slope of a function f on the interval [a,b] is the vector difference f(b) − f(a) scaled by the inverse of b − a.
Русский
Уклон функции f на промежутке [a,b] – векторная разность f(b) − f(a), домноженная на (b − a)^{-1}.
LaTeX
$$$\operatorname{slope}(f,a,b) = (b-a)^{-1} \cdot (f(b) -\!\!\!\!\!_v f(a))$$$
Lean4
/-- `slope f a b = (b - a)⁻¹ • (f b -ᵥ f a)` is the slope of a function `f` on the interval
`[a, b]`. Note that `slope f a a = 0`, not the derivative of `f` at `a`. -/
def slope (f : k → PE) (a b : k) : E :=
(b - a)⁻¹ • (f b -ᵥ f a)