Documentation

ConvexAnalysis.Algorithms

First-order methods #

Rates of convergence in the function values for the basic first-order methods of convex optimization on a real Hilbert space H: gradient descent, the proximal gradient method (ISTA), the proximal point method, FISTA and the subgradient method. The smooth part is a convex f : H → ℝ with an L-Lipschitz gradient, the nonsmooth part a proper lower semicontinuous convex g : H → EReal.

Main definitions #

Main statements #

For a convex f : H → ℝ with an L-Lipschitz gradient f' (L-smooth) and a step 0 < γ ≤ 1 / L (written γ L ≤ 1):

In the rates for ISTA, gradient descent, the proximal point method and the subgradient method the comparison point y is arbitrary; for a minimizer they are the usual rates for F - min F. FISTA with weights t (k + 1)² - t (k + 1) ≤ t k², Fejér monotonicity and the linear rate need a minimizer x⋆, given as IsMinOn (fun w ↦ (f w : EReal) + g w) univ x⋆; FISTA with t (k + 1)² - t (k + 1) = t k² does not. The rates compare finite values: they take g y = s and give g (x (N + 1)) = r, both real.

Gradient descent with steps in (0, 2 / L), which needs cocoercivity (Baillon–Haddad), is in Cocoercive.lean; convergence of the iterates (weak in Hilbert space, in norm in finite dimension) is in IterateConvergence.lean.

Implementation notes #

The step is parameterized by its size γ, like the gradient step x - γ f' x and the proximal point step prox_{γ g} x here and in BC, Chapter 28. The results for ISTA, gradient descent and the proximal point method hold for every 0 < γ ≤ 1 / L, also for L = 0; FISTA is stated with the step 1 / L, that is proxGradStep f' g L⁻¹, as in Beck, Theorem 10.34 and [BM26]. In names, ISTA (ista_) is the proximal gradient method with a step 0 < γ ≤ 1 / L; the same iteration with steps up to 2 / L, which needs cocoercivity, is called forward–backward (forwardBackward_, in Cocoercive.lean and IterateConvergence.lean).

References #

Tags #

first-order methods, gradient descent, proximal gradient method, ISTA, FISTA, proximal point method, subgradient method, descent lemma, rate of convergence

theorem ConvexAnalysis.descent_lemma {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace ℝ H] [CompleteSpace H] {f : H → ℝ} {f' : H → H} {L : ℝ} (hf' : ∀ (x : H), HasGradientAt f (f' x) x) (hL : ∀ (x y : H), ‖f' x - f' y‖ ≤ L * ‖x - y‖) (x y : H) :
f y ≤ f x + inner ℝ (f' x) (y - x) + L / 2 * ‖y - x‖ ^ 2

Descent lemma Beck, Lemma 5.7, BC, Lemma 2.64, (1.2.11) in Nesterov, Lemma 1.2.3: for f with an L-Lipschitz gradient f', f y ≤ f x + ⟪f' x, y - x⟫ + L / 2 ‖y - x‖². No convexity is needed; for convex f this is one of the equivalent conditions of BC, Theorem 18.15.

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

The proximal gradient step (forward–backward step) with step size γ, x⁺ = prox_{γ g} (x - γ f' x) BC, Chapter 28, Beck, Chapter 10.

Equations
Instances For
    theorem ConvexAnalysis.proxGradStep_zero {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace ℝ H] (f' : H → H) (γ : ℝ) (x : H) :
    proxGradStep f' 0 γ x = x - γ • f' x

    The proximal gradient step with g = 0 is the gradient step x - γ f' x.

    theorem ConvexAnalysis.isMinOn_coe_add_zero_iff {H : Type u_1} {f : H → ℝ} {z : H} :
    IsMinOn (fun (w : H) => ↑(f w) + 0 w) Set.univ z ↔ IsMinOn f Set.univ z

    The minimizers of f + 0 (the composite problem with g = 0) are the minimizers of f.

    theorem ConvexAnalysis.exists_coe_proxGradStep {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace ℝ H] [CompleteSpace H] {g : H → EReal} {γ : ℝ} (hg : ConvexFun g) (hglsc : LowerSemicontinuous g) (hgp : IsProper g) (hγ : 0 < γ) (f' : H → H) (x : H) :
    ∃ (r : ℝ), g (proxGradStep f' g γ x) = ↑r

    The proximal gradient step lies in the domain of g: g x⁺ is finite.

    theorem ConvexAnalysis.proxGradStep_le_linearization {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace ℝ H] [CompleteSpace H] {f : H → ℝ} {f' : H → H} {L : ℝ} {g : H → EReal} {γ : ℝ} (hf' : ∀ (x : H), HasGradientAt f (f' x) x) (hL : ∀ (x y : H), ‖f' x - f' y‖ ≤ L * ‖x - y‖) (hg : ConvexFun g) (hglsc : LowerSemicontinuous g) (hgp : IsProper g) (hγ : 0 < γ) (hγL : γ * L ≤ 1) (x : H) {y : H} {s : ℝ} (hy : g y = ↑s) :
    ∃ (r : ℝ), g (proxGradStep f' g γ x) = ↑r ∧ f (proxGradStep f' g γ x) + r ≤ f x + inner ℝ (f' x) (y - x) + s + (‖x - y‖ ^ 2 - ‖proxGradStep f' g γ x - y‖ ^ 2) / (2 * γ)

    Fundamental inequality of the proximal gradient step Beck, Theorem 10.16 (with the roles of x and y exchanged, and L = 1 / γ), with no convexity of f: for f with an L-Lipschitz gradient f', a proper lower semicontinuous convex g, a step 0 < γ ≤ 1 / L and every y with g y = s finite, the step x⁺ has g x⁺ = r finite and f x⁺ + r ≤ f x + ⟪f' x, y - x⟫ + s + (‖x - y‖² - ‖x⁺ - y‖²) / (2 γ).

    theorem ConvexAnalysis.proxGradStep_le {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace ℝ H] [CompleteSpace H] {f : H → ℝ} {f' : H → H} {L : ℝ} {g : H → EReal} {γ : ℝ} (hf : ConvexOn ℝ Set.univ f) (hf' : ∀ (x : H), HasGradientAt f (f' x) x) (hL : ∀ (x y : H), ‖f' x - f' y‖ ≤ L * ‖x - y‖) (hg : ConvexFun g) (hglsc : LowerSemicontinuous g) (hgp : IsProper g) (hγ : 0 < γ) (hγL : γ * L ≤ 1) (x : H) {y : H} {s : ℝ} (hy : g y = ↑s) :
    ∃ (r : ℝ), g (proxGradStep f' g γ x) = ↑r ∧ f (proxGradStep f' g γ x) + r ≤ f y + s + (‖x - y‖ ^ 2 - ‖proxGradStep f' g γ x - y‖ ^ 2) / (2 * γ)

    Fundamental inequality of the proximal gradient step: for convex f with an L-Lipschitz gradient f', a proper lower semicontinuous convex g, a step 0 < γ ≤ 1 / L and every y with g y = s finite, the step x⁺ has g x⁺ = r finite and f x⁺ + r ≤ f y + s + (‖x - y‖² - ‖x⁺ - y‖²) / (2 γ). This is Beck, Theorem 10.16 with the linearization error dropped by convexity, as in the proof of Beck, Theorem 10.21.

    theorem ConvexAnalysis.proxGradStep_le_self {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace ℝ H] [CompleteSpace H] {f : H → ℝ} {f' : H → H} {L : ℝ} {g : H → EReal} {γ : ℝ} (hf' : ∀ (x : H), HasGradientAt f (f' x) x) (hL : ∀ (x y : H), ‖f' x - f' y‖ ≤ L * ‖x - y‖) (hg : ConvexFun g) (hglsc : LowerSemicontinuous g) (hgp : IsProper g) (hγ : 0 < γ) (hγL : γ * L ≤ 1) {x : H} {s : ℝ} (hx : g x = ↑s) :
    ∃ (r : ℝ), g (proxGradStep f' g γ x) = ↑r ∧ f (proxGradStep f' g γ x) + r ≤ f x + s - ‖proxGradStep f' g γ x - x‖ ^ 2 / (2 * γ)

    Sufficient decrease of the proximal gradient step with a step 0 < γ ≤ 1 / L: F x⁺ ≤ F x - ‖x⁺ - x‖² / (2 γ) for F = f + g, with no convexity of f Beck, Corollary 10.18. It is a corollary of ConvexAnalysis.proxGradStep_le_sub_norm_sq in Cocoercive.lean, which holds for every step γ > 0 with the constant 1 / γ - L / 2 ≥ 1 / (2 γ).

    theorem ConvexAnalysis.le_of_strongConvexOn {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace ℝ H] [CompleteSpace H] {f : H → ℝ} {f' : H → H} {μ : ℝ} (hf : StrongConvexOn Set.univ μ f) (hf' : ∀ (x : H), HasGradientAt f (f' x) x) (x y : H) :
    f x + inner ℝ (f' x) (y - x) + μ / 2 * ‖y - x‖ ^ 2 ≤ f y

    The gradient inequality of a μ-strongly convex f: f x + ⟪f' x, y - x⟫ + μ / 2 ‖y - x‖² ≤ f y, the case s = univ of ConvexAnalysis.StrongConvexOn.add_hasGradientWithinAt_add_le.

    theorem ConvexAnalysis.proxGradStep_norm_sub_sq_le_of_strongConvexOn {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace ℝ H] [CompleteSpace H] {f : H → ℝ} {f' : H → H} {L : ℝ} {g : H → EReal} {γ μ : ℝ} (hf : StrongConvexOn Set.univ μ f) (hf' : ∀ (x : H), HasGradientAt f (f' x) x) (hL : ∀ (x y : H), ‖f' x - f' y‖ ≤ L * ‖x - y‖) (hg : ConvexFun g) (hglsc : LowerSemicontinuous g) (hgp : IsProper g) (hγ : 0 < γ) (hγL : γ * L ≤ 1) (x : H) {xs : H} (hxs : IsMinOn (fun (w : H) => ↑(f w) + g w) Set.univ xs) :
    ‖proxGradStep f' g γ x - xs‖ ^ 2 ≤ (1 - γ * μ) * ‖x - xs‖ ^ 2

    Contraction of the proximal gradient step for a μ-strongly convex f Beck, Theorem 10.29 (a) (one step, there with γ = 1 / L): for a step 0 < γ ≤ 1 / L and a minimizer x⋆ of F = f + g, ‖x⁺ - x⋆‖² ≤ (1 - γ μ) ‖x - x⋆‖².

    theorem ConvexAnalysis.proxGradStep_norm_sub_le {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace ℝ H] [CompleteSpace H] {f : H → ℝ} {f' : H → H} {L : ℝ} {g : H → EReal} {γ : ℝ} (hf : ConvexOn ℝ Set.univ f) (hf' : ∀ (x : H), HasGradientAt f (f' x) x) (hL : ∀ (x y : H), ‖f' x - f' y‖ ≤ L * ‖x - y‖) (hg : ConvexFun g) (hglsc : LowerSemicontinuous g) (hgp : IsProper g) (hγ : 0 < γ) (hγL : γ * L ≤ 1) (x : H) {xs : H} (hxs : IsMinOn (fun (w : H) => ↑(f w) + g w) Set.univ xs) :
    ‖proxGradStep f' g γ x - xs‖ ≤ ‖x - xs‖

    Fejér monotonicity of the proximal gradient step with a step 0 < γ ≤ 1 / L, with respect to a minimizer x⋆ of F = f + g: ‖x⁺ - x⋆‖ ≤ ‖x - x⋆‖, the case μ = 0 of the contraction Beck, Theorem 10.23. By the Baillon–Haddad theorem, the iterates are Fejér monotone also for steps γ ≤ 2 / L (ConvexAnalysis.forwardBackward_norm_sub_le).

    theorem ConvexAnalysis.ista_norm_sub_sq_le_of_strongConvexOn {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace ℝ H] [CompleteSpace H] {f : H → ℝ} {f' : H → H} {L : ℝ} {g : H → EReal} {γ μ : ℝ} (hf : StrongConvexOn Set.univ μ f) (hf' : ∀ (x : H), HasGradientAt f (f' x) x) (hL : ∀ (x y : H), ‖f' x - f' y‖ ≤ L * ‖x - y‖) (hg : ConvexFun g) (hglsc : LowerSemicontinuous g) (hgp : IsProper g) (hγ : 0 < γ) (hγL : γ * L ≤ 1) {x : ℕ → H} (hx : ∀ (k : ℕ), x (k + 1) = proxGradStep f' g γ (x k)) {xs : H} (hxs : IsMinOn (fun (w : H) => ↑(f w) + g w) Set.univ xs) (N : ℕ) :
    ‖x N - xs‖ ^ 2 ≤ (1 - γ * μ) ^ N * ‖x 0 - xs‖ ^ 2

    Linear convergence of the proximal gradient method for a μ-strongly convex f Beck, Theorem 10.29 (a) (there with γ = 1 / L): for a step 0 < γ ≤ 1 / L, x (k + 1) = prox_{γ g} (x k - γ f' (x k)) and a minimizer x⋆ of F = f + g, ‖x N - x⋆‖² ≤ (1 - γ μ)ᴺ ‖x 0 - x⋆‖².

    theorem ConvexAnalysis.ista_rate {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace ℝ H] [CompleteSpace H] {f : H → ℝ} {f' : H → H} {L : ℝ} {g : H → EReal} {γ : ℝ} (hf : ConvexOn ℝ Set.univ f) (hf' : ∀ (x : H), HasGradientAt f (f' x) x) (hL : ∀ (x y : H), ‖f' x - f' y‖ ≤ L * ‖x - y‖) (hg : ConvexFun g) (hglsc : LowerSemicontinuous g) (hgp : IsProper g) (hγ : 0 < γ) (hγL : γ * L ≤ 1) {x : ℕ → H} (hx : ∀ (k : ℕ), x (k + 1) = proxGradStep f' g γ (x k)) {y : H} {s : ℝ} (hy : g y = ↑s) (N : ℕ) :
    ∃ (r : ℝ), g (x (N + 1)) = ↑r ∧ f (x (N + 1)) + r - (f y + s) ≤ ‖x 0 - y‖ ^ 2 / (2 * γ * (↑N + 1))

    Rate of the proximal gradient method (ISTA) Beck, Theorem 10.21 (there with the step 1 / L̄, L̄ ≥ L): for a step 0 < γ ≤ 1 / L, the iteration x (k + 1) = prox_{γ g} (x k - γ f' (x k)) and any y with g y = s finite, f (x (N + 1)) + g (x (N + 1)) - (f y + s) ≤ ‖x 0 - y‖² / (2 γ (N + 1)). Beck states it for a minimizer y; here y is any point of the domain of g.

    theorem ConvexAnalysis.ista_rate_coe {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace ℝ H] [CompleteSpace H] {f : H → ℝ} {f' : H → H} {L γ : ℝ} (hf : ConvexOn ℝ Set.univ f) (hf' : ∀ (x : H), HasGradientAt f (f' x) x) (hL : ∀ (x y : H), ‖f' x - f' y‖ ≤ L * ‖x - y‖) {g : H → ℝ} (hg : ConvexOn ℝ Set.univ g) (hglsc : LowerSemicontinuous g) (hγ : 0 < γ) (hγL : γ * L ≤ 1) {x : ℕ → H} (hx : ∀ (k : ℕ), x (k + 1) = proxGradStep f' (fun (z : H) => ↑(g z)) γ (x k)) (y : H) (N : ℕ) :
    f (x (N + 1)) + g (x (N + 1)) - (f y + g y) ≤ ‖x 0 - y‖ ^ 2 / (2 * γ * (↑N + 1))

    ISTA for a real-valued convex g (such as λ ‖·‖₁), with no EReal in the statement: for a step 0 < γ ≤ 1 / L, f (x (N + 1)) + g (x (N + 1)) - (f y + g y) ≤ ‖x 0 - y‖² / (2 γ (N + 1)).

    theorem ConvexAnalysis.gradientDescent_rate {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace ℝ H] [CompleteSpace H] {f : H → ℝ} {f' : H → H} {L γ : ℝ} (hf : ConvexOn ℝ Set.univ f) (hf' : ∀ (x : H), HasGradientAt f (f' x) x) (hL : ∀ (x y : H), ‖f' x - f' y‖ ≤ L * ‖x - y‖) (hγ : 0 < γ) (hγL : γ * L ≤ 1) {x : ℕ → H} (hx : ∀ (k : ℕ), x (k + 1) = x k - γ • f' (x k)) (y : H) (N : ℕ) :
    f (x (N + 1)) - f y ≤ ‖x 0 - y‖ ^ 2 / (2 * γ * (↑N + 1))

    Rate of gradient descent with a step 0 < γ ≤ 1 / L, Beck, Theorem 10.21 with g = 0: for convex f with an L-Lipschitz gradient and x (k + 1) = x k - γ f' (x k), f (x (N + 1)) - f y ≤ ‖x 0 - y‖² / (2 γ (N + 1)) for every y.

    theorem ConvexAnalysis.proximalPoint_rate {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace ℝ H] [CompleteSpace H] {g : H → EReal} {γ : ℝ} (hg : ConvexFun g) (hglsc : LowerSemicontinuous g) (hgp : IsProper g) (hγ : 0 < γ) {x : ℕ → H} (hx : ∀ (k : ℕ), x (k + 1) = prox (fun (w : H) => ↑γ * g w) (x k)) {y : H} {s : ℝ} (hy : g y = ↑s) (N : ℕ) :
    ∃ (r : ℝ), g (x (N + 1)) = ↑r ∧ r - s ≤ ‖x 0 - y‖ ^ 2 / (2 * γ * (↑N + 1))

    Rate of the proximal point method Güler, Beck, Theorem 10.28 (a) (the method is BC, Theorem 28.1, which has no rate): for a proper lower semicontinuous convex g, a step γ > 0 and x (k + 1) = prox_{γ g} (x k), g (x (N + 1)) - g y ≤ ‖x 0 - y‖² / (2 γ (N + 1)) for every y with g y = s finite. This is ISTA with f = 0, whose gradient is 0-Lipschitz.

    theorem ConvexAnalysis.fista_lyapunov_succ_le {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace ℝ H] [CompleteSpace H] {f : H → ℝ} {f' : H → H} {L : ℝ} {g : H → EReal} (hf : ConvexOn ℝ Set.univ f) (hf' : ∀ (x : H), HasGradientAt f (f' x) x) (hL0 : 0 < L) (hL : ∀ (x y : H), ‖f' x - f' y‖ ≤ L * ‖x - y‖) (hg : ConvexFun g) (hglsc : LowerSemicontinuous g) (hgp : IsProper g) {x y : ℕ → H} {t : ℕ → ℝ} (ht1 : ∀ (k : ℕ), 1 ≤ t k) (htt : ∀ (k : ℕ), t (k + 1) ^ 2 - t (k + 1) ≤ t k ^ 2) (hx : ∀ (k : ℕ), x (k + 1) = proxGradStep f' g L⁻¹ (y k)) (hy : ∀ (k : ℕ), y (k + 1) = x (k + 1) + ((t k - 1) / t (k + 1)) • (x (k + 1) - x k)) {r : ℕ → ℝ} (hr : ∀ (k : ℕ), g (x (k + 1)) = ↑(r k)) {xs : H} {s : ℝ} (hs : g xs = ↑s) (hmin : IsMinOn (fun (w : H) => ↑(f w) + g w) Set.univ xs) (k : ℕ) :
    t (k + 1) ^ 2 * (f (x (k + 2)) + r (k + 1) - (f xs + s)) + L / 2 * ‖t (k + 1) • x (k + 2) - (t (k + 1) - 1) • x (k + 1) - xs‖ ^ 2 ≤ t k ^ 2 * (f (x (k + 1)) + r k - (f xs + s)) + L / 2 * ‖t k • x (k + 1) - (t k - 1) • x k - xs‖ ^ 2

    The Lyapunov function of FISTA decreases (implicit in Beck–Teboulle; BM, Fact 2.2): for the iteration of fista_rate with momentum weights t k ≥ 1, t (k + 1)² - t (k + 1) ≤ t k², a minimizer x⋆ of F = f + g and r k = g (x (k + 1)), the energy t k² (F (x (k + 1)) - F x⋆) + L / 2 ‖t k x (k + 1) - (t k - 1) x k - x⋆‖² decreases.

    theorem ConvexAnalysis.fista_lyapunov_succ_le_of_sq_sub_eq {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace ℝ H] [CompleteSpace H] {f : H → ℝ} {f' : H → H} {L : ℝ} {g : H → EReal} (hf : ConvexOn ℝ Set.univ f) (hf' : ∀ (x : H), HasGradientAt f (f' x) x) (hL0 : 0 < L) (hL : ∀ (x y : H), ‖f' x - f' y‖ ≤ L * ‖x - y‖) (hg : ConvexFun g) (hglsc : LowerSemicontinuous g) (hgp : IsProper g) {x y : ℕ → H} {t : ℕ → ℝ} (ht1 : ∀ (k : ℕ), 1 ≤ t k) (htt : ∀ (k : ℕ), t (k + 1) ^ 2 - t (k + 1) = t k ^ 2) (hx : ∀ (k : ℕ), x (k + 1) = proxGradStep f' g L⁻¹ (y k)) (hy : ∀ (k : ℕ), y (k + 1) = x (k + 1) + ((t k - 1) / t (k + 1)) • (x (k + 1) - x k)) {r : ℕ → ℝ} (hr : ∀ (k : ℕ), g (x (k + 1)) = ↑(r k)) {z : H} {s : ℝ} (hs : g z = ↑s) (k : ℕ) :
    t (k + 1) ^ 2 * (f (x (k + 2)) + r (k + 1) - (f z + s)) + L / 2 * ‖t (k + 1) • x (k + 2) - (t (k + 1) - 1) • x (k + 1) - z‖ ^ 2 ≤ t k ^ 2 * (f (x (k + 1)) + r k - (f z + s)) + L / 2 * ‖t k • x (k + 1) - (t k - 1) • x k - z‖ ^ 2

    The Lyapunov function of FISTA decreases, for any comparison point: if the momentum weights satisfy t k ≥ 1 and t (k + 1)² - t (k + 1) = t k² (the Beck–Teboulle weights, beckTeboulle_sq_sub), then for every z with g z = s finite the energy t k² (F (x (k + 1)) - F z) + L / 2 ‖t k x (k + 1) - (t k - 1) x k - z‖² decreases. Unlike fista_lyapunov_succ_le, z need not minimize F = f + g: the minimizer is used there only for the sign of F (x (k + 1)) - F z, which equality makes unnecessary.

    theorem ConvexAnalysis.fista_lyapunov_le {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace ℝ H] [CompleteSpace H] {f : H → ℝ} {f' : H → H} {L : ℝ} {g : H → EReal} (hf : ConvexOn ℝ Set.univ f) (hf' : ∀ (x : H), HasGradientAt f (f' x) x) (hL0 : 0 < L) (hL : ∀ (x y : H), ‖f' x - f' y‖ ≤ L * ‖x - y‖) (hg : ConvexFun g) (hglsc : LowerSemicontinuous g) (hgp : IsProper g) {x y : ℕ → H} {t : ℕ → ℝ} (ht0 : t 0 = 1) (ht1 : ∀ (k : ℕ), 1 ≤ t k) (htt : ∀ (k : ℕ), t (k + 1) ^ 2 - t (k + 1) ≤ t k ^ 2) (hy0 : y 0 = x 0) (hx : ∀ (k : ℕ), x (k + 1) = proxGradStep f' g L⁻¹ (y k)) (hy : ∀ (k : ℕ), y (k + 1) = x (k + 1) + ((t k - 1) / t (k + 1)) • (x (k + 1) - x k)) {r : ℕ → ℝ} (hr : ∀ (k : ℕ), g (x (k + 1)) = ↑(r k)) {xs : H} {s : ℝ} (hs : g xs = ↑s) (hmin : IsMinOn (fun (w : H) => ↑(f w) + g w) Set.univ xs) (k : ℕ) :
    t k ^ 2 * (f (x (k + 1)) + r k - (f xs + s)) + L / 2 * ‖t k • x (k + 1) - (t k - 1) • x k - xs‖ ^ 2 ≤ L / 2 * ‖x 0 - xs‖ ^ 2

    The Lyapunov function of FISTA is at most L / 2 ‖x 0 - x⋆‖² if t 0 = 1 and y 0 = x 0 BM, Fact 2.2.

    theorem ConvexAnalysis.fista_lyapunov_le_of_sq_sub_eq {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace ℝ H] [CompleteSpace H] {f : H → ℝ} {f' : H → H} {L : ℝ} {g : H → EReal} (hf : ConvexOn ℝ Set.univ f) (hf' : ∀ (x : H), HasGradientAt f (f' x) x) (hL0 : 0 < L) (hL : ∀ (x y : H), ‖f' x - f' y‖ ≤ L * ‖x - y‖) (hg : ConvexFun g) (hglsc : LowerSemicontinuous g) (hgp : IsProper g) {x y : ℕ → H} {t : ℕ → ℝ} (ht0 : t 0 = 1) (ht1 : ∀ (k : ℕ), 1 ≤ t k) (htt : ∀ (k : ℕ), t (k + 1) ^ 2 - t (k + 1) = t k ^ 2) (hy0 : y 0 = x 0) (hx : ∀ (k : ℕ), x (k + 1) = proxGradStep f' g L⁻¹ (y k)) (hy : ∀ (k : ℕ), y (k + 1) = x (k + 1) + ((t k - 1) / t (k + 1)) • (x (k + 1) - x k)) {r : ℕ → ℝ} (hr : ∀ (k : ℕ), g (x (k + 1)) = ↑(r k)) {z : H} {s : ℝ} (hs : g z = ↑s) (k : ℕ) :
    t k ^ 2 * (f (x (k + 1)) + r k - (f z + s)) + L / 2 * ‖t k • x (k + 1) - (t k - 1) • x k - z‖ ^ 2 ≤ L / 2 * ‖x 0 - z‖ ^ 2

    The Lyapunov function of FISTA is at most L / 2 ‖x 0 - z‖² for every z with g z = s finite, if t 0 = 1, t k ≥ 1, t (k + 1)² - t (k + 1) = t k² and y 0 = x 0; z need not minimize F = f + g (fista_lyapunov_succ_le_of_sq_sub_eq).

    theorem ConvexAnalysis.fista_rate {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace ℝ H] [CompleteSpace H] {f : H → ℝ} {f' : H → H} {L : ℝ} {g : H → EReal} (hf : ConvexOn ℝ Set.univ f) (hf' : ∀ (x : H), HasGradientAt f (f' x) x) (hL0 : 0 < L) (hL : ∀ (x y : H), ‖f' x - f' y‖ ≤ L * ‖x - y‖) (hg : ConvexFun g) (hglsc : LowerSemicontinuous g) (hgp : IsProper g) {x y : ℕ → H} {t : ℕ → ℝ} (ht0 : t 0 = 1) (ht1 : ∀ (k : ℕ), 1 ≤ t k) (htt : ∀ (k : ℕ), t (k + 1) ^ 2 - t (k + 1) ≤ t k ^ 2) (hy0 : y 0 = x 0) (hx : ∀ (k : ℕ), x (k + 1) = proxGradStep f' g L⁻¹ (y k)) (hy : ∀ (k : ℕ), y (k + 1) = x (k + 1) + ((t k - 1) / t (k + 1)) • (x (k + 1) - x k)) {xs : H} {s : ℝ} (hs : g xs = ↑s) (hmin : IsMinOn (fun (w : H) => ↑(f w) + g w) Set.univ xs) (N : ℕ) :
    ∃ (r : ℝ), g (x (N + 1)) = ↑r ∧ f (x (N + 1)) + r - (f xs + s) ≤ L * ‖x 0 - xs‖ ^ 2 / (2 * t N ^ 2)

    Rate of FISTA (Beck–Teboulle); the bound is in the proof of Beck, Theorem 10.34, and Beck, Remark 10.35 allows the weights below when also t k ≥ (k + 2) / 2, which is not needed here. With momentum weights t 0 = 1, t k ≥ 1, t (k + 1)² - t (k + 1) ≤ t k², the iteration y 0 = x 0, x (k + 1) = prox_{g / L} (y k - f' (y k) / L), y (k + 1) = x (k + 1) + ((t k - 1) / t (k + 1)) • (x (k + 1) - x k) satisfies F (x (N + 1)) - F x⋆ ≤ L ‖x 0 - x⋆‖² / (2 t N²) for a minimizer x⋆ of F = f + g. The Lyapunov function fista_lyapunov_le is at most L / 2 ‖x 0 - x⋆‖².

    theorem ConvexAnalysis.fista_rate_of_sq_sub_eq {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace ℝ H] [CompleteSpace H] {f : H → ℝ} {f' : H → H} {L : ℝ} {g : H → EReal} (hf : ConvexOn ℝ Set.univ f) (hf' : ∀ (x : H), HasGradientAt f (f' x) x) (hL0 : 0 < L) (hL : ∀ (x y : H), ‖f' x - f' y‖ ≤ L * ‖x - y‖) (hg : ConvexFun g) (hglsc : LowerSemicontinuous g) (hgp : IsProper g) {x y : ℕ → H} {t : ℕ → ℝ} (ht0 : t 0 = 1) (ht1 : ∀ (k : ℕ), 1 ≤ t k) (htt : ∀ (k : ℕ), t (k + 1) ^ 2 - t (k + 1) = t k ^ 2) (hy0 : y 0 = x 0) (hx : ∀ (k : ℕ), x (k + 1) = proxGradStep f' g L⁻¹ (y k)) (hy : ∀ (k : ℕ), y (k + 1) = x (k + 1) + ((t k - 1) / t (k + 1)) • (x (k + 1) - x k)) {z : H} {s : ℝ} (hs : g z = ↑s) (N : ℕ) :
    ∃ (r : ℝ), g (x (N + 1)) = ↑r ∧ f (x (N + 1)) + r - (f z + s) ≤ L * ‖x 0 - z‖ ^ 2 / (2 * t N ^ 2)

    Rate of FISTA against any comparison point: with momentum weights t 0 = 1, t k ≥ 1 and t (k + 1)² - t (k + 1) = t k² (the Beck–Teboulle weights), the iteration of fista_rate satisfies F (x (N + 1)) - F z ≤ L ‖x 0 - z‖² / (2 t N²) for every z with g z = s finite, F = f + g. fista_rate needs only t (k + 1)² - t (k + 1) ≤ t k², but a minimizer z; the proof of Beck, Theorem 10.34 compares with a minimizer as well.

    theorem ConvexAnalysis.beckTeboulle_sq_sub {t : ℕ → ℝ} (ht : ∀ (k : ℕ), t (k + 1) = (1 + √(1 + 4 * t k ^ 2)) / 2) (k : ℕ) :
    t (k + 1) ^ 2 - t (k + 1) = t k ^ 2

    The Beck–Teboulle momentum t 0 = 1, t (k + 1) = (1 + √(1 + 4 t k²)) / 2 satisfies t (k + 1)² - t (k + 1) = t k².

    theorem ConvexAnalysis.le_beckTeboulle {t : ℕ → ℝ} (ht0 : t 0 = 1) (ht : ∀ (k : ℕ), t (k + 1) = (1 + √(1 + 4 * t k ^ 2)) / 2) (k : ℕ) :
    (↑k + 2) / 2 ≤ t k

    The Beck–Teboulle momentum grows linearly: (k + 2) / 2 ≤ t k.

    theorem ConvexAnalysis.one_le_beckTeboulle {t : ℕ → ℝ} (ht0 : t 0 = 1) (ht : ∀ (k : ℕ), t (k + 1) = (1 + √(1 + 4 * t k ^ 2)) / 2) (k : ℕ) :
    1 ≤ t k

    The Beck–Teboulle weights are at least 1.

    theorem ConvexAnalysis.fista_rate_beckTeboulle {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace ℝ H] [CompleteSpace H] {f : H → ℝ} {f' : H → H} {L : ℝ} {g : H → EReal} (hf : ConvexOn ℝ Set.univ f) (hf' : ∀ (x : H), HasGradientAt f (f' x) x) (hL0 : 0 < L) (hL : ∀ (x y : H), ‖f' x - f' y‖ ≤ L * ‖x - y‖) (hg : ConvexFun g) (hglsc : LowerSemicontinuous g) (hgp : IsProper g) {x y : ℕ → H} {t : ℕ → ℝ} (ht0 : t 0 = 1) (ht : ∀ (k : ℕ), t (k + 1) = (1 + √(1 + 4 * t k ^ 2)) / 2) (hy0 : y 0 = x 0) (hx : ∀ (k : ℕ), x (k + 1) = proxGradStep f' g L⁻¹ (y k)) (hy : ∀ (k : ℕ), y (k + 1) = x (k + 1) + ((t k - 1) / t (k + 1)) • (x (k + 1) - x k)) {xs : H} {s : ℝ} (hs : g xs = ↑s) (hmin : IsMinOn (fun (w : H) => ↑(f w) + g w) Set.univ xs) (N : ℕ) :
    ∃ (r : ℝ), g (x (N + 1)) = ↑r ∧ f (x (N + 1)) + r - (f xs + s) ≤ 2 * L * ‖x 0 - xs‖ ^ 2 / (↑N + 2) ^ 2

    FISTA with the Beck–Teboulle momentum Beck, Theorem 10.34, with Beck, Lemma 10.33 for the growth of the weights: F (x (N + 1)) - F x⋆ ≤ 2 L ‖x 0 - x⋆‖² / (N + 2)², the O(1 / k²) rate.

    theorem ConvexAnalysis.fista_rate_beckTeboulle_of_mem_dom {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace ℝ H] [CompleteSpace H] {f : H → ℝ} {f' : H → H} {L : ℝ} {g : H → EReal} (hf : ConvexOn ℝ Set.univ f) (hf' : ∀ (x : H), HasGradientAt f (f' x) x) (hL0 : 0 < L) (hL : ∀ (x y : H), ‖f' x - f' y‖ ≤ L * ‖x - y‖) (hg : ConvexFun g) (hglsc : LowerSemicontinuous g) (hgp : IsProper g) {x y : ℕ → H} {t : ℕ → ℝ} (ht0 : t 0 = 1) (ht : ∀ (k : ℕ), t (k + 1) = (1 + √(1 + 4 * t k ^ 2)) / 2) (hy0 : y 0 = x 0) (hx : ∀ (k : ℕ), x (k + 1) = proxGradStep f' g L⁻¹ (y k)) (hy : ∀ (k : ℕ), y (k + 1) = x (k + 1) + ((t k - 1) / t (k + 1)) • (x (k + 1) - x k)) {z : H} {s : ℝ} (hs : g z = ↑s) (N : ℕ) :
    ∃ (r : ℝ), g (x (N + 1)) = ↑r ∧ f (x (N + 1)) + r - (f z + s) ≤ 2 * L * ‖x 0 - z‖ ^ 2 / (↑N + 2) ^ 2

    FISTA with the Beck–Teboulle momentum, against any comparison point: F (x (N + 1)) - F z ≤ 2 L ‖x 0 - z‖² / (N + 2)² for every z with g z = s finite, F = f + g. This is the bound of Beck, Theorem 10.34 (stated there for a minimizer z of F, which fista_rate_beckTeboulle assumes) without the minimizer: F need not attain its infimum.

    theorem ConvexAnalysis.acceleratedGradient_rate {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace ℝ H] [CompleteSpace H] {f : H → ℝ} {f' : H → H} {L : ℝ} (hf : ConvexOn ℝ Set.univ f) (hf' : ∀ (x : H), HasGradientAt f (f' x) x) (hL0 : 0 < L) (hL : ∀ (x y : H), ‖f' x - f' y‖ ≤ L * ‖x - y‖) {x y : ℕ → H} {t : ℕ → ℝ} (ht0 : t 0 = 1) (ht : ∀ (k : ℕ), t (k + 1) = (1 + √(1 + 4 * t k ^ 2)) / 2) (hy0 : y 0 = x 0) (hx : ∀ (k : ℕ), x (k + 1) = y k - L⁻¹ • f' (y k)) (hy : ∀ (k : ℕ), y (k + 1) = x (k + 1) + ((t k - 1) / t (k + 1)) • (x (k + 1) - x k)) (z : H) (N : ℕ) :
    f (x (N + 1)) - f z ≤ 2 * L * ‖x 0 - z‖ ^ 2 / (↑N + 2) ^ 2

    Rate of the accelerated gradient method, FISTA with g = 0 and the Beck–Teboulle momentum (Beck, Theorem 10.34 with g = 0, there for a minimizer z): for convex f with an L-Lipschitz gradient, y 0 = x 0, x (k + 1) = y k - f' (y k) / L and y (k + 1) = x (k + 1) + ((t k - 1) / t (k + 1)) (x (k + 1) - x k), f (x (N + 1)) - f z ≤ 2 L ‖x 0 - z‖² / (N + 2)² for every z.

    theorem ConvexAnalysis.fista_momentum_of_linear {a : ℝ} (ha : 2 ≤ a) :
    (fun (k : ℕ) => (↑k + a) / a) 0 = 1 ∧ (∀ (k : ℕ), 1 ≤ (↑k + a) / a) ∧ (∀ (k : ℕ), ((↑(k + 1) + a) / a) ^ 2 - (↑(k + 1) + a) / a ≤ ((↑k + a) / a) ^ 2) ∧ Filter.Tendsto (fun (k : ℕ) => (↑k + a) / a) Filter.atTop Filter.atTop ∧ ∀ (k : ℕ), ((↑k + a) / a - 1) / ((↑(k + 1) + a) / a) = ↑k / (↑k + a + 1)

    The momentum weights t k = (k + a) / a with a ≥ 2 satisfy the hypotheses of fista_rate and of the convergence theorem fista_exists_tendsto_toWeakSpace: t 0 = 1, t k ≥ 1, t (k + 1)² - t (k + 1) ≤ t k² and t k → ∞; and (t k - 1) / t (k + 1) = k / (k + a + 1).

    theorem ConvexAnalysis.fista_rate_of_linear {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace ℝ H] [CompleteSpace H] {f : H → ℝ} {f' : H → H} {L : ℝ} {g : H → EReal} (hf : ConvexOn ℝ Set.univ f) (hf' : ∀ (x : H), HasGradientAt f (f' x) x) (hL0 : 0 < L) (hL : ∀ (x y : H), ‖f' x - f' y‖ ≤ L * ‖x - y‖) (hg : ConvexFun g) (hglsc : LowerSemicontinuous g) (hgp : IsProper g) {x y : ℕ → H} {a : ℝ} (ha : 2 ≤ a) (hy0 : y 0 = x 0) (hx : ∀ (k : ℕ), x (k + 1) = proxGradStep f' g L⁻¹ (y k)) (hy : ∀ (k : ℕ), y (k + 1) = x (k + 1) + (↑k / (↑k + a + 1)) • (x (k + 1) - x k)) {xs : H} {s : ℝ} (hs : g xs = ↑s) (hmin : IsMinOn (fun (w : H) => ↑(f w) + g w) Set.univ xs) (N : ℕ) :
    ∃ (r : ℝ), g (x (N + 1)) = ↑r ∧ f (x (N + 1)) + r - (f xs + s) ≤ a ^ 2 * L * ‖x 0 - xs‖ ^ 2 / (2 * (↑N + a) ^ 2)

    FISTA with t k = (k + a) / a, a ≥ 2, that is with momentum k / (k + a + 1): F (x (N + 1)) - F x⋆ ≤ a² L ‖x 0 - x⋆‖² / (2 (N + a)²), the O(1 / k²) rate. For a > 2 the weights are below (k + 2) / 2, so Beck, Remark 10.35 does not cover them.

    theorem ConvexAnalysis.fista_rate_of_linear_two {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace ℝ H] [CompleteSpace H] {f : H → ℝ} {f' : H → H} {L : ℝ} {g : H → EReal} (hf : ConvexOn ℝ Set.univ f) (hf' : ∀ (x : H), HasGradientAt f (f' x) x) (hL0 : 0 < L) (hL : ∀ (x y : H), ‖f' x - f' y‖ ≤ L * ‖x - y‖) (hg : ConvexFun g) (hglsc : LowerSemicontinuous g) (hgp : IsProper g) {x y : ℕ → H} (hy0 : y 0 = x 0) (hx : ∀ (k : ℕ), x (k + 1) = proxGradStep f' g L⁻¹ (y k)) (hy : ∀ (k : ℕ), y (k + 1) = x (k + 1) + (↑k / (↑k + 3)) • (x (k + 1) - x k)) {xs : H} {s : ℝ} (hs : g xs = ↑s) (hmin : IsMinOn (fun (w : H) => ↑(f w) + g w) Set.univ xs) (N : ℕ) :
    ∃ (r : ℝ), g (x (N + 1)) = ↑r ∧ f (x (N + 1)) + r - (f xs + s) ≤ 2 * L * ‖x 0 - xs‖ ^ 2 / (↑N + 2) ^ 2

    FISTA with t k = (k + 2) / 2, that is with momentum k / (k + 3): F (x (N + 1)) - F x⋆ ≤ 2 L ‖x 0 - x⋆‖² / (N + 2)², the case a = 2 of fista_rate_of_linear (Beck, Remark 10.35).

    theorem ConvexAnalysis.subgradientMethod_le {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace ℝ H] {f : H → ℝ} {x u : ℕ → H} {t : ℕ → ℝ} {G : ℝ} (hu : ∀ (k : ℕ), HasSubgradientAt (fun (y : H) => ↑(f y)) (u k) (x k)) (hx : ∀ (k : ℕ), x (k + 1) = x k - t k • u k) (ht : ∀ (k : ℕ), 0 ≤ t k) (hG : ∀ (k : ℕ), ‖u k‖ ≤ G) (y : H) (N : ℕ) :
    2 * ∑ k ∈ Finset.range N, t k * (f (x k) - f y) ≤ ‖x 0 - y‖ ^ 2 + G ^ 2 * ∑ k ∈ Finset.range N, t k ^ 2

    Subgradient method Beck, Lemma 8.24 (there with a constraint set and a minimizer y): for x (k + 1) = x k - t k • u k with u k ∈ ∂f (x k), ‖u k‖ ≤ G and t k ≥ 0, 2 ∑_{k < N} t k (f (x k) - f y) ≤ ‖x 0 - y‖² + G² ∑_{k < N} t k² for every y.

    theorem ConvexAnalysis.exists_subgradientMethod_le {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace ℝ H] {f : H → ℝ} {x u : ℕ → H} {t : ℕ → ℝ} {G : ℝ} (hu : ∀ (k : ℕ), HasSubgradientAt (fun (y : H) => ↑(f y)) (u k) (x k)) (hx : ∀ (k : ℕ), x (k + 1) = x k - t k • u k) (ht : ∀ (k : ℕ), 0 ≤ t k) (hG : ∀ (k : ℕ), ‖u k‖ ≤ G) (y : H) {N : ℕ} (htN : 0 < ∑ k ∈ Finset.range N, t k) :
    ∃ k < N, f (x k) - f y ≤ (‖x 0 - y‖ ^ 2 + G ^ 2 * ∑ k ∈ Finset.range N, t k ^ 2) / (2 * ∑ k ∈ Finset.range N, t k)

    The best iterate of the subgradient method: some k < N has f (x k) - f y ≤ (‖x 0 - y‖² + G² ∑ t k²) / (2 ∑ t k).

    theorem ConvexAnalysis.exists_subgradientMethod_le_of_const {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace ℝ H] {f : H → ℝ} {x u : ℕ → H} {G : ℝ} (hu : ∀ (k : ℕ), HasSubgradientAt (fun (y : H) => ↑(f y)) (u k) (x k)) {τ : ℝ} (hτ : 0 < τ) (hx : ∀ (k : ℕ), x (k + 1) = x k - τ • u k) (hG : ∀ (k : ℕ), ‖u k‖ ≤ G) (y : H) {N : ℕ} (hN : 0 < N) :
    ∃ k < N, f (x k) - f y ≤ ‖x 0 - y‖ ^ 2 / (2 * τ * ↑N) + G ^ 2 * τ / 2

    The subgradient method with a constant step τ > 0: some k < N, N > 0, has f (x k) - f y ≤ ‖x 0 - y‖² / (2 τ N) + G² τ / 2.

    theorem ConvexAnalysis.exists_subgradientMethod_lt_of_diminishing {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace ℝ H] {f : H → ℝ} {x u : ℕ → H} {t : ℕ → ℝ} {G : ℝ} (hu : ∀ (k : ℕ), HasSubgradientAt (fun (y : H) => ↑(f y)) (u k) (x k)) (hx : ∀ (k : ℕ), x (k + 1) = x k - t k • u k) (ht : ∀ (k : ℕ), 0 ≤ t k) (hG : ∀ (k : ℕ), ‖u k‖ ≤ G) (y : H) (hsum : Filter.Tendsto (fun (N : ℕ) => ∑ k ∈ Finset.range N, t k) Filter.atTop Filter.atTop) {C : ℝ} (hsq : ∀ (N : ℕ), ∑ k ∈ Finset.range N, t k ^ 2 ≤ C) {ε : ℝ} (hε : 0 < ε) :
    ∃ (k : ℕ), f (x k) - f y < ε

    The subgradient method with diminishing steps: if ∑ t k = ∞ and ∑ t k² < ∞, then for every y and ε > 0 some iterate has f (x k) - f y < ε. For a minimizer y this says that the best value converges to the minimum; compare Beck, Theorem 8.25, which needs only ∑_{k < N} t k² / ∑_{k < N} t k → 0.