Documentation

Tdaf.Analysis.Convex.Subgradient.Convergence

Convergence of directional derivatives and of subgradients #

Convex functions f i, finite on an open convex set U and converging pointwise there to g, converge uniformly on compact subsets, hence continuously: f i (x i) → g x along any x i → x in U. Differentiation does not pass to the limit; only the one-sided limsup inequality survives. For x i → x in U and y i → y,

limsup_i (f i)'(x i; y i)  ≤  g'(x; y),        ∂(f i)(x i)  ⊆  ∂g(x) + ε B  eventually.

Equality can fail: for f i x = |x|^{p i} with p i ↓ 1 on U = ℝ, every (f i)'(0; 1) is 0 while g'(0; 1) = 1. Taking the family constant turns the two statements into upper semicontinuity of f'(x; y) in (x, y) and of ∂f in x.

Main results #

Implementation notes #

The convergence theory is stated for real-valued ConvexOn ℝ U (f i) while subgradients are EReal-valued; the bridge is ConvexFn.convexOn_toReal_dom. ε B needs a norm on the dual side, so the subgradient statements are for a real inner-product space paired with itself.

Two classical hypotheses are absent: the sequence need not lie in U, only converge to a point of it, and the approach to a boundary point needs neither closedness of f nor the usual simplex construction — monotonicity of the difference quotient in its step replaces the vanishing step ‖x i - x‖ by a fixed larger one, after which only continuity at interior points is used.

References #

[^1]: R. T. Rockafellar, Convex Analysis, Princeton University Press, 1970, §24.

Support function of a ball #

theorem Tdaf.ConvexAnalysis.supportFn_closedBall {E : Type u_1} [NormedAddCommGroup E] [InnerProductSpace ℝ E] {ε : ℝ} (hε : 0 ≤ ε) (y : E) :

The support function of the ball of radius ε about the origin is ε ‖·‖.

The directional derivative at an interior point #

theorem Tdaf.ConvexAnalysis.dirDeriv_eq_coe_toReal_of_mem_interior_dom {E : Type u_1} [NormedAddCommGroup E] [NormedSpace ℝ E] [FiniteDimensional ℝ E] {g : E → EReal} {x : E} (hg : ConvexFn g) (hgp : Proper g) (hx : x ∈ interior (dom g)) (z : E) :
dirDeriv g x z = ↑(dirDeriv g x z).toReal

At an interior point of dom f the directional derivative is finite in every direction, so it is the coercion of its own real value.

theorem Tdaf.ConvexAnalysis.convexOn_toReal_dirDeriv {E : Type u_1} [NormedAddCommGroup E] [NormedSpace ℝ E] [FiniteDimensional ℝ E] {g : E → EReal} {x : E} (hg : ConvexFn g) (hgp : Proper g) (hx : x ∈ interior (dom g)) :
ConvexOn ℝ Set.univ fun (z : E) => (dirDeriv g x z).toReal

At an interior point of dom f the directional derivative is a finite convex function on the whole space.

theorem Tdaf.ConvexAnalysis.toReal_dirDeriv_smul {E : Type u_1} [NormedAddCommGroup E] [NormedSpace ℝ E] [FiniteDimensional ℝ E] {g : E → EReal} {x : E} (hg : ConvexFn g) (hgp : Proper g) (hx : x ∈ interior (dom g)) {c : ℝ} (hc : 0 < c) (z : E) :
(dirDeriv g x (c • z)).toReal = c * (dirDeriv g x z).toReal

Positive homogeneity of the directional derivative, read on real values.

Continuous convergence #

theorem Tdaf.ConvexAnalysis.tendsto_eval_of_tendsto {E : Type u_1} [NormedAddCommGroup E] [NormedSpace ℝ E] [FiniteDimensional ℝ E] {U : Set E} {f : ℕ → E → ℝ} {g : E → ℝ} (hU : IsOpen U) (hUc : Convex ℝ U) (hf : ∀ (i : ℕ), ConvexOn ℝ U (f i)) (hg : ConvexOn ℝ U g) (hconv : ∀ z ∈ U, Filter.Tendsto (fun (i : ℕ) => f i z) Filter.atTop (nhds (g z))) {x : E} (hx : x ∈ U) {xs : ℕ → E} (hxs : Filter.Tendsto xs Filter.atTop (nhds x)) :
Filter.Tendsto (fun (i : ℕ) => f i (xs i)) Filter.atTop (nhds (g x))

Convex functions converging pointwise on an open convex set converge continuously there: the values f i (x i) along any sequence x i → x converge to g x. This is the practical form of the fact that pointwise convergence of convex functions is uniform on compact subsets.

Upper semicontinuity of the directional derivative #

theorem Tdaf.ConvexAnalysis.eventually_dirDeriv_lt {E : Type u_1} [NormedAddCommGroup E] [NormedSpace ℝ E] [FiniteDimensional ℝ E] {U : Set E} {f : ℕ → E → EReal} {g : E → EReal} (hU : IsOpen U) (hUc : Convex ℝ U) (hf : ∀ (i : ℕ), ConvexFn (f i)) (hfp : ∀ (i : ℕ), Proper (f i)) (hfU : ∀ (i : ℕ), U ⊆ dom (f i)) (hg : ConvexFn g) (hgp : Proper g) (hgU : U ⊆ dom g) (hconv : ∀ z ∈ U, Filter.Tendsto (fun (i : ℕ) => f i z) Filter.atTop (nhds (g z))) {x : E} (hx : x ∈ U) {xs : ℕ → E} (hxs : Filter.Tendsto xs Filter.atTop (nhds x)) {y : E} {ys : ℕ → E} (hys : Filter.Tendsto ys Filter.atTop (nhds y)) {μ : ℝ} (hμ : dirDeriv g x y < ↑μ) :
∀ᶠ (i : ℕ) in Filter.atTop, dirDeriv (f i) (xs i) (ys i) < ↑μ

Directional derivatives are upper semicontinuous under pointwise convergence. If convex functions f i, finite on an open convex U, converge pointwise there to g, and if x i → x ∈ U and y i → y, then

limsup_i (f i)'(x i; y i) ≤ g'(x; y).

The limsup is spelled without junk values: every real μ above g'(x; y) eventually bounds (f i)'(x i; y i).

The local form, for a single function #

theorem Tdaf.ConvexAnalysis.upperSemicontinuousAt_dirDeriv {E : Type u_1} [NormedAddCommGroup E] [NormedSpace ℝ E] [FiniteDimensional ℝ E] {f : E → EReal} {x : E} (hf : ConvexFn f) (hfp : Proper f) (hx : x ∈ interior (dom f)) (y : E) :
UpperSemicontinuousAt (fun (p : E × E) => dirDeriv f p.1 p.2) (x, y)

f'(x; y) is upper semicontinuous in (x, y) on int (dom f) × E. This is the previous theorem for the constant sequence f, f, f, …, transported from sequences to the neighbourhood filter.

Upper semicontinuity of the subdifferential #

The support function of ∂f x is f'(x; ·), for a real inner-product space paired with itself, a special case of the same identity for an arbitrary pairing.

theorem Tdaf.ConvexAnalysis.subgradient_subset_add_closedBall_of_forall_dirDeriv_le {E : Type u_1} [NormedAddCommGroup E] [InnerProductSpace ℝ E] [FiniteDimensional ℝ E] {p q : E → EReal} {u v : E} (hp : ConvexFn p) (hpp : Proper p) (hu : u ∈ interior (dom p)) (hq : ConvexFn q) (hqp : Proper q) (hv : v ∈ interior (dom q)) {ε : ℝ} (hε : 0 < ε) (hb : ∀ z ∈ Metric.closedBall 0 1, (dirDeriv p u z).toReal ≤ (dirDeriv q v z).toReal + ε) :

The support-function endgame shared by the two subgradient statements below. If the directional derivative of p at an interior point u of dom p is dominated on the unit ball by that of q at an interior point v of dom q, up to ε, then ∂p u ⊆ ∂q v + ε B. Positive homogeneity spreads the bound to every direction, and support functions order closed convex sets.

theorem Tdaf.ConvexAnalysis.eventually_subgradient_subset_add_closedBall {E : Type u_1} [NormedAddCommGroup E] [InnerProductSpace ℝ E] [FiniteDimensional ℝ E] {U : Set E} {f : ℕ → E → EReal} {g : E → EReal} {x : E} (hU : IsOpen U) (hUc : Convex ℝ U) (hf : ∀ (i : ℕ), ConvexFn (f i)) (hfp : ∀ (i : ℕ), Proper (f i)) (hfU : ∀ (i : ℕ), U ⊆ dom (f i)) (hg : ConvexFn g) (hgp : Proper g) (hgU : U ⊆ dom g) (hconv : ∀ z ∈ U, Filter.Tendsto (fun (i : ℕ) => f i z) Filter.atTop (nhds (g z))) (hx : x ∈ U) {xs : ℕ → E} (hxs : Filter.Tendsto xs Filter.atTop (nhds x)) {ε : ℝ} (hε : 0 < ε) :

Subdifferentials are upper semicontinuous under pointwise convergence. If convex functions f i, finite on an open convex U, converge pointwise there to g, and x i → x inside U, then for every ε > 0

∂(f i)(x i) ⊆ ∂g(x) + ε B

for all large i, where B is the closed unit ball. The subdifferentials are the support sets of the directional derivatives, and the previous theorem bounds those pointwise; the bound is made uniform on the compact unit ball and then spread by positive homogeneity.

The local form of the subgradient statement #

theorem Tdaf.ConvexAnalysis.eventually_nhds_subgradient_subset_add_closedBall {E : Type u_1} [NormedAddCommGroup E] [InnerProductSpace ℝ E] [FiniteDimensional ℝ E] {f : E → EReal} {x : E} (hf : ConvexFn f) (hfp : Proper f) (hx : x ∈ interior (dom f)) {ε : ℝ} (hε : 0 < ε) :

∂f is upper semicontinuous at every interior point of dom f, so that ∂f z ⊆ ∂f x + ε B for all z in a neighbourhood of x.

Approach to a point of the domain along a direction #

theorem Tdaf.ConvexAnalysis.mem_interior_dom_smul {E : Type u_1} [NormedAddCommGroup E] [NormedSpace ℝ E] {f : E → EReal} {x : E} (hf : ConvexFn f) (hx : x ∈ dom f) {u : E} {α t : ℝ} (hα : 0 < α) (hu : x + α • u ∈ interior (dom f)) (ht : 0 < t) (htα : t ≤ α) :
x + t • u ∈ interior (dom f)

The segment principle for effective domains: if x ∈ dom f and x + α • u is interior to dom f, then so is x + t • u for every t in (0, α].

theorem Tdaf.ConvexAnalysis.eventually_mem_interior_dom_of_tendsto_dir {E : Type u_1} [NormedAddCommGroup E] [NormedSpace ℝ E] {f : E → EReal} {x y : E} (hf : ConvexFn f) (hx : x ∈ dom f) {xs : ℕ → E} (hxsne : ∀ (i : ℕ), xs i ≠ x) (hxs : Filter.Tendsto xs Filter.atTop (nhds x)) (hdir : Filter.Tendsto (fun (i : ℕ) => ‖xs i - x‖⁻¹ • (xs i - x)) Filter.atTop (nhds y)) {α : ℝ} (hα : 0 < α) (hαy : x + α • y ∈ interior (dom f)) :

An approach with a limiting direction that points into the interior is eventually interior: if x i → x ∈ dom f with x i ≠ x, the unit vectors ‖x i - x‖⁻¹ (x i - x) converge to y, and x + α y is interior to dom f for some α > 0, then x i ∈ int (dom f) for all large i. This is what makes the subgradient half of the boundary statement reachable: the sublinear functions f'(x i; ·) are then finite everywhere, so the uniform-convergence theory applies to them.

theorem Tdaf.ConvexAnalysis.mem_interior_dom_dirDeriv {E : Type u_1} [NormedAddCommGroup E] [NormedSpace ℝ E] {f : E → EReal} {x y : E} (hfp : Proper f) (hx : x ∈ dom f) {α : ℝ} (hα : 0 < α) (hαy : x + α • y ∈ interior (dom f)) :

A ray into the interior makes the direction interior to the domain of f'(x; ·): if x + α • y is interior to dom f for some α > 0, then y is interior to dom f'(x; ·), because a single difference quotient bounds f'(x; ·) above near y.

theorem Tdaf.ConvexAnalysis.proper_dirDeriv_of_ne_bot {E : Type u_1} [NormedAddCommGroup E] [NormedSpace ℝ E] [FiniteDimensional ℝ E] {f : E → EReal} {x y : E} (hf : ConvexFn f) (hfp : Proper f) (hx : x ∈ dom f) (hy : y ∈ interior (dom (dirDeriv f x))) (hne : dirDeriv f x y ≠ ⊥) :

f'(x; ·) is proper once it is finite at one interior point of its effective domain. A convex function that takes the value -∞ takes it throughout the relative interior of its domain, so a single finite interior value rules -∞ out everywhere.

theorem Tdaf.ConvexAnalysis.eventually_dirDeriv_lt_of_tendsto_dir {E : Type u_1} [NormedAddCommGroup E] [NormedSpace ℝ E] [FiniteDimensional ℝ E] {f : E → EReal} {x y : E} (hf : ConvexFn f) (hfp : Proper f) (hx : x ∈ dom f) {xs : ℕ → E} (hxsdom : ∀ (i : ℕ), xs i ∈ dom f) (hxsne : ∀ (i : ℕ), xs i ≠ x) (hxs : Filter.Tendsto xs Filter.atTop (nhds x)) (hdir : Filter.Tendsto (fun (i : ℕ) => ‖xs i - x‖⁻¹ • (xs i - x)) Filter.atTop (nhds y)) (hy : dirDeriv f x y ≠ ⊥) {α : ℝ} (hα : 0 < α) (hαy : x + α • y ∈ interior (dom f)) {z : E} {μ : ℝ} (hμ : dirDeriv (dirDeriv f x) y z < ↑μ) :
∀ᶠ (i : ℕ) in Filter.atTop, dirDeriv f (xs i) z < ↑μ

The directional-derivative half: directional derivatives are upper semicontinuous along an approach to a point of dom f that need not be interior, provided the approach has a limiting direction y and the second-order derivative in that direction is the bound.

If x i → x inside dom f with x i ≠ x and the unit vectors |x i - x|⁻¹ (x i - x) converge to y, and if f'(x; y) > -∞ while the ray x + ℝ₊ y meets int (dom f), then

limsup_i f'(x i; z) ≤ f'(x; y; z) := (f'(x; ·))'(y; z),        ∀ z.

As in eventually_dirDeriv_lt the limsup is spelled without junk values: every real μ above f'(x; y; z) eventually bounds f'(x i; z).

The face of ∂f x exposed by a direction #

theorem Tdaf.ConvexAnalysis.subgradient_dirDeriv {E : Type u_1} {F : Type u_2} [NormedAddCommGroup E] [NormedSpace ℝ E] [FiniteDimensional ℝ E] [AddCommGroup F] [Module ℝ F] [TopologicalSpace F] [IsTopologicalAddGroup F] [ContinuousSMul ℝ F] [LocallyConvexSpace ℝ F] {B : E →ₗ[ℝ] F →ₗ[ℝ] ℝ} {f : E → EReal} {x y : E} [IsCompatiblePairing B] [IsCompatiblePairing B.flip] (hf : ConvexFn f) (ht : f x ≠ ⊤) (hb : f x ≠ ⊥) (hgp : Proper (dirDeriv f x)) (hy : y ∈ intrinsicInterior ℝ (dom (dirDeriv f x))) :
subgradient B (dirDeriv f x) y = {v : F | v ∈ subgradient B f x ∧ ∀ w ∈ subgradient B f x, (B y) w ≤ (B y) v}

The subdifferential of f'(x; ·) at y is the face ∂f(x)_y of ∂f x exposed by y — the set of subgradients at which ⟨y, ·⟩ attains its maximum over ∂f x. This is the set appearing in the subgradient half of the boundary statement below, and it composes the support-function description of f'(x; ·) with the conjugacy characterisation of ∂. Properness of f'(x; ·) is what makes ∂f x non-empty, so it is not a separate hypothesis.

∂f(x)_y as a normal-cone condition: the subgradients at which y is normal to ∂f x. This is subgradient_dirDeriv read through the definition of the normal cone.

∂(f'(x; ·))(y) is an exposed face of ∂f x, in Mathlib's sense: it is cut out of ∂f x by maximising the continuous linear functional ⟨y, ·⟩. Composing with IsExposed.isFace makes it a face of ∂f x in the convex-geometry sense.

The subgradient half of the boundary statement #

theorem Tdaf.ConvexAnalysis.eventually_subgradient_subset_exposed_add_closedBall {E : Type u_1} [NormedAddCommGroup E] [InnerProductSpace ℝ E] [FiniteDimensional ℝ E] {f : E → EReal} {x y : E} (hf : ConvexFn f) (hfp : Proper f) (hx : x ∈ dom f) {xs : ℕ → E} (hxsdom : ∀ (i : ℕ), xs i ∈ dom f) (hxsne : ∀ (i : ℕ), xs i ≠ x) (hxs : Filter.Tendsto xs Filter.atTop (nhds x)) (hdir : Filter.Tendsto (fun (i : ℕ) => ‖xs i - x‖⁻¹ • (xs i - x)) Filter.atTop (nhds y)) (hy : dirDeriv f x y ≠ ⊥) {α : ℝ} (hα : 0 < α) (hαy : x + α • y ∈ interior (dom f)) {ε : ℝ} (hε : 0 < ε) :
∀ᶠ (i : ℕ) in Filter.atTop, subgradient (innerₗ E) f (xs i) ⊆ {v : E | v ∈ subgradient (innerₗ E) f x ∧ ∀ w ∈ subgradient (innerₗ E) f x, inner ℝ y w ≤ inner ℝ y v} + Metric.closedBall 0 ε

The subgradient half: along an approach to a point of dom f with a limiting direction y pointing into int (dom f), the subdifferentials collapse onto the face of ∂f x exposed by y,

∂f(x i) ⊆ ∂f(x)_y + ε B        eventually,

where ∂f(x)_y = {v ∈ ∂f x | ⟨y, ·⟩ is maximised over ∂f x at v}, identified with ∂(f'(x; ·))(y) by subgradient_dirDeriv. The argument is that of the interior subgradient statement with f'(x; ·) replaced by f'(x; y; ·); the step usually left implicit is eventually_mem_interior_dom_of_tendsto_dir, which makes the f'(x i; ·) finite everywhere.