Convex and concave functions #
This file defines convex and concave functions in vector spaces and proves the finite Jensen
inequality. The integral version can be found in Analysis.Convex.Integral
.
A function f : E โ ฮฒ
is ConvexOn
a set s
if s
is itself a convex set, and for any two
points x y โ s
, the segment joining (x, f x)
to (y, f y)
is above the graph of f
.
Equivalently, ConvexOn ๐ f s
means that the epigraph {p : E ร ฮฒ | p.1 โ s โง f p.1 โค p.2}
is
a convex set.
Main declarations #
ConvexOn ๐ s f
: The functionf
is convex ons
with scalars๐
.ConcaveOn ๐ s f
: The functionf
is concave ons
with scalars๐
.StrictConvexOn ๐ s f
: The functionf
is strictly convex ons
with scalars๐
.StrictConcaveOn ๐ s f
: The functionf
is strictly concave ons
with scalars๐
.
Convexity of functions
Equations
Instances For
Concavity of functions
Equations
Instances For
Strict convexity of functions
Equations
Instances For
Strict concavity of functions
Equations
Instances For
Right translation preserves convexity.
Right translation preserves concavity.
Left translation preserves convexity.
Left translation preserves concavity.
A linear map is convex.
A linear map is concave.
For a function on a convex set in a linearly ordered space (where the order and the algebraic
structures aren't necessarily compatible), in order to prove that it is convex, it suffices to
verify the inequality f (a โข x + b โข y) โค a โข f x + b โข f y
only for x < y
and positive a
,
b
. The main use case is E = ๐
however one can apply it, e.g., to ๐^n
with lexicographic order.
For a function on a convex set in a linearly ordered space (where the order and the algebraic
structures aren't necessarily compatible), in order to prove that it is concave it suffices to
verify the inequality a โข f x + b โข f y โค f (a โข x + b โข y)
for x < y
and positive a
, b
. The
main use case is E = โ
however one can apply it, e.g., to โ^n
with lexicographic order.
For a function on a convex set in a linearly ordered space (where the order and the algebraic
structures aren't necessarily compatible), in order to prove that it is strictly convex, it suffices
to verify the inequality f (a โข x + b โข y) < a โข f x + b โข f y
for x < y
and positive a
, b
.
The main use case is E = ๐
however one can apply it, e.g., to ๐^n
with lexicographic order.
For a function on a convex set in a linearly ordered space (where the order and the algebraic
structures aren't necessarily compatible), in order to prove that it is strictly concave it suffices
to verify the inequality a โข f x + b โข f y < f (a โข x + b โข y)
for x < y
and positive a
, b
.
The main use case is E = ๐
however one can apply it, e.g., to ๐^n
with lexicographic order.
If g
is convex on s
, so is (f โ g)
on f โปยน' s
for a linear f
.
If g
is concave on s
, so is (g โ f)
on f โปยน' s
for a linear f
.
The pointwise maximum of convex functions is convex.
The pointwise minimum of concave functions is concave.
The pointwise maximum of strictly convex functions is strictly convex.
The pointwise minimum of strictly concave functions is strictly concave.
A convex function on a segment is upper-bounded by the max of its endpoints.
A concave function on a segment is lower-bounded by the min of its endpoints.
A convex function on a segment is upper-bounded by the max of its endpoints.
A concave function on a segment is lower-bounded by the min of its endpoints.
A strictly convex function on an open segment is strictly upper-bounded by the max of its endpoints.
A strictly concave function on an open segment is strictly lower-bounded by the min of its endpoints.
A strictly convex function on an open segment is strictly upper-bounded by the max of its endpoints.
A strictly concave function on an open segment is strictly lower-bounded by the min of its endpoints.
A function -f
is convex iff f
is concave.
A function -f
is concave iff f
is convex.
A function -f
is strictly convex iff f
is strictly concave.
A function -f
is strictly concave iff f
is strictly convex.
Alias of the reverse direction of neg_convexOn_iff
.
A function -f
is convex iff f
is concave.
Alias of the reverse direction of neg_concaveOn_iff
.
A function -f
is concave iff f
is convex.
Alias of the reverse direction of neg_strictConvexOn_iff
.
A function -f
is strictly convex iff f
is strictly concave.
Alias of the reverse direction of neg_strictConcaveOn_iff
.
A function -f
is strictly concave iff f
is strictly convex.
Right translation preserves strict convexity.
Right translation preserves strict concavity.
Left translation preserves strict convexity.
Left translation preserves strict concavity.
If a function is convex on s
, it remains convex when precomposed by an affine map.
If a function is concave on s
, it remains concave when precomposed by an affine map.