Differentiable convex functions #
First-order characterizations of convexity for a real valued function f : H → ℝ on a convex
set s of a real Hilbert space, with the gradient paired by the inner product: the gradient
inequality f x + ⟪∇f x, y - x⟫ ≤ f y and monotonicity of the gradient, their forms for strongly
convex functions, and the optimality condition -∇f x ∈ N_C x for minimizing a differentiable
convex function on a convex set.
Main statements #
ConvexAnalysis.convexOn_of_forall_add_inner_le: the converse of the gradient inequalityConvexAnalysis.ConvexOn.add_hasGradientWithinAt_le(inConvexAnalysis.Gradient), for any mapf' : H → Hin place of the gradient;ConvexAnalysis.convexOn_iff_forall_add_inner_leis the equivalence.ConvexAnalysis.ConvexOn.inner_sub_sub_nonneg_of_hasGradientWithinAt: the gradient of a convex function is monotone,0 ≤ ⟪x - y, ∇f x - ∇f y⟫;ConvexAnalysis.ConvexOn.isMonotoneOp_gradientstates it for the operatorx ↦ {∇f x}.ConvexAnalysis.convexOn_of_inner_sub_sub_nonneg: a function whose gradient is monotone on a convex set is convex there;ConvexAnalysis.convexOn_iff_inner_sub_sub_nonnegis the equivalence.ConvexAnalysis.strongConvexOn_iff_forall_add_inner_add_leandConvexAnalysis.strongConvexOn_iff_mul_norm_sub_sq_le_inner:fism-strongly convex ifff x + ⟪∇f x, y - x⟫ + (m / 2) ‖y - x‖² ≤ f y, iff the gradient ism-strongly monotone,m ‖x - y‖² ≤ ⟪x - y, ∇f x - ∇f y⟫(ConvexAnalysis.StrongConvexOn.mul_norm_sub_sq_le_inner_of_hasGradientWithinAt).ConvexAnalysis.IsMinOn.neg_mem_normalCone_of_hasGradientWithinAt: the first-order necessary condition-∇f x ∈ N_C xat a minimizer on a convex set, without convexity off.ConvexAnalysis.ConvexOn.isMinOn_iff_neg_mem_normalCone_of_hasGradientWithinAt: forfconvex on a convex setC,xminimizesfonCiff-∇f x ∈ N_C x.
Implementation notes #
The gradient is a hypothesis HasGradientWithinAt f g s x (or HasGradientAt), as in
ConvexAnalysis.Gradient and ConvexAnalysis.Cocoercive: a Fréchet gradient, where [BC17] uses
Gâteaux gradients on an open domain, so the results here and those of [BC17] are incomparable. A
derivative within s suffices for the gradient inequality and the optimality condition, so f
may be arbitrary outside s; the converse of monotonicity uses the mean value theorem along
segments and assumes the gradient at each point of s. The gradient inequality itself,
ConvexAnalysis.ConvexOn.add_hasGradientWithinAt_le, is proved in ConvexAnalysis.Gradient from
a directional derivative (ConvexAnalysis.ConvexOn.add_hasLineDerivWithinAt_le), which contains
BC, Proposition 17.6. Strong convexity reduces to convexity of f - (m / 2) ‖·‖²
(Mathlib's strongConvexOn_iff_convex, BC, Proposition 10.8).
The open Mathlib PR #41494 (first-order convexity inequalities, open on 2026-12-01) proves, on a
real normed space and with the Fréchet derivative, ConvexOn.add_hasLineDerivAt_le,
ConvexOn.add_hasFDerivAt_le, ConvexOn.add_fderiv_le, the monotonicity
ConvexOn.fderiv_sub_nonneg, the optimality condition ConvexOn.isMinOn_of_fderiv_eq_zero for a
vanishing derivative, and the converse convexOn_iff_add_fderiv_le. The statements here are
their forms with the gradient, within a set, with the converse of monotonicity, strong convexity
and the optimality condition on a convex set. The gradient inequality follows the PR's pattern
of names (add_hasGradientWithinAt_le); the PR has no gradient forms to align the other names
with.
References #
- H. H. Bauschke, P. L. Combettes, Convex Analysis and Monotone Operator Theory in Hilbert Spaces, 2nd ed., Springer, 2017, Propositions 10.8, 17.6, 17.7 and 27.8, Example 22.4.
Tags #
convex function, gradient, first-order condition, gradient inequality, monotone gradient, strongly convex function, strongly monotone gradient, normal cone, variational inequality, constrained optimization
Monotonicity of the gradient, BC, Proposition 17.7 (i)⇒(iii) with a Fréchet gradient
within s in place of [BC17]'s Gâteaux gradient on an open domain: for f convex on s with
gradients u at x ∈ s and v at y ∈ s (within s), 0 ≤ ⟪x - y, u - v⟫.
The gradient of a convex differentiable function f : H → ℝ is a monotone operator,
BC, Proposition 17.7 (i)⇒(iii) with a Fréchet gradient in place of [BC17]'s Gâteaux
gradient.
Converse of the gradient inequality BC, Proposition 17.7 (ii)⇒(i): if
f x + ⟪f' x, y - x⟫ ≤ f y for all x, y in a convex set s, then f is convex on s. No
differentiability is needed: f' is any map, for example a selection of subgradients, and s is
any convex set, where [BC17] assumes an open domain and Gâteaux differentiability.
First-order characterization of convexity, BC, Proposition 17.7 (i)⇔(ii) with a
Fréchet gradient within s in place of [BC17]'s Gâteaux gradient: a function with a gradient
within the convex set s at every point of s is convex on s iff it satisfies the gradient
inequality. [BC17] assumes dom f open; here s is any convex set.
A function with a monotone gradient is convex, BC, Proposition 17.7 (iii)⇒(i) with a
Fréchet gradient in place of [BC17]'s Gâteaux gradient: if f has the gradient f' x at every
point x of the convex set s and 0 ≤ ⟪x - y, f' x - f' y⟫ for all x, y ∈ s, then f is
convex on s. The proof applies the mean value theorem on segments. [BC17] assumes dom f
open.
Monotone gradients characterize convexity, BC, Proposition 17.7 (i)⇔(iii) with a
Fréchet gradient in place of [BC17]'s Gâteaux gradient: a function with a gradient at every point
of the convex set s is convex on s iff its gradient is monotone on s.
The gradient of an m-strongly convex function is m-strongly monotone: for f
m-strongly convex on s with gradients u at x ∈ s and v at y ∈ s (within s),
m ‖x - y‖² ≤ ⟪x - y, u - v⟫ (compare BC, Example 22.4 (iv), there for ∂f).
Converse of the gradient inequality of a strongly convex function: if
f x + ⟪f' x, y - x⟫ + (m / 2) ‖y - x‖² ≤ f y for all x, y in a convex set s, then f is
m-strongly convex on s; f' is any map.
First-order characterization of strong convexity: a function with a gradient within the
convex set s at every point of s is m-strongly convex on s iff
f x + ⟪f' x, y - x⟫ + (m / 2) ‖y - x‖² ≤ f y for all x, y ∈ s.
A function with a strongly monotone gradient is strongly convex: if f has the gradient
f' x at every point x of the convex set s and m ‖x - y‖² ≤ ⟪x - y, f' x - f' y⟫ for all
x, y ∈ s, then f is m-strongly convex on s.
Strongly monotone gradients characterize strong convexity: a function with a gradient at
every point of the convex set s is m-strongly convex on s iff its gradient is m-strongly
monotone on s.
First-order necessary condition on a convex set: if x minimizes f on the convex set
C and f has the gradient g within C at x, then -g ∈ N_C x, that is,
⟪g, y - x⟫ ≥ 0 for every y ∈ C (a variational inequality). No convexity of f is needed.
Optimality condition for differentiable convex problems, BC, Proposition 27.8
(i)⇔(vi) with a Fréchet gradient within C in place of [BC17]'s Gâteaux gradient at x: if f is
convex on C and has the gradient g within C at x ∈ C, then x minimizes f on C iff
-g ∈ N_C x, that is, iff ⟪g, y - x⟫ ≥ 0 for every y ∈ C. [BC17] states this for
f ∈ Γ₀(H), a closed convex set C and a qualification condition; here f is real valued and
convex on C only, C need not be closed, and no qualification is needed.
The optimality condition with the gradient at x.