Documentation

ConvexAnalysis.EpsSubdifferential

ε-subgradients and the Brøndsted–Rockafellar theorem #

An ε-subgradient of f : H → EReal at x is a u with f x + ⟪y - x, u⟫ - ε ≤ f y for all y R, Section 23, pp. 219–220. This file develops the ε-subdifferential ∂_ε f x and proves the Brøndsted–Rockafellar theorem: every ε-subgradient is close to a subgradient at a nearby point BC, Theorem 16.58. The ε-subdifferential itself is not treated in [BC17].

Main definitions #

Main statements #

Implementation notes #

ConvexAnalysis.HasEpsSubgradientAt is a structure that records that f x is finite, like ConvexAnalysis.HasSubgradientAt, so ∂_ε f x = ∅ whenever f x = ±∞, as for the subdifferential of a proper f in BC, Proposition 16.4, and ∂_0 f = ∂f. Without this condition every u would be an ε-subgradient at a point where f x = ⊥, and at every point of f ≡ ⊤. The difference ⟪y - x, u⟫ - ε is taken in ℝ.

The tolerance ε is a real number, not an ℝ≥0, like the other constants of the library: the statements need no coercions (ε / μ, √ε, Ekeland's principle), and nothing is lost, since ∂_ε f x = ∅ for ε < 0 and every ε-subgradient forces ε ≥ 0 (ConvexAnalysis.HasEpsSubgradientAt.nonneg). So the Brøndsted–Rockafellar theorem has no hypothesis on ε, and none on properness. The argument order ConvexAnalysis.HasEpsSubgradientAt ε f u x and epsSubdifferential ε f x follows the notation ∂_ε f(x), as in Mathlib's LipschitzWith K f.

The Brøndsted–Rockafellar theorem is proved by Ekeland's principle (ConvexAnalysis.exists_dist_le_forall_lt_add_mul_dist) for f - ⟪·, u₀⟫, which x₀ minimizes up to ε, with radius ε / μ. The point x it gives minimizes f + μ ‖· - x‖ - ⟪·, u₀⟫, and the sum rule with the continuous summand (ConvexAnalysis.subdifferential_add_of_continuousAt_right) writes 0 as u + z with u ∈ ∂f x and ‖z + u₀‖ ≤ μ.

Mathlib has no ε-subdifferential and no Brøndsted–Rockafellar theorem, and no open pull request for them (checked on 2026-11-30). optlib has neither. ReasBook defines approximate subgradients for Rockafellar's book R, Section 23 on Fin n → ℝ, with dual vectors, ε : ℝ≥0 and convexity of f as part of the definition; it has no Brøndsted–Rockafellar theorem. Nothing is adapted from either library.

References #

Tags #

ε-subgradient, ε-subdifferential, approximate subgradient, Brøndsted–Rockafellar theorem, Ekeland's variational principle, density of the domain of the subdifferential

structure ConvexAnalysis.HasEpsSubgradientAt {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace ℝ H] (ε : ℝ) (f : H → EReal) (u x : H) :

u is an ε-subgradient of f at x R, Section 23, p. 219: the value f x is finite and the affine function y ↦ f x + ⟪y - x, u⟫ - ε lies below f. Rockafellar defines it for convex f and ε > 0; here f and ε are arbitrary.

  • mem_effectiveDomain : x ∈ effectiveDomain f

    The value at the base point is less than ⊤.

  • bot_lt : ⊥ < f x

    The value at the base point is greater than ⊥.

  • le (y : H) : f x + ↑(inner ℝ (y - x) u - ε) ≤ f y

    The affine minorant, lowered by ε.

Instances For
    theorem ConvexAnalysis.hasEpsSubgradientAt_iff {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace ℝ H] (ε : ℝ) (f : H → EReal) (u x : H) :
    HasEpsSubgradientAt ε f u x ↔ x ∈ effectiveDomain f ∧ ⊥ < f x ∧ ∀ (y : H), f x + ↑(inner ℝ (y - x) u - ε) ≤ f y

    u is an ε-subgradient of f at x iff f x is finite and f x + ⟪y - x, u⟫ - ε ≤ f y for every y.

    def ConvexAnalysis.epsSubdifferential {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace ℝ H] (ε : ℝ) (f : H → EReal) (x : H) :
    Set H

    The ε-subdifferential ∂_ε f x: the set of ε-subgradients of f at x.

    Equations
    Instances For
      @[simp]

      Membership in the ε-subdifferential.

      theorem ConvexAnalysis.HasEpsSubgradientAt.exists_coe {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace ℝ H] {f : H → EReal} {ε : ℝ} {u x : H} (h : HasEpsSubgradientAt ε f u x) :
      ∃ (r : ℝ), f x = ↑r

      At a point with an ε-subgradient, the value of f is a real number.

      theorem ConvexAnalysis.hasEpsSubgradientAt_iff_of_eq_coe {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace ℝ H] {f : H → EReal} {ε : ℝ} {u x : H} {r : ℝ} (hr : f x = ↑r) :
      HasEpsSubgradientAt ε f u x ↔ ∀ (y : H), ↑(r + inner ℝ (y - x) u - ε) ≤ f y

      The ε-subgradient inequality when f x is the real number r.

      @[simp]
      theorem ConvexAnalysis.hasEpsSubgradientAt_coe_iff {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace ℝ H] {ε : ℝ} {u x : H} {f : H → ℝ} :
      HasEpsSubgradientAt ε (fun (y : H) => ↑(f y)) u x ↔ ∀ (y : H), f x + inner ℝ (y - x) u - ε ≤ f y

      ε-subgradients of a real valued function.

      theorem ConvexAnalysis.HasEpsSubgradientAt.nonneg {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace ℝ H] {f : H → EReal} {ε : ℝ} {u x : H} (h : HasEpsSubgradientAt ε f u x) :
      0 ≤ ε

      An ε-subgradient exists only for ε ≥ 0.

      theorem ConvexAnalysis.epsSubdifferential_eq_empty_of_neg {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace ℝ H] {f : H → EReal} {ε : ℝ} {x : H} (hε : ε < 0) :

      ∂_ε f x = ∅ for ε < 0.

      theorem ConvexAnalysis.HasEpsSubgradientAt.isProper {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace ℝ H] {f : H → EReal} {ε : ℝ} {u x : H} (h : HasEpsSubgradientAt ε f u x) :

      A function with an ε-subgradient somewhere is proper.

      ∂_ε f x is empty where f x = ⊤.

      ∂_ε f x is empty where f x = ⊥.

      @[simp]

      0-subgradients are subgradients.

      @[simp]

      ∂_0 f x = ∂f x.

      theorem ConvexAnalysis.HasEpsSubgradientAt.mono {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace ℝ H] {f : H → EReal} {ε δ : ℝ} {u x : H} (h : HasEpsSubgradientAt ε f u x) (hεδ : ε ≤ δ) :

      ε-subgradients are δ-subgradients for ε ≤ δ.

      The ε-subdifferential grows with ε (R, Section 23, p. 220).

      theorem ConvexAnalysis.epsSubdifferential_mono {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace ℝ H] {f : H → EReal} {ε δ : ℝ} {x : H} (h : ε ≤ δ) :

      ∂_ε f x grows with ε.

      theorem ConvexAnalysis.HasSubgradientAt.hasEpsSubgradientAt {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace ℝ H] {f : H → EReal} {ε : ℝ} {u x : H} (h : HasSubgradientAt f u x) (hε : 0 ≤ ε) :

      A subgradient is an ε-subgradient for every ε ≥ 0.

      ∂f x ⊆ ∂_ε f x for ε ≥ 0.

      u is a subgradient iff it is an ε-subgradient for every ε > 0.

      theorem ConvexAnalysis.iInter_epsSubdifferential {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace ℝ H] (f : H → EReal) (x : H) :
      ⋂ (ε : ℝ), ⋂ (_ : ε > 0), epsSubdifferential ε f x = subdifferential f x

      ∂f x = ⋂ ε > 0, ∂_ε f x (R, Section 23, p. 220).

      theorem ConvexAnalysis.zero_mem_epsSubdifferential_iff {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace ℝ H] {f : H → EReal} {ε : ℝ} {x : H} :
      0 ∈ epsSubdifferential ε f x ↔ x ∈ effectiveDomain f ∧ ⊥ < f x ∧ ∀ (y : H), f x ≤ f y + ↑ε

      Approximate Fermat rule: 0 ∈ ∂_ε f x iff f x is finite and x minimizes f up to ε.

      theorem ConvexAnalysis.HasEpsSubgradientAt.add {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace ℝ H] {f g : H → EReal} {ε δ : ℝ} {u v x : H} (hf : HasEpsSubgradientAt ε f u x) (hg : HasEpsSubgradientAt δ g v x) :
      HasEpsSubgradientAt (ε + δ) (f + g) (u + v) x

      The sum of an ε-subgradient of f and a δ-subgradient of g is an (ε + δ)-subgradient of f + g.

      The ε-subdifferential is convex (R, Section 23, p. 220).

      The ε-subdifferential is closed (R, Section 23, p. 220).

      The conjugate characterization #

      theorem ConvexAnalysis.hasEpsSubgradientAt_iff_fenchelConjugate_le {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace ℝ H] {f : H → EReal} {ε : ℝ} {u x : H} {r : ℝ} (hr : f x = ↑r) :
      HasEpsSubgradientAt ε f u x ↔ fenchelConjugate f u ≤ ↑(inner ℝ x u - r + ε)

      ε-subgradients through the conjugate: if f x = r, then u ∈ ∂_ε f x iff f* u ≤ ⟪x, u⟫ - r + ε.

      theorem ConvexAnalysis.hasEpsSubgradientAt_iff_add_fenchelConjugate_le {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace ℝ H] {f : H → EReal} {ε : ℝ} {u x : H} (hbot : ⊥ < f x) (hdom : (effectiveDomain f).Nonempty) :
      HasEpsSubgradientAt ε f u x ↔ f x + fenchelConjugate f u ≤ ↑(inner ℝ x u + ε)

      Approximate Fenchel–Young equality: if f x > ⊥ and the domain of f is nonempty (for example, if f x is finite), then u ∈ ∂_ε f x iff f x + f* u ≤ ⟪x, u⟫ + ε. Rockafellar notes this for convex f (R, Section 23, p. 220).

      For a proper f, u ∈ ∂_ε f x iff f x + f* u ≤ ⟪x, u⟫ + ε.

      theorem ConvexAnalysis.forall_nonempty_epsSubdifferential_iff {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace ℝ H] {f : H → EReal} {x : H} {r : ℝ} (hr : f x = ↑r) :

      f has ε-subgradients at a point x with f x finite for every ε > 0 iff f** x = f x. By the Fenchel–Moreau theorem this holds for lower semicontinuous convex f (ConvexFun.nonempty_epsSubdifferential).

      theorem ConvexAnalysis.ConvexFun.nonempty_epsSubdifferential {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace ℝ H] {f : H → EReal} {ε : ℝ} {x : H} [CompleteSpace H] (hf : ConvexFun f) (hlsc : LowerSemicontinuous f) (hx : x ∈ effectiveDomain f) (hbot : ⊥ < f x) (hε : 0 < ε) :

      A lower semicontinuous convex function has an ε-subgradient at every point where it is finite, for every ε > 0. The proof takes an affine minorant of f that lies above f x - ε at x (ConvexFun.exists_affine_minorant_of_lt); f never takes the value ⊥ since it is finite at x (ConvexFun.ne_bot_of_lowerSemicontinuous). Rockafellar does not state this; compare the proof of R, Theorem 23.6.

      ε-subgradients of the conjugate (for ε = 0 this is BC, Corollary 16.30 and R, Corollary 23.5.1): for a lower semicontinuous convex f, x ∈ ∂_ε f* u ↔ u ∈ ∂_ε f x. Both sides say f x + f* u ≤ ⟪x, u⟫ + ε, by the Fenchel–Moreau theorem f** = f. If f takes the value ⊥, then f* ≡ ⊤ and neither side holds.

      The Brøndsted–Rockafellar theorem #

      theorem ConvexAnalysis.HasEpsSubgradientAt.exists_mem_subdifferential_norm_sub_le {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace ℝ H] {f : H → EReal} {ε : ℝ} [CompleteSpace H] (hf : ConvexFun f) (hlsc : LowerSemicontinuous f) {u₀ x₀ : H} (h : HasEpsSubgradientAt ε f u₀ x₀) {μ : ℝ} (hμ : 0 < μ) :
      ∃ (x : H), ∃ u ∈ subdifferential f x, ‖x - x₀‖ ≤ ε / μ ∧ ‖u - u₀‖ ≤ μ ∧ f x + ↑(μ * ‖x - x₀‖) ≤ f x₀ + ↑(inner ℝ (x - x₀) u₀)

      Brøndsted–Rockafellar theorem BC, Theorem 16.58: let f be a lower semicontinuous convex function on a Hilbert space and u₀ an ε-subgradient of f at x₀. For every μ > 0 there is a subgradient u of f at a point x with ‖x - x₀‖ ≤ ε / μ and ‖u - u₀‖ ≤ μ. Moreover f x + μ ‖x - x₀‖ ≤ f x₀ + ⟪x - x₀, u₀⟫; with f x₀ + ⟪x - x₀, u₀⟫ - ε ≤ f x, from the ε-subgradient inequality, f x lies at most ε below f x₀ + ⟪x - x₀, u₀⟫.

      f is proper and ε ≥ 0 because it has an ε-subgradient. The proof applies Ekeland's principle to f - ⟪·, u₀⟫, which x₀ minimizes up to ε: the resulting point x minimizes f + μ ‖· - x‖ - ⟪·, u₀⟫, and the sum rule splits 0 into a subgradient u of f and a subgradient of the continuous part, which has norm at most μ after the shift by u₀.

      theorem ConvexAnalysis.HasEpsSubgradientAt.exists_mem_subdifferential_norm_sub_le_sqrt {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace ℝ H] {f : H → EReal} {ε : ℝ} [CompleteSpace H] (hf : ConvexFun f) (hlsc : LowerSemicontinuous f) {u₀ x₀ : H} (h : HasEpsSubgradientAt ε f u₀ x₀) :
      ∃ (x : H), ∃ u ∈ subdifferential f x, ‖x - x₀‖ ≤ √ε ∧ ‖u - u₀‖ ≤ √ε

      Brøndsted–Rockafellar theorem with μ = √ε: an ε-subgradient u₀ of a lower semicontinuous convex f at x₀ lies within √ε of a subgradient u of f at a point x within √ε of x₀.

      theorem ConvexAnalysis.HasEpsSubgradientAt.exists_mem_subdifferential_abs_toReal_sub_le {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace ℝ H] {f : H → EReal} {ε : ℝ} [CompleteSpace H] (hf : ConvexFun f) (hlsc : LowerSemicontinuous f) {u₀ x₀ : H} (h : HasEpsSubgradientAt ε f u₀ x₀) {μ : ℝ} (hμ : 0 < μ) :
      ∃ (x : H), ∃ u ∈ subdifferential f x, ‖x - x₀‖ ≤ ε / μ ∧ ‖u - u₀‖ ≤ μ ∧ |(f x).toReal - (f x₀).toReal| ≤ ε + ε / μ * ‖u₀‖

      Brøndsted–Rockafellar theorem with a bound on the values: the point x of HasEpsSubgradientAt.exists_mem_subdifferential_norm_sub_le also has |f x - f x₀| ≤ ε + (ε / μ) ‖u₀‖. Both values are finite, so toReal loses nothing.

      Density of the domain of ∂f #

      The points where a lower semicontinuous convex function has a subgradient are dense in its domain BC, Corollary 16.39: dom f ⊆ closure (dom ∂f). This is a corollary of the Brøndsted–Rockafellar theorem. The hypothesis that f never takes the value ⊥ cannot be dropped: otherwise f is ⊥ on its domain (ConvexFun.eq_bot_of_lowerSemicontinuous) and has no subgradient. It holds if f has one finite value (ConvexFun.ne_bot_of_lowerSemicontinuous).

      The closure of the domain of ∂f is the closure of the domain of f, for a lower semicontinuous convex f that never takes the value ⊥ (a hypothesis that cannot be dropped, see ConvexFun.effectiveDomain_subset_closure_setOf_nonempty_subdifferential).

      The range of ∂f is dense in the domain of f*, for a proper lower semicontinuous convex f: apply the density of dom ∂f* to f* and use ∂f* = (∂f)⁻¹.