One-sided derivatives of a convex function on the line #
On the line a convex function has a right derivative f'₊ and a left derivative f'₋ at every
point, with values in [-∞, +∞], and they carry all the first-order information:
∂f(x) = {x* ∈ ℝ | f'₋(x) ≤ x* ≤ f'₊(x)}. Both are nondecreasing, interlaced as
f'₊(z₁) ≤ f'₋(x) ≤ f'₊(x) ≤ f'₋(z₂) for z₁ < x < z₂, and both are real exactly on
int (dom f). When f is closed each is the one-sided limit of the other — f'₊(z) and f'₋(z)
both tend to f'₊(x) as z ↓ x, and to f'₋(x) as z ↑ x — so f'₊ is right-continuous, f'₋
is left-continuous, and either determines the other. Hence any nondecreasing φ with
f'₋ ≤ φ ≤ f'₊ determines ∂f, and so determines f up to a constant.
One dimension also collapses the two monotonicity notions of Subgradient/Monotone.lean into one.
A monotone relation on ℝ is exactly a set totally ordered by the coordinatewise order of ℝ × ℝ,
a non-decreasing curve, and any cycle through such a set may be rotated to start at its largest
pair, which dominates the cycle in both coordinates and may therefore be deleted without decreasing
the telescoping sum. So monotone and cyclically monotone agree on the line, and the maximal
monotone relations — the complete non-decreasing curves — are precisely the graphs of the
subdifferentials of the closed proper convex functions.
Main definitions #
rightDeriv f x,leftDeriv f x— the two one-sided derivatives, extended by+∞to the right ofdom fand by-∞to its left.cycleVal B L— the telescoping sum around a cycle presented as a single list of pairs, the form in which rotation invariance is expressible.
Main results #
mem_subgradient_iff_le_rightDeriv—∂f(x)is the interval[f'₋(x), f'₊(x)].iInf_rightDeriv_Ioi,iSup_leftDeriv_Iio,iInf_leftDeriv_Ioi,iSup_rightDeriv_Iioand theirTendstoforms — the four limit formulas, for a closed proper convexf.exists_eq_add_coe_of_le_le— two closed proper convex functions squeezed around a commonφdiffer by a constant.IsMonotoneRel.isCyclicallyMonotone— on the line the two monotonicity notions coincide.isMaximalMonotoneRel_iff_exists_closedProperConvexFn— the maximal monotone relations on the line are exactly the subdifferentials of closed proper convex functions (Theorem 24.3 in [^1]).
Implementation notes #
f'₊ is f'(x; 1) and f'₋ is -f'(x; -1), so the whole theory of dirDeriv is available and
nothing is redefined. Both are guarded: f'₊(x) is f'(x; 1) provided some point of dom f
lies to the right of x, and +∞ otherwise. The guard is needed because where f x = ⊤ every
difference quotient is ⊤ - ⊤ = ⊥, so the unguarded infimum would be -∞ on both sides of
dom f, and the two sides must be told apart. Where f is finite the guard is inert.
References #
[^1]: R. T. Rockafellar, Convex Analysis, Princeton University Press, 1970, §23 and §24.
The directional derivative at a point outside the effective domain #
Where f is +∞ every difference quotient is -∞, so the directional derivative is -∞ in
every direction. This is the value wanted to the left of dom f and the one
overrides to the right.
The right and left derivatives #
The right derivative of an extended-real-valued function on the line,
f'₊(x) = lim_{z ↓ x} (f z - f x) / (z - x),
with the convention that it is +∞ at every point lying to the right of dom f. Without that
override the difference quotients would all be -∞ there, which is the value belonging to the
points on the left.
Equations
- Tdaf.ConvexAnalysis.rightDeriv f x = ⨅ (_ : ∃ (z : ℝ), x < z ∧ f z < ⊤), Tdaf.ConvexAnalysis.dirDeriv f x 1
Instances For
The left derivative
f'₋(x) = lim_{z ↑ x} (f z - f x) / (z - x),
-∞ at every point lying to the left of dom f. It is -f'(x; -1) because the increment
z - x is negative.
Equations
- Tdaf.ConvexAnalysis.leftDeriv f x = ⨆ (_ : ∃ z < x, f z < ⊤), -Tdaf.ConvexAnalysis.dirDeriv f x (-1)
Instances For
Monotonicity #
The step from one point to the next: f'₊(y) ≤ f'₋(z) whenever y < z. Together with
f'₋ ≤ f'₊ this is the chain f'₊(z₁) ≤ f'₋(x) ≤ f'₊(x) ≤ f'₋(z₂) for z₁ < x < z₂, and it makes
both functions nondecreasing. Convexity is not needed: dirDeriv is an infimum of difference
quotients rather than a limit of them, so the two quotients across [y, z] bound it from above
whatever f is. Only f'₋ ≤ f'₊ at a single point uses convexity.
f'₊ is nondecreasing on the whole line.
Finiteness #
Both one-sided derivatives are finite exactly on the interior of dom f. The two halves
are usually stated separately, as f'₊ < +∞ to the left of the right endpoint and f'₋ > -∞ to
the right of the left endpoint; on the line those two conditions together are interiority.
The subdifferential on the line #
The subdifferential on the line is the interval between the one-sided derivatives:
∂f(x) = {x* ∈ ℝ | f'₋(x) ≤ x* ≤ f'₊(x)}.
This follows from the description of ∂f x by f'(x; ·): only the directions +1 and -1 carry
information, because f'(x; ·) is positively homogeneous.
A real number squeezed between the two one-sided derivatives forces x into dom f: outside
dom f one of the two is ±∞ on the wrong side.
One-sided limits of a monotone function #
A monotone map into a complete linear order converges from the right, to the infimum of its values there.
A monotone map into a complete linear order converges from the left, to the supremum of its values there.
The limit formulas #
The estimate behind the right-hand limit formulas: if a real μ lies strictly below f'₊(z)
for every z > x, then f x is bounded by the affine function of slope μ through (y, f y).
Along the segment from y down to x, each interior point z has μ < f'₊(z) ≤ the slope from
z to y, which bounds f z above; closedness lets the bound pass to the endpoint x.
Right-continuity of f'₊. For a closed proper convex function on the line the right
derivative is the limit of its own values from the right, in the monotone sense
f'₊(x) = ⨅ {f'₊(z) | z > x}. Closedness cannot be dropped: for f equal to 1 at 0, to 0 on
(0, ∞) and to ⊤ on (-∞, 0) — convex and proper, but not closed — f'₊ jumps at 0.
The estimate behind the left-hand limit formulas, the mirror image of
le_coe_of_lt_rightDeriv.
Left-continuity of f'₋: f'₋(x) = ⨆ {f'₋(z) | z < x} for a closed proper convex
function on the line.
The crossed limit formula: the left derivative also has f'₊(x) as its limit from the
right.
The crossed limit formula: the right derivative has f'₋(x) as its limit from the
left.
The four limit formulas #
lim_{z ↓ x} f'₊(z) = f'₊(x).
lim_{z ↑ x} f'₊(z) = f'₋(x).
lim_{z ↓ x} f'₋(z) = f'₊(x).
lim_{z ↑ x} f'₋(z) = f'₋(x).
A nondecreasing function between the two derivatives #
Any φ squeezed between the two one-sided derivatives is nondecreasing — immediately from
f'₊(y) ≤ f'₋(z) for y < z.
φ determines f'₊: any nondecreasing φ between f'₋ and f'₊ has f'₊ as its limit
from the right.
Two proper functions on the line with the same one-sided derivatives have the same subdifferential — the subdifferential is the interval between them.
Two closed proper convex functions on the line with the same one-sided derivatives differ by a constant.
Uniqueness: a nondecreasing φ between the one-sided derivatives pins down a closed
proper convex function on the line up to an additive constant.
Cycles as lists, and rotation #
The telescoping sum around the closed cycle through a list of pairs: chainVal with the head
of the list as both the start and the free endpoint. The empty cycle has sum 0.
Equations
- Tdaf.ConvexAnalysis.cycleVal B [] = 0
- Tdaf.ConvexAnalysis.cycleVal B (p :: l) = Tdaf.ConvexAnalysis.chainVal B p l p.1
Instances For
A cycle may be rotated by one step without changing its sum: the last edge of the rotated cycle is the first edge of the original.
A chain is affine in its free endpoint, with the slope realised by a pair of the chain. This
sharpens exists_chainVal_eq, and it is what makes the last edge of a cycle land on a pair to
which monotonicity applies.
Deleting the head of a cycle changes the sum by one product. This is the induction step of
the one-dimensional theorem: if the head dominates the rest of the cycle in both coordinates, the
product is ≤ 0.
Monotone relations on the line #
On the line, monotonicity is total ordering: a mapping is monotone exactly when its graph
is a chain for the coordinatewise order on ℝ × ℝ, that is, a non-decreasing curve.
Deleting a dominating head of a cycle does not decrease its sum. On the line this is the whole content of the passage from monotonicity to cyclic monotonicity: the deleted edge runs backwards in the first coordinate and forwards in the second.
On the line, monotone mappings are cyclically monotone. A cycle may be rotated so that the
pair maximizing x + y comes first; monotonicity makes that pair dominate the whole cycle in both
coordinates, so deleting it does not decrease the sum, and induction on the length finishes.
In higher dimensions this fails: cyclic monotonicity is strictly stronger.
On the line the two maximality notions agree, since the two monotonicity notions do.
On the line the maximal monotone mappings — the maximal chains for the
coordinatewise order, the complete non-decreasing curves — are exactly the subdifferentials of
the closed proper convex functions. With mem_subgradientRel_iff, a complete non-decreasing curve
is always the region f'₋(x) ≤ y ≤ f'₊(x) between two one-sided derivatives, and conversely.
The graph of the subdifferential of a proper convex function on the line is the region between the two one-sided derivatives.