Documentation

ConvexAnalysis.ClarkeGradientLimits

Clarke's generalized gradient as the convex hull of limits of gradients #

For f : H → ℝ Lipschitz near x in a finite-dimensional real inner product space, f is differentiable almost everywhere near x (Rademacher's theorem), and Clarke's generalized gradient is the convex hull of the limits lim ∇f (x k) along sequences x k → x that avoid a given null set S and the points where f is not differentiable Clarke, Chapter 2.

Main definitions #

Main statements #

Implementation notes #

The proof of f°(x; v) ≤ c follows Clarke. For almost every base point y the line s ↦ y + s • v meets the null set in a null set of parameters (ConvexAnalysis.ae_ae_add_smul_notMem, Tonelli for (y, s) ↦ y + s • v and translation invariance of the Haar measure). Along such a line, s ↦ f (y + s • v) is Lipschitz, hence absolutely continuous, so the fundamental theorem of calculus for absolutely continuous functions (AbsolutelyContinuousOnInterval.integral_deriv_eq_sub) gives f (y + t • v) - f y = ∫ s in 0..t, ⟪v, ∇f (y + s • v)⟫ ≤ c t. Base points with this property are dense, and f is continuous, so the inequality holds for every y near x.

References #

Tags #

Clarke generalized gradient, limits of gradients, Rademacher's theorem, locally Lipschitz function, nonsmooth analysis

def ConvexAnalysis.gradientLimits {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace ℝ H] [CompleteSpace H] (f : H → ℝ) (x : H) (S : Set H) :
Set H

The limits lim ∇f (x k) along sequences x k → x of points outside S at which f is differentiable.

Equations
  • One or more equations did not get rendered due to their size.
Instances For
    theorem ConvexAnalysis.mem_gradientLimits {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace ℝ H] {f : H → ℝ} {x u : H} {S : Set H} [CompleteSpace H] :
    u ∈ gradientLimits f x S ↔ ∃ (xs : ℕ → H), Filter.Tendsto xs Filter.atTop (nhds x) ∧ (∀ (k : ℕ), xs k ∉ S ∧ DifferentiableAt ℝ f (xs k)) ∧ Filter.Tendsto (fun (k : ℕ) => gradient f (xs k)) Filter.atTop (nhds u)

    Membership in gradientLimits f x S, unfolded.

    theorem ConvexAnalysis.mem_gradientLimits_iff_forall_exists {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace ℝ H] {f : H → ℝ} {x u : H} {S : Set H} [CompleteSpace H] :
    u ∈ gradientLimits f x S ↔ ∀ ε > 0, ∃ y ∉ S, DifferentiableAt ℝ f y ∧ dist y x < ε ∧ dist (gradient f y) u < ε

    u is a limit of gradients iff there are points y ∉ S, arbitrarily close to x, where f is differentiable with ∇f y arbitrarily close to u.

    The set of limits of gradients is closed.

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

    For f Lipschitz with constant K near x, the limits of gradients have norm at most K.

    theorem ConvexAnalysis.mem_clarkeSubdifferential_of_tendsto_gradient {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace ℝ H] {f : H → ℝ} {x u : H} [CompleteSpace H] {ι : Type u_2} {l : Filter ι} [l.NeBot] {xs : ι → H} (hx : Filter.Tendsto xs l (nhds x)) (hd : ∀ᶠ (i : ι) in l, DifferentiableAt ℝ f (xs i)) (hu : Filter.Tendsto (fun (i : ι) => gradient f (xs i)) l (nhds u)) :

    Limits of gradients lie in Clarke's generalized gradient: if x i → x, f is differentiable at x i and ∇f (x i) → u, then u ∈ ∂_C f x Clarke, Chapter 2. No Lipschitz hypothesis is needed; this is the closed graph of ∂_C f.

    The convex hull of the limits of gradients lies in Clarke's generalized gradient, for every f and S.

    theorem ConvexAnalysis.limsup_inner_gradient_le_clarkeDeriv {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace ℝ H] [CompleteSpace H] (f : H → ℝ) (x : H) (S : Set H) (v : H) :
    Filter.limsup (fun (y : H) => ↑(inner ℝ (gradient f y) v)) (nhdsWithin x {y : H | y ∉ S ∧ DifferentiableAt ℝ f y}) ≤ clarkeDeriv f x v

    The upper limit of ⟪∇f y, v⟫ as y → x through the points outside S at which f is differentiable is at most f°(x; v), for every f and S: ∇f y ∈ ∂_C f y, and y ↦ f°(y; v) is upper semicontinuous.

    theorem ConvexAnalysis.sub_le_of_ae_inner_gradient_le {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace ℝ H] {f : H → ℝ} {v : H} {K : NNReal} [CompleteSpace H] {y : H} {t c : ℝ} (ht : 0 ≤ t) {B : Set H} (hfB : LipschitzOnWith K f B) (hseg : ∀ s ∈ Set.Icc 0 t, y + s • v ∈ B) (hae : ∀ᵐ (s : ℝ), s ∈ Set.Icc 0 t → DifferentiableAt ℝ f (y + s • v) ∧ inner ℝ v (gradient f (y + s • v)) ≤ c) :
    f (y + t • v) - f y ≤ c * t

    Along a segment on which f is Lipschitz and ⟪v, ∇f⟫ ≤ c almost everywhere, f (y + t • v) - f y ≤ c t: the fundamental theorem of calculus for the absolutely continuous function s ↦ f (y + s • v).

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

    In finite dimension, the limits of gradients of a function Lipschitz near x form a compact set.

    theorem ConvexAnalysis.ae_ae_add_smul_notMem {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace ℝ H] [FiniteDimensional ℝ H] [MeasurableSpace H] [BorelSpace H] {μ : MeasureTheory.Measure H} [μ.IsAddHaarMeasure] {N : Set H} (hN : μ N = 0) (v : H) :
    ∀ᵐ (y : H) ∂μ, ∀ᵐ (s : ℝ), y + s • v ∉ N

    Fubini along lines: for a null set N and a direction v, for almost every y the line s ↦ y + s • v meets N in a null set of parameters. The case L = toSpanSingleton v of Mathlib's MeasureTheory.ae_ae_add_linearMap_mem_iff.

    Rademacher's theorem near x: the points of the interior of U at which a function Lipschitz on U is not differentiable form a null set.

    theorem ConvexAnalysis.clarkeDeriv_le_of_eventually_inner_gradient_le {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace ℝ H] {f : H → ℝ} {x v : H} {K : NNReal} {U : Set H} [FiniteDimensional ℝ H] [MeasurableSpace H] [BorelSpace H] {μ : MeasureTheory.Measure H} [μ.IsAddHaarMeasure] (hU : U ∈ nhds x) (hf : LipschitzOnWith K f U) {N : Set H} (hN : μ N = 0) {c : ℝ} (hc : ∀ᶠ (y : H) in nhds x, y ∉ N → DifferentiableAt ℝ f y → inner ℝ v (gradient f y) ≤ c) :
    clarkeDeriv f x v ≤ ↑c

    Clarke's directional derivative is controlled by gradients Clarke, Chapter 2: let f be Lipschitz near x in finite dimension and N a null set. If ⟪v, ∇f y⟫ ≤ c at every point y ∉ N near x at which f is differentiable, then f°(x; v) ≤ c. By Rademacher's theorem the points near x at which f is not differentiable form a null set (measure_interior_inter_setOf_not_differentiableAt), which is added to N.

    f°(x; v) is at most the support function of the limits of gradients at v: the largest ⟪w, v⟫ over the limits w of ∇f (x k) with x k → x outside a null set S Clarke, Chapter 2.

    Clarke's theorem on limits of gradients Clarke, Chapter 2: for f Lipschitz near x in a finite-dimensional real inner product space and any null set S, Clarke's generalized gradient is the convex hull of the limits lim ∇f (x k) along sequences x k → x of points outside S at which f is differentiable. By Rademacher's theorem (LipschitzOnWith.ae_differentiableWithinAt_of_mem) the points where f is not differentiable form a null set near x.

    Clarke's formula for f° through gradients Clarke, Chapter 2: for f Lipschitz near x in finite dimension and any null set S, f°(x; v) is the largest ⟪w, v⟫ over the limits w of ∇f (x k) with x k → x outside S. The form as an upper limit of ⟪∇f y, v⟫ is clarkeDeriv_eq_limsup_inner_gradient.

    theorem ConvexAnalysis.clarkeDeriv_eq_limsup_inner_gradient {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace ℝ H] {f : H → ℝ} {x : H} {K : NNReal} {U S : Set H} [FiniteDimensional ℝ H] [MeasurableSpace H] [BorelSpace H] {μ : MeasureTheory.Measure H} [μ.IsAddHaarMeasure] (hU : U ∈ nhds x) (hf : LipschitzOnWith K f U) (hS : μ S = 0) (v : H) :
    clarkeDeriv f x v = Filter.limsup (fun (y : H) => ↑(inner ℝ (gradient f y) v)) (nhdsWithin x {y : H | y ∉ S ∧ DifferentiableAt ℝ f y})

    Clarke's formula for f° as an upper limit of gradients Clarke, Chapter 2: for f Lipschitz near x in finite dimension and any null set S, f°(x; v) is the upper limit of ⟪∇f y, v⟫ as y → x through the points outside S at which f is differentiable.

    theorem ConvexAnalysis.nonempty_gradientLimits {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace ℝ H] {f : H → ℝ} {x : H} {K : NNReal} {U S : Set H} [FiniteDimensional ℝ H] [MeasurableSpace H] [BorelSpace H] {μ : MeasureTheory.Measure H} [μ.IsAddHaarMeasure] (hU : U ∈ nhds x) (hf : LipschitzOnWith K f U) (hS : μ S = 0) :

    For f Lipschitz near x in finite dimension, there are limits of gradients at x outside every null set.