A convex function of one variable is the integral of its derivative #
On an open interval where it is finite, a convex function is recovered from either of its one-sided
derivatives by integration, f y - f x = ∫ₓʸ f'₊(t) dt = ∫ₓʸ f'₋(t) dt.
Main results #
sub_eq_intervalIntegral_derivWithin_Ioi— the statement for a real-valued convex function on an open convex subset of the line. This is the theorem; the rest is translation.rightDeriv_eq_coe_derivWithin— at an interior point ofdom f, theEReal-valuedrightDerivis the coercion of Mathlib'sderivWithin f (Ioi t) t.sub_eq_intervalIntegral_rightDeriv,sub_eq_intervalIntegral_leftDeriv— both halves for anEReal-valuedf(Corollary 24.2.1 in [^1]).
Implementation notes #
The fundamental theorem of calculus applies unchanged: a convex function is continuous on the
interior of its domain, has a right derivative at every interior point, and that derivative is
nondecreasing, hence integrable on compacts. No a.e. differentiability is needed. rightDeriv f t
is an infimum of difference quotients where Mathlib's right derivative is a limit; the two agree at
interior points of dom f, which is why interiority rather than finiteness of f t is asked.
References #
[^1]: R. T. Rockafellar, Convex Analysis, Princeton University Press, 1970, §24.
The real-valued case #
A real-valued convex function on an open convex subset of the line is the integral of its right
derivative. S is asked to be open and convex rather than a non-empty open interval; in ℝ these
are the same.
The bridge to rightDeriv #
A difference quotient of f in the direction 1, taken between two points where f is
finite, is the coercion of Mathlib's slope. No order relation between the points is needed.
At an interior point of dom f, the EReal infimum of difference quotients rightDeriv f t
is the coercion of Mathlib's derivWithin f (Ioi t) t. Both are the infimum of the slopes
slope f t z over the z > t at which f is finite.
Right-derivative half: on the interior of its effective domain, a proper convex function on
the line is the integral of f'₊.
Left-derivative half. The two one-sided derivatives differ only on the jump set of f'₊,
which is countable and therefore null.