Documentation

ConvexAnalysis.Clarke

Clarke's generalized gradient in real inner product spaces #

In a real inner product space H, Clarke's generalized gradient ∂_C f x of f : H → ℝ is the set of vectors u with ⟪v, u⟫ ≤ f°(x; v) for every direction v: the subdifferential at 0 of the convex function f°(x; ·). It is the preimage of the dual-space version clarkeSubdifferentialDual f x under the Riesz map, and in a complete space its image under the inverse Riesz map. Most results of this file are derived from their dual-space versions in ClarkeBanach.lean through this bridge; the chain rules use that the Riesz map turns composition with G' into the adjoint G'†. Results specific to inner product spaces are the link with the subdifferential of convex analysis, gradients, the support function and the max rule, which uses the max rule of convex analysis (MaxRule.lean).

Main definitions #

Main statements #

Implementation notes #

The generalized directional derivative f° and regularity are in ClarkeDeriv.lean and ClarkeRegular.lean, for normed spaces. The calculus of the generalized gradient is proved once, in the dual space (ClarkeBanach.lean), and transported here: membership through ConvexAnalysis.clarkeSubdifferential_eq_preimage_toDualMap, which needs no completeness, and images of sets through ConvexAnalysis.clarkeSubdifferential_eq_image_toDual_symm, which needs the Riesz representation theorem and hence a complete space. The max rule has no dual-space version yet: its proof needs the max rule of convex analysis in Hilbert space, and the convex hull is closed because the ∂_C (F i) x are weakly compact (ConvexAnalysis.isClosed_convexHull_iUnion).

References #

Tags #

Clarke generalized gradient, locally Lipschitz function, nonsmooth analysis, Lebourg's mean value theorem, sum rule, max rule, chain rule, Riesz representation

Clarke's generalized gradient ∂_C f x: the vectors u with ⟪v, u⟫ ≤ f°(x; v) for every direction v Clarke, Chapter 2, Clarke1980, Section 2 (there as a subset of the dual space, here through the Riesz map; see ConvexAnalysis.clarkeSubdifferentialDual for the dual form). It is the subdifferential at 0 of f°(x; ·) (clarkeSubdifferential_eq_subdifferential), a convex function when f is Lipschitz near x. The set is Clarke's generalized gradient only for f Lipschitz near x; for other f, Clarke's general definition through the normal cone to the epigraph gives a set contained in this one.

Equations
Instances For
    @[simp]
    theorem ConvexAnalysis.mem_clarkeSubdifferential {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace ℝ H] {f : H → ℝ} {x u : H} :
    u ∈ clarkeSubdifferential f x ↔ ∀ (v : H), ↑(inner ℝ v u) ≤ clarkeDeriv f x v

    Membership in ∂_C f x, unfolded.

    The bridge to the dual space #

    In a real inner product space, u ∈ clarkeSubdifferential f x iff the functional ⟪u, ·⟫ lies in clarkeSubdifferentialDual f x.

    @[simp]

    Clarke's generalized gradient of a constant function is {0}.

    u ∈ ∂_C f x iff u is a subgradient of the convex function f°(x; ·) at 0.

    Clarke's generalized gradient is the subdifferential of f°(x; ·) at 0.

    ∂_C f x is convex, for every f.

    ∂_C f x is closed, for every f.

    theorem ConvexAnalysis.norm_le_of_mem_clarkeSubdifferential {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace ℝ H] {f : H → ℝ} {x u : H} {K : NNReal} {U : Set H} (hU : U ∈ nhds x) (hf : LipschitzOnWith K f U) (hu : u ∈ clarkeSubdifferential f x) :
    ‖u‖ ≤ ↑K

    The elements of ∂_C f x have norm at most the Lipschitz constant of f near x.

    For f Lipschitz near x, ∂_C f x is bounded.

    Fermat's rule for Clarke's generalized gradient: 0 ∈ ∂_C f x at a local minimum.

    Fermat's rule for Clarke's generalized gradient: 0 ∈ ∂_C f x at a local maximum.

    ∂_C (-f) x = -∂_C f x. No hypothesis on f is needed.

    ∂_C (c f) x = c ∂_C f x for c > 0. No hypothesis on f is needed.

    Every subgradient of convex analysis is in Clarke's generalized gradient; no convexity is needed.

    For a convex f : H → ℝ continuous at x, Clarke's generalized gradient is the subdifferential of convex analysis Clarke, Chapter 2.

    In finite dimension, Clarke's generalized gradient of a convex f : H → ℝ is its subdifferential of convex analysis.

    theorem ConvexAnalysis.add_subset_clarkeSubdifferential_add_of_clarkeRegularAt {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace ℝ H] {f g : H → ℝ} {x : H} {K L : NNReal} {U V : Set H} (hU : U ∈ nhds x) (hf : LipschitzOnWith K f U) (hV : V ∈ nhds x) (hg : LipschitzOnWith L g V) (hfr : ClarkeRegularAt f x) (hgr : ClarkeRegularAt g x) :

    For regular f and g Lipschitz near x, ∂_C f x + ∂_C g x ⊆ ∂_C (f + g) x.

    theorem ConvexAnalysis.ClarkeRegularAt.mem_clarkeSubdifferential_iff {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace ℝ H] {f : H → ℝ} {x u : H} {K : NNReal} {U : Set H} (hU : U ∈ nhds x) (hf : LipschitzOnWith K f U) (hr : ClarkeRegularAt f x) :
    u ∈ clarkeSubdifferential f x ↔ ∀ (v : H), inner ℝ v u ≤ derivWithin (fun (t : ℝ) => f (x + t • v)) (Set.Ici 0) 0

    For a regular f Lipschitz near x, u ∈ ∂_C f x iff ⟪v, u⟫ ≤ f'(x; v) for every v, where f'(x; v) is the right derivative of t ↦ f (x + t • v) at 0 Clarke, Chapter 2.

    In a real Hilbert space, Clarke's generalized gradient clarkeSubdifferential f x is the image of clarkeSubdifferentialDual f x under the inverse of the Riesz map.

    In a real Hilbert space, the Riesz map sends clarkeSubdifferential f x onto clarkeSubdifferentialDual f x.

    The vector that represents a functional ξ lies in ∂_C f x iff ξ lies in the dual-space generalized gradient.

    theorem ConvexAnalysis.exists_mem_clarkeSubdifferential_inner_eq {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace ℝ H] {f : H → ℝ} {x : H} {K : NNReal} {U : Set H} [CompleteSpace H] (hU : U ∈ nhds x) (hf : LipschitzOnWith K f U) (v : H) :
    ∃ u ∈ clarkeSubdifferential f x, ↑(inner ℝ v u) = clarkeDeriv f x v

    Max formula for Clarke's generalized gradient: for f Lipschitz near x, some u ∈ ∂_C f x has ⟪v, u⟫ = f°(x; v); so f°(x; v) is the largest value of ⟪v, ·⟫ on ∂_C f x Clarke, Chapter 2.

    For f Lipschitz near x, Clarke's generalized gradient is nonempty.

    f°(x; ·) is the support function of ∂_C f x Clarke, Chapter 2.

    theorem ConvexAnalysis.clarkeSubdifferential_const_smul {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace ℝ H] {f : H → ℝ} {x : H} {K : NNReal} {U : Set H} [CompleteSpace H] (hU : U ∈ nhds x) (hf : LipschitzOnWith K f U) (c : ℝ) :

    ∂_C (c f) x = c ∂_C f x for every real c, for f Lipschitz near x. For c = 0 this uses that ∂_C f x is nonempty.

    theorem ConvexAnalysis.clarkeSubdifferential_add_subset {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace ℝ H] {f g : H → ℝ} {x : H} {K L : NNReal} {U V : Set H} [CompleteSpace H] (hU : U ∈ nhds x) (hf : LipschitzOnWith K f U) (hV : V ∈ nhds x) (hg : LipschitzOnWith L g V) :

    Sum rule for Clarke's generalized gradient: ∂_C (f + g) x ⊆ ∂_C f x + ∂_C g x for f and g Lipschitz near x Clarke, Chapter 2.

    theorem ConvexAnalysis.clarkeSubdifferential_add_eq_of_clarkeRegularAt {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace ℝ H] {f g : H → ℝ} {x : H} {K L : NNReal} {U V : Set H} [CompleteSpace H] (hU : U ∈ nhds x) (hf : LipschitzOnWith K f U) (hV : V ∈ nhds x) (hg : LipschitzOnWith L g V) (hfr : ClarkeRegularAt f x) (hgr : ClarkeRegularAt g x) :

    Sum rule with equality for regular functions Clarke, Chapter 2: ∂_C (f + g) x = ∂_C f x + ∂_C g x for f and g regular and Lipschitz near x; f + g is regular as well (ClarkeRegularAt.add).

    ∂_C (f + g) x = ∂_C f x + {∇g x} for g strictly differentiable at x; nothing is assumed on f.

    For a strictly differentiable f, Clarke's generalized gradient is the gradient: ∂_C f x = {∇f x} Clarke, Chapter 2.

    For f continuously differentiable near x, Clarke's generalized gradient is {∇f x}.

    The Fréchet derivative, as a vector, lies in ∂_C f x Clarke, Chapter 2; no Lipschitz hypothesis is needed.

    The gradient of a function differentiable at x lies in ∂_C f x; no Lipschitz hypothesis is needed.

    theorem ConvexAnalysis.exists_mem_clarkeSubdifferential_sub_eq_inner {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace ℝ H] {f : H → ℝ} [CompleteSpace H] {x y : H} (hf : ∀ z ∈ segment ℝ x y, ∃ (K : NNReal), ∃ U ∈ nhds z, LipschitzOnWith K f U) :
    ∃ z ∈ openSegment ℝ x y, ∃ u ∈ clarkeSubdifferential f z, f y - f x = inner ℝ (y - x) u

    Lebourg's mean value theorem (Lebourg; Clarke, Chapter 2): if f is Lipschitz near every point of the segment [x, y], then f y - f x = ⟪y - x, u⟫ for some u ∈ ∂_C f z at a point z of the open segment.

    theorem ConvexAnalysis.clarkeSubdifferential_sum_subset {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace ℝ H] {x : H} [CompleteSpace H] {ι : Type u_2} {s : Finset ι} {F : ι → H → ℝ} (hF : ∀ i ∈ s, ∃ (K : NNReal), ∃ U ∈ nhds x, LipschitzOnWith K (F i) U) :
    clarkeSubdifferential (∑ i ∈ s, F i) x ⊆ ∑ i ∈ s, clarkeSubdifferential (F i) x

    Sum rule for finitely many functions Lipschitz near x: ∂_C (∑ i, F i) x ⊆ ∑ i, ∂_C (F i) x Clarke, Chapter 2.

    theorem ConvexAnalysis.clarkeSubdifferential_sum_eq_of_clarkeRegularAt {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace ℝ H] {x : H} [CompleteSpace H] {ι : Type u_2} {s : Finset ι} {F : ι → H → ℝ} (hF : ∀ i ∈ s, ∃ (K : NNReal), ∃ U ∈ nhds x, LipschitzOnWith K (F i) U) (hr : ∀ i ∈ s, ClarkeRegularAt (F i) x) :
    clarkeSubdifferential (∑ i ∈ s, F i) x = ∑ i ∈ s, clarkeSubdifferential (F i) x

    Sum rule with equality for finitely many regular functions Lipschitz near x: ∂_C (∑ i, F i) x = ∑ i, ∂_C (F i) x Clarke, Chapter 2.

    Closed graph #

    theorem ConvexAnalysis.mem_clarkeSubdifferential_of_tendsto {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace ℝ H] {f : H → ℝ} {x u : H} {ι : Type u_2} {l : Filter ι} [l.NeBot] {xs us : ι → H} (hx : Filter.Tendsto xs l (nhds x)) (hu : ∀ (v : H), Filter.Tendsto (fun (i : ι) => inner ℝ v (us i)) l (nhds (inner ℝ v u))) (hmem : ∀ᶠ (i : ι) in l, us i ∈ clarkeSubdifferential f (xs i)) :

    Closed graph of ∂_C f, for every f, even along weakly convergent uᵢ Clarke, Chapter 2.

    The graph of ∂_C f is closed, for every f Clarke, Chapter 2.

    Finite dimension: ∂_C f x is compact.

    The max rule #

    theorem ConvexAnalysis.clarkeSubdifferential_iSup_subset {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace ℝ H] {x : H} {ι : Type u_2} [Finite ι] [Nonempty ι] {F : ι → H → ℝ} [CompleteSpace H] (hF : ∀ (i : ι), ∃ (K : NNReal), ∃ U ∈ nhds x, LipschitzOnWith K (F i) U) :
    clarkeSubdifferential (fun (y : H) => ⨆ (i : ι), F i y) x ⊆ (convexHull ℝ) (⋃ (i : ι), ⋃ (_ : F i x = ⨆ (j : ι), F j x), clarkeSubdifferential (F i) x)

    Max rule for Clarke's generalized gradient Clarke, Chapter 2: for finitely many F i : H → ℝ Lipschitz near x, ∂_C (⨆ i, F i) x lies in the convex hull of the ∂_C (F i) x over the active indices, those with F i x = ⨆ j, F j x (complete H).

    theorem ConvexAnalysis.clarkeSubdifferential_iSup {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace ℝ H] {x : H} {ι : Type u_2} [Finite ι] [Nonempty ι] {F : ι → H → ℝ} [CompleteSpace H] (hF : ∀ (i : ι), ∃ (K : NNReal), ∃ U ∈ nhds x, LipschitzOnWith K (F i) U) (hr : ∀ (i : ι), F i x = ⨆ (j : ι), F j x → ClarkeRegularAt (F i) x) :
    clarkeSubdifferential (fun (y : H) => ⨆ (i : ι), F i y) x = (convexHull ℝ) (⋃ (i : ι), ⋃ (_ : F i x = ⨆ (j : ι), F j x), clarkeSubdifferential (F i) x)

    Max rule with equality for regular functions Clarke, Chapter 2: for finitely many F i : H → ℝ Lipschitz near x whose active members are regular at x, ∂_C (⨆ i, F i) x is the convex hull of the ∂_C (F i) x over the active indices, and ⨆ i, F i is regular at x (clarkeRegularAt_iSup).

    Chain rules #

    The Riesz map turns composition with a bounded linear map A into its adjoint: the vector that represents η ∘ A is A† applied to the vector that represents η.

    The images of a set of functionals under composition with A and the Riesz map are the images of the representing vectors under the adjoint A†.

    theorem ConvexAnalysis.clarkeSubdifferential_comp_subset_of_hasStrictFDerivAt {H : Type u_1} {K' : Type u_2} [NormedAddCommGroup H] [InnerProductSpace ℝ H] [CompleteSpace H] [NormedAddCommGroup K'] [InnerProductSpace ℝ K'] [CompleteSpace K'] {f : K' → ℝ} {G : H → K'} {G' : H →L[ℝ] K'} {x : H} {U : Set K'} {L : NNReal} (hG : HasStrictFDerivAt G G' x) (hU : U ∈ nhds (G x)) (hf : LipschitzOnWith L f U) :

    Chain rule Clarke, Chapter 2: ∂_C (f ∘ G) x ⊆ G'† (∂_C f (G x)) for G strictly differentiable at x and f Lipschitz near G x.

    Chain rule with a bounded linear inner map: ∂_C (f ∘ A) x ⊆ A† (∂_C f (A x)) for f Lipschitz near A x Clarke, Chapter 2.

    theorem ConvexAnalysis.image_adjoint_subset_clarkeSubdifferential_comp {H : Type u_1} {K' : Type u_2} [NormedAddCommGroup H] [InnerProductSpace ℝ H] [CompleteSpace H] [NormedAddCommGroup K'] [InnerProductSpace ℝ K'] [CompleteSpace K'] {f : K' → ℝ} {G : H → K'} {G' : H →L[ℝ] K'} {x : H} (h : ∀ (v : H), clarkeDeriv f (G x) (G' v) ≤ clarkeDeriv (f ∘ G) x v) :

    If f°(G x; G' v) ≤ (f ∘ G)°(x; v) in every direction v, then G'† (∂_C f (G x)) ⊆ ∂_C (f ∘ G) x; with the chain rule this gives equality.

    theorem ConvexAnalysis.clarkeSubdifferential_comp_eq_of_surjective {H : Type u_1} {K' : Type u_2} [NormedAddCommGroup H] [InnerProductSpace ℝ H] [CompleteSpace H] [NormedAddCommGroup K'] [InnerProductSpace ℝ K'] [CompleteSpace K'] {f : K' → ℝ} {G : H → K'} {G' : H →L[ℝ] K'} {x : H} {U : Set K'} {L : NNReal} (hG : HasStrictFDerivAt G G' x) (hG' : Function.Surjective ⇑G') (hU : U ∈ nhds (G x)) (hf : LipschitzOnWith L f U) :

    Chain rule with equality for a strictly differentiable G with surjective derivative Clarke, Chapter 2: ∂_C (f ∘ G) x = G'† (∂_C f (G x)) for f Lipschitz near G x; no regularity is needed.

    theorem ConvexAnalysis.clarkeSubdifferential_comp_eq_of_clarkeRegularAt {H : Type u_1} {K' : Type u_2} [NormedAddCommGroup H] [InnerProductSpace ℝ H] [CompleteSpace H] [NormedAddCommGroup K'] [InnerProductSpace ℝ K'] [CompleteSpace K'] {f : K' → ℝ} {G : H → K'} {G' : H →L[ℝ] K'} {x : H} {U : Set K'} {L : NNReal} (hG : HasStrictFDerivAt G G' x) (hU : U ∈ nhds (G x)) (hf : LipschitzOnWith L f U) (hr : ClarkeRegularAt f (G x)) :

    Chain rule with equality under regularity Clarke, Chapter 2: ∂_C (f ∘ G) x = G'† (∂_C f (G x)) for G strictly differentiable at x and f Lipschitz near G x and regular at G x; f ∘ G is regular at x as well (ClarkeRegularAt.comp).

    theorem ConvexAnalysis.clarkeSubdifferential_comp_eq_of_clarkeRegularAt_neg {H : Type u_1} {K' : Type u_2} [NormedAddCommGroup H] [InnerProductSpace ℝ H] [CompleteSpace H] [NormedAddCommGroup K'] [InnerProductSpace ℝ K'] [CompleteSpace K'] {f : K' → ℝ} {G : H → K'} {G' : H →L[ℝ] K'} {x : H} {U : Set K'} {L : NNReal} (hG : HasStrictFDerivAt G G' x) (hU : U ∈ nhds (G x)) (hf : LipschitzOnWith L f U) (hr : ClarkeRegularAt (-f) (G x)) :

    Chain rule with equality if -f is regular at G x Clarke, Chapter 2: ∂_C (f ∘ G) x = G'† (∂_C f (G x)) for G strictly differentiable at x and f Lipschitz near G x.

    theorem ConvexAnalysis.clarkeSubdifferential_comp_eq_of_convexOn {H : Type u_1} {K' : Type u_2} [NormedAddCommGroup H] [InnerProductSpace ℝ H] [CompleteSpace H] [NormedAddCommGroup K'] [InnerProductSpace ℝ K'] [CompleteSpace K'] {f : K' → ℝ} {G : H → K'} {G' : H →L[ℝ] K'} {x : H} (hG : HasStrictFDerivAt G G' x) (hf : ConvexOn ℝ Set.univ f) (hfc : ContinuousAt f (G x)) :
    clarkeSubdifferential (f ∘ G) x = ⇑(ContinuousLinearMap.adjoint G') '' subdifferential (fun (y : K') => ↑(f y)) (G x)

    Chain rule for a convex outer function Clarke, Chapter 2: for G strictly differentiable at x and f convex and continuous at G x, ∂_C (f ∘ G) x = G'† (∂ f (G x)), with the subdifferential of convex analysis on the right.