Documentation

ConvexAnalysis.MoreauEnvelope

The Moreau envelope #

The Moreau envelope e_γ f x = ⨅ y, f y + ‖y - x‖² / (2γ) of f : H → EReal. For a proper lower semicontinuous convex f on a real Hilbert space it is a real valued convex C¹ function with a γ⁻¹-Lipschitz gradient (x - prox_{γf} x) / γ, and it has the same minimizers as f.

Main definitions #

Main statements #

For every f and γ > 0:

For convex f:

With γ = 1, for every f:

For proper lower semicontinuous convex f, γ > 0 and complete H, with prox_{γf} = prox (fun y ↦ (γ : EReal) * f y):

Implementation notes #

Differentiability follows from a sandwich: with p = prox_{γf} x and g = (x - p) / γ, 0 ≤ e (x + h) - e x - ⟪g, h⟫ ≤ ‖h‖² / (2γ). The upper bound is the descent inequality (p is a candidate at x + h), the lower bound says that g is a subgradient of the envelope. Convexity is proved on the epigraph: near-optimal points y₁, y₂ for x₁, x₂ give the candidate a y₁ + b y₂ for a x₁ + b x₂, and ‖·‖² is convex.

References #

Tags #

Moreau envelope, Moreau–Yosida regularization, proximal operator, Moreau's identity, infimal convolution, smoothing

noncomputable def ConvexAnalysis.moreauEnvelope {H : Type u_1} [NormedAddCommGroup H] (γ : ℝ) (f : H → EReal) (x : H) :

The Moreau envelope e_γ f x = ⨅ y, f y + ‖y - x‖² / (2γ) BC, Definition 12.20. It is meant for γ > 0; for γ = 0 Lean's a / 0 = 0 makes it the constant ⨅ y, f y (ConvexAnalysis.moreauEnvelope_zero).

Equations
Instances For
    theorem ConvexAnalysis.moreauEnvelope_le_add {H : Type u_1} [NormedAddCommGroup H] (γ : ℝ) (f : H → EReal) (x y : H) :
    moreauEnvelope γ f x ≤ f y + ↑(‖y - x‖ ^ 2 / (2 * γ))

    Every y gives an upper bound for the envelope at x.

    theorem ConvexAnalysis.moreauEnvelope_zero {H : Type u_1} [NormedAddCommGroup H] (f : H → EReal) (x : H) :
    moreauEnvelope 0 f x = ⨅ (y : H), f y

    At γ = 0, where Lean's a / 0 = 0 applies, the envelope is the constant ⨅ y, f y.

    theorem ConvexAnalysis.moreauEnvelope_le {H : Type u_1} [NormedAddCommGroup H] (γ : ℝ) (f : H → EReal) (x : H) :
    moreauEnvelope γ f x ≤ f x

    The envelope lies below the function.

    theorem ConvexAnalysis.iInf_moreauEnvelope {H : Type u_1} [NormedAddCommGroup H] {γ : ℝ} (hγ : 0 ≤ γ) (f : H → EReal) :
    ⨅ (x : H), moreauEnvelope γ f x = ⨅ (x : H), f x

    The envelope has the same infimum as the function, for γ ≥ 0.

    theorem ConvexAnalysis.moreauEnvelope_anti {H : Type u_1} [NormedAddCommGroup H] {γ₁ γ₂ : ℝ} (h₁ : 0 < γ₁) (h : γ₁ ≤ γ₂) (f : H → EReal) (x : H) :
    moreauEnvelope γ₂ f x ≤ moreauEnvelope γ₁ f x

    The envelope decreases as γ grows.

    theorem ConvexAnalysis.antitoneOn_moreauEnvelope {H : Type u_1} [NormedAddCommGroup H] (f : H → EReal) (x : H) :
    AntitoneOn (fun (γ : ℝ) => moreauEnvelope γ f x) (Set.Ioi 0)

    The Moreau envelope at x increases as γ > 0 decreases.

    theorem ConvexAnalysis.moreauEnvelope_eq_infimalConvolution {H : Type u_1} [NormedAddCommGroup H] (γ : ℝ) (f : H → EReal) :
    moreauEnvelope γ f = infimalConvolution f fun (z : H) => ↑(‖z‖ ^ 2 / (2 * γ))

    The Moreau envelope is the infimal convolution of f with ‖·‖² / (2γ) BC, Definition 12.20.

    theorem ConvexAnalysis.moreauEnvelope_lt_top {H : Type u_1} [NormedAddCommGroup H] {f : H → EReal} (γ : ℝ) {z : H} (hz : f z < ⊤) (x : H) :

    The envelope is less than ⊤ everywhere if f is somewhere less than ⊤, for every γ.

    theorem ConvexAnalysis.isMinOn_moreauEnvelope_of_isMinOn {H : Type u_1} [NormedAddCommGroup H] {f : H → EReal} {γ : ℝ} {x : H} (hγ : 0 ≤ γ) (h : IsMinOn f Set.univ x) :

    Minimizers of f minimize the envelope, for γ ≥ 0.

    theorem ConvexAnalysis.IsProxAt.moreauEnvelope_eq {H : Type u_1} [NormedAddCommGroup H] {f : H → EReal} {γ : ℝ} {p x : H} (hγ : 0 < γ) (h : IsProxAt (fun (y : H) => ↑γ * f y) p x) :
    moreauEnvelope γ f x = f p + ↑(‖p - x‖ ^ 2 / (2 * γ))

    A proximal point of γ f at x attains the envelope, for every f.

    theorem ConvexAnalysis.IsProxAt.moreauEnvelope_le_add_inner {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace ℝ H] {f : H → EReal} {γ : ℝ} {p x : H} (hγ : 0 < γ) (h : IsProxAt (fun (y : H) => ↑γ * f y) p x) (y : H) :
    moreauEnvelope γ f y ≤ moreauEnvelope γ f x + ↑(inner ℝ (γ⁻¹ • (x - p)) (y - x) + ‖y - x‖ ^ 2 / (2 * γ))

    Descent inequality, for every f: if p is a proximal point of γ f at x, then e y ≤ e x + ⟪(x - p) / γ, y - x⟫ + ‖y - x‖² / (2γ).

    theorem ConvexAnalysis.HasSubgradientAt.hasSubgradientAt_moreauEnvelope {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace ℝ H] {f : H → EReal} {γ : ℝ} {p x : H} (hγ : 0 < γ) (h : HasSubgradientAt f (γ⁻¹ • (x - p)) p) :

    If (x - p) / γ ∈ ∂f p, it is a subgradient of the envelope at x, for every f.

    theorem ConvexAnalysis.fenchelConjugate_moreauEnvelope {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace ℝ H] {γ : ℝ} (hγ : 0 < γ) (f : H → EReal) (u : H) :

    The conjugate of the Moreau envelope: (e_γ f)* = f* + γ ‖·‖² / 2, for every f and γ > 0 BC, Proposition 13.24 (there for f with values in ]-∞, +∞]).

    theorem ConvexAnalysis.HasSubgradientAt.moreauEnvelope_one_eq {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace ℝ H] {f : H → EReal} {p x : H} (h : HasSubgradientAt f (x - p) p) :
    moreauEnvelope 1 f x = f p + ↑(‖p - x‖ ^ 2 / 2)

    With γ = 1: if x - p ∈ ∂f p, the envelope at x is attained at p, for every f.

    Moreau's identity e₁ f x + e₁ f* x = ‖x‖² / 2 BC, Theorem 14.3, at every x with x - p ∈ ∂f p for some p, for every f. [BC17] states it at every x for proper lower semicontinuous convex f; this pointwise form implies it.

    theorem ConvexAnalysis.ConvexFun.moreauEnvelope_eq_self_iff {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace ℝ H] {f : H → EReal} {γ : ℝ} (hf : ConvexFun f) (hp : IsProper f) (hγ : 0 < γ) {x : H} :

    e_γ f x = f x iff x minimizes f, for proper convex f BC, Proposition 17.5 (there also for lower semicontinuous f).

    The Moreau envelope of a convex function is convex, for every γ ≥ 0: it is the infimal convolution of f with the convex function ‖·‖² / (2γ), and BC, Proposition 12.11 (there for convex functions with values in ]-∞, +∞]) says that infimal convolutions of convex functions are convex. No lower semicontinuity, properness or completeness is needed. At γ = 0 the envelope is the constant ⨅ y, f y (ConvexAnalysis.moreauEnvelope_zero).

    theorem ConvexAnalysis.isMinOn_moreauEnvelope_iff {H : Type u_1} [NormedAddCommGroup H] {f : H → EReal} {γ : ℝ} (hγ : 0 < γ) (hbot : ⊥ < ⨅ (y : H), f y) {x : H} (hlsc : LowerSemicontinuousAt f x) :

    The Moreau envelope and f have the same minimizers, for γ > 0 and every f with ⨅ f > ⊥ that is lower semicontinuous at the point; no convexity is needed, while BC, Proposition 17.5 states it for proper lower semicontinuous convex f. A minimizer x of the envelope has e_γ f x = ⨅ f; if f x > ⨅ f, then f > c > ⨅ f near x and the quadratic term is at least δ² / (2γ) away from x, so e_γ f x > ⨅ f. Some bound ⨅ f > ⊥ is needed: if f y = ⊥ somewhere, then e_γ f ≡ ⊥.

    theorem ConvexAnalysis.ConvexFun.moreauEnvelope_eq {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace ℝ H] {f : H → EReal} {γ : ℝ} [CompleteSpace H] (hf : ConvexFun f) (hlsc : LowerSemicontinuous f) (hγ : 0 < γ) (x : H) :
    moreauEnvelope γ f x = f (prox (fun (y : H) => ↑γ * f y) x) + ↑(‖prox (fun (y : H) => ↑γ * f y) x - x‖ ^ 2 / (2 * γ))

    The infimum in the Moreau envelope is attained at prox_{γf} x BC, Definition 12.23, Remark 12.24.

    theorem ConvexAnalysis.ConvexFun.moreauEnvelope_eq_coe {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace ℝ H] {f : H → EReal} {γ : ℝ} [CompleteSpace H] (hf : ConvexFun f) (hlsc : LowerSemicontinuous f) (hp : IsProper f) (hγ : 0 < γ) (x : H) :

    The Moreau envelope is real valued.

    theorem ConvexAnalysis.ConvexFun.toReal_moreauEnvelope {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace ℝ H] {f : H → EReal} {γ : ℝ} [CompleteSpace H] (hf : ConvexFun f) (hlsc : LowerSemicontinuous f) (hp : IsProper f) (hγ : 0 < γ) (x : H) :
    (moreauEnvelope γ f x).toReal = (f (prox (fun (y : H) => ↑γ * f y) x)).toReal + ‖prox (fun (y : H) => ↑γ * f y) x - x‖ ^ 2 / (2 * γ)

    The value of the envelope as a real number: f (prox_{γf} x) + ‖prox_{γf} x - x‖² / (2γ).

    theorem ConvexAnalysis.ConvexFun.hasSubgradientAt_moreauEnvelope {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace ℝ H] {f : H → EReal} {γ : ℝ} [CompleteSpace H] (hf : ConvexFun f) (hlsc : LowerSemicontinuous f) (hp : IsProper f) (hγ : 0 < γ) (x : H) :
    HasSubgradientAt (moreauEnvelope γ f) (γ⁻¹ • (x - prox (fun (y : H) => ↑γ * f y) x)) x

    (x - prox_{γf} x) / γ ∈ ∂(e_γ f) x.

    theorem ConvexAnalysis.ConvexFun.convexOn_moreauEnvelope {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace ℝ H] {f : H → EReal} {γ : ℝ} [CompleteSpace H] (hf : ConvexFun f) (hlsc : LowerSemicontinuous f) (hp : IsProper f) (hγ : 0 < γ) :
    ConvexOn ℝ Set.univ fun (y : H) => (moreauEnvelope γ f y).toReal

    The Moreau envelope is convex, as a real valued function.

    theorem ConvexAnalysis.ConvexFun.hasGradientAt_moreauEnvelope {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace ℝ H] {f : H → EReal} {γ : ℝ} [CompleteSpace H] (hf : ConvexFun f) (hlsc : LowerSemicontinuous f) (hp : IsProper f) (hγ : 0 < γ) (x : H) :
    HasGradientAt (fun (y : H) => (moreauEnvelope γ f y).toReal) (γ⁻¹ • (x - prox (fun (y : H) => ↑γ * f y) x)) x

    The Moreau envelope is Fréchet differentiable with gradient (x - prox_{γf} x) / γ BC, Proposition 12.30.

    theorem ConvexAnalysis.ConvexFun.gradient_moreauEnvelope {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace ℝ H] {f : H → EReal} {γ : ℝ} [CompleteSpace H] (hf : ConvexFun f) (hlsc : LowerSemicontinuous f) (hp : IsProper f) (hγ : 0 < γ) :
    (gradient fun (y : H) => (moreauEnvelope γ f y).toReal) = fun (x : H) => γ⁻¹ • (x - prox (fun (y : H) => ↑γ * f y) x)

    The gradient of the Moreau envelope as a function.

    The gradient of the Moreau envelope is γ⁻¹-Lipschitz BC, Proposition 12.30.

    theorem ConvexAnalysis.ConvexFun.contDiff_one_moreauEnvelope {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace ℝ H] {f : H → EReal} {γ : ℝ} [CompleteSpace H] (hf : ConvexFun f) (hlsc : LowerSemicontinuous f) (hp : IsProper f) (hγ : 0 < γ) :
    ContDiff ℝ 1 fun (y : H) => (moreauEnvelope γ f y).toReal

    The Moreau envelope is continuously differentiable.

    The Moreau envelope and f have the same minimizers BC, Proposition 17.5. Here ⨅ f = ⨅ e_γ f is attained if the envelope has a minimizer, and the envelope is real valued, so ConvexAnalysis.isMinOn_moreauEnvelope_iff applies.

    Moreau's identity for proper lower semicontinuous convex f, at every x.