Extended-real-valued convex functions #
The basic theory of convex functions f : E → EReal on a real vector space. Convexity is defined
geometrically, as convexity of the epigraph, rather than by the
inequality f (a • x + b • y) ≤ a * f x + b * f y: the right-hand side can be the undefined
∞ - ∞ when f takes both infinite values, and improper functions are admitted throughout. The
epigraph lives in E × ℝ, not E × EReal — the second coordinate ranges over the reals, unlike
Mathlib's ConvexOn.convex_epigraph, which uses the codomain of the function.
Main definitions #
epi f— the epigraph off, a subset ofE × ℝ.dom f— the effective domain off, wheref < ⊤.Proper f—fis finite somewhere and never⊥.restrict s f—frestricted tos, extended by⊤.ConvexFn f—fis convex, meaning thatepi fis a convex set.scaleSnd c— the vertical scaling(x, μ) ↦ (x, c μ)ofE × ℝ, which is how a scalar multiple offacts on epigraphs.
Main results #
convexFn_iff_forall_lt— convexity by strict inequalities: the form that avoids∞ - ∞entirely.convexFn_iff_le— the familiar inequality, valid whenfnever takes⊥.convexFn_add_coe,ConvexFn.comp_add_left— adding a real-valued affine coordinate, and translating the argument, preserve convexity.ConvexFn.convex_lt,ConvexFn.convex_le,ConvexFn.convex_dom— sublevel sets and the effective domain of a convex function are convex.convexFn_coe_mul,dom_coe_mul,proper_coe_mul— a non-negative multiplecf.convexOn_iff_convexFn— the bridge to Mathlib'sConvexOn.ConvexFn.sum_le— Jensen's inequality for a finite convex combination.
References #
- R. T. Rockafellar, Convex Analysis, Princeton University Press, 1970, §4.
Epigraphs, domains, properness #
dom f is the projection of epi f, with no hypothesis on f and improper functions
included. That is why dom must not be restricted to functions avoiding ⊥: the relative interior
ri (dom f) carries statements about improper f too.
f is proper when it is finite somewhere and never takes the value ⊥; equivalently, epi f
is nonempty and contains no vertical lines.
fis not identically⊤.fnever takes the value⊥.
Instances For
f restricted to s and extended by ⊤ off s — the standing encoding of "a convex function
given on a convex set". The ⨅ formulation avoids a decidability hypothesis;
restrict_of_mem and restrict_of_notMem are the defining equations.
Equations
- Tdaf.ConvexAnalysis.restrict s f x = ⨅ (_ : x ∈ s), f x
Instances For
Non-negative scalar multiples #
EReal obeys 0 · ∞ = 0, so 0 · f is the constant 0, which is proper and convex; only the
effective domain statement needs 0 < c, because dom (0 · f) is all of E.
A positive multiple of f has the same effective domain as f. The hypothesis is
0 < c, not 0 ≤ c: at c = 0 the product is the constant 0 and its domain is everything.
A non-negative multiple of a proper function is proper. At c = 0 the product is the
constant 0, which is finite everywhere; at c > 0 the domain is unchanged (dom_coe_mul).
Convex functions #
A function f : E → EReal is convex when its epigraph is a convex subset of E × ℝ.
See convexFn_iff_forall_lt and convexFn_iff_le for the analytic forms.
The epigraph of a convex function is convex.
Instances For
A convex-combination goal reduces to the case of two positive coefficients.
The defining property of convexity, in the form in which it is used: a convex combination of two points of the epigraph lies in the epigraph.
Conversely, the combination property characterises convexity.
A real-valued affine coordinate added to a convex function keeps it convex. The hypothesis is the combination law rather than linearity, so the same lemma serves a coordinate of a pairing, a projection of a product and an affine function alike.
Translating the argument preserves convexity. x ↦ f (a + x) is convex whenever f is,
for any a; the epigraph of the translate is the translate of the epigraph.
Non-negative scalar multiples #
The linear map (x, μ) ↦ (x, c μ) of E × ℝ. It is the vertical scaling that carries epi f
to epi (cf); see epi_coe_mul.
Equations
- Tdaf.ConvexAnalysis.scaleSnd c = (LinearMap.fst ℝ E ℝ).prod (c • LinearMap.snd ℝ E ℝ)
Instances For
The epigraph of a positive multiple. epi (cf) is epi f pulled back along the vertical
scaling (x, μ) ↦ (x, μ / c), which makes convexity and closedness of cf preimage arguments. The
identity fails at c = 0, where the left side is E × Ici 0 and the right side is everything.
Convexity as a strict inequality on values #
Convexity in strict inequalities. A function f : E → EReal is convex if and only if
f ((1 - λ) x + λ y) < (1 - λ) α + λ β whenever f x < α, f y < β and 0 < λ < 1. The strict
inequalities keep α and β real, so the forbidden ∞ - ∞ never arises.
Convexity as an inequality on values #
For a function f that never takes the value ⊥ — equivalently, a function into (-∞, +∞] —
convexity is the familiar inequality.
Level sets and the effective domain #
Mathlib's ConvexOn for a real-valued function on a set agrees with ConvexFn for its
extension by ⊤. This is the interface through which the surface layer reuses Mathlib.
Jensen's inequality for finite convex combinations #
Jensen's inequality for a convex EReal-valued function, in the form the epigraph supplies
it: a convex combination of points at which f is bounded above by reals m j is bounded above by
the same combination of the m j. The bound is by reals, not by f (u j) directly; the
EReal-valued form f (∑ wt j • u j) ≤ ∑ wt j • f (u j) needs the 0 · ∞ = 0 convention at
indices where wt j = 0 and f (u j) = ⊤. Aliased as jensen.