Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Appendix C — one-step decrease of the Lyapunov function, γ=1/(3L)\gamma=1/(3L)γ=1/(3L)

Proved
SAGA.Convex.lyapunov_one_step

by mikedeng1 · Oct 4, 2026 · Mathlib 0df444a (Lean v4.33.1)

lyapunov-functionp2o-batch-pfp1bp2o-gran-per-chapterp2o-plan-paperp2o-v1stochastic-gradientvariance-reduction

Let n≥1n\ge1n≥1 and L>0L>0L>0. Let f1,…,fn:Rd→Rf_1,\dots,f_n:\mathbb R^d\to\mathbb Rf1​,…,fn​:Rd→R be convex and differentiable with LLL-Lipschitz gradients, f=1n∑ifif=\frac1n\sum_i f_if=n1​∑i​fi​, h:Rd→Rh:\mathbb R^d\to\mathbb Rh:Rd→R convex, F=f+hF=f+hF=f+h, and x∗x^*x∗ a minimizer of FFF. Run SAGA with γ=13L\gamma=\frac1{3L}γ=3L1​ and P=proxγhP=\mathrm{prox}^h_\gammaP=proxγh​, and let TTT be the Lyapunov function

T(x,ϕ)=1n∑ifi(ϕi)−f(x∗)−1n∑i⟨fi′(x∗),ϕi−x∗⟩+(c+α)∥x−x∗∥2,c=3L2n, α=3L8n.T(x,\phi)=\frac1n\sum_i f_i(\phi_i)-f(x^*)-\frac1n\sum_i\langle f_i'(x^*),\phi_i-x^*\rangle+(c+\alpha)\|x-x^*\|^2,\qquad c=\frac{3L}{2n},\ \alpha=\frac{3L}{8n}.T(x,ϕ)=n1​i∑​fi​(ϕi​)−f(x∗)−n1​i∑​⟨fi′​(x∗),ϕi​−x∗⟩+(c+α)∥x−x∗∥2,c=2n3L​, α=8n3L​.

Then for every state (xk,ϕk)(x^k,\phi^k)(xk,ϕk), writing Tk=T(xk,ϕk)T^k=T(x^k,\phi^k)Tk=T(xk,ϕk), Tk+1T^{k+1}Tk+1 for TTT at the next state and E\mathbb EE for the average over the index jjj drawn uniformly from {1,…,n}\{1,\dots,n\}{1,…,n},

E[Tk+1]−Tk≤−14n E[F(xk+1)−F(x∗)].\mathbb E[T^{k+1}]-T^k\le-\frac1{4n}\,\mathbb E\big[F(x^{k+1})-F(x^*)\big].E[Tk+1]−Tk≤−4n1​E[F(xk+1)−F(x∗)].

Telescoping this inequality over kkk steps gives Theorem 2.

Formalization Note The coefficient of ∥x−x∗∥2\|x-x^*\|^2∥x−x∗∥2 is written 3L2n+3L8n\frac{3L}{2n}+\frac{3L}{8n}2n3L​+8n3L​. E\mathbb EE is the conditional expectation given the state, written 1n∑j\frac1n\sum_jn1​∑j​.

Preamble
import Mathlib
import Definitions.Def_SAGA_Convex_finiteSum
import Definitions.Def_SAGA_Convex_IsProxPoint
import Definitions.Def_SAGA_Convex_sagaStep
import Definitions.Def_SAGA_Convex_lyapunov
Formal statement
namespace SAGA.Convex

/-- Appendix C, p. 12 (one-step decrease): each `fᵢ` convex with `L`-Lipschitz gradient, `h`
convex, `x*` a minimizer of `F = f + h`, step `γ = 1/(3L)`, `P = prox_γ^h`, and the Lyapunov
function `T` with coefficient `c + α = 3L/(2n) + 3L/(8n)` on `‖x - x*‖²`. For every state
`(x^k, φ^k)`, with `E` the average over the uniformly drawn index `j`,
`E[T^{k+1}] - T^k ≤ -(1/(4n)) E[F(x^{k+1}) - F(x*)]`. -/
theorem lyapunov_one_step {d n : ℕ} (hn : 0 < n) {L : ℝ} (hL : 0 < L)
    (f : Fin n → EuclideanSpace ℝ (Fin d) → ℝ)
    (f' : Fin n → EuclideanSpace ℝ (Fin d) → EuclideanSpace ℝ (Fin d))
    (hgrad : ∀ i x, HasGradientAt (f i) (f' i x) x)
    (hLip : ∀ i x y, ‖f' i x - f' i y‖ ≤ L * ‖x - y‖)
    (hconv : ∀ i, ConvexOn ℝ Set.univ (f i))
    (h : EuclideanSpace ℝ (Fin d) → ℝ) (hh : ConvexOn ℝ Set.univ h)
    (P : EuclideanSpace ℝ (Fin d) → EuclideanSpace ℝ (Fin d))
    (hP : ∀ y, IsProxPoint h (1 / (3 * L)) y (P y))
    (xs : EuclideanSpace ℝ (Fin d)) (hopt : ∀ y, fAvg f xs + h xs ≤ fAvg f y + h y)
    (s : EuclideanSpace ℝ (Fin d) × (Fin n → EuclideanSpace ℝ (Fin d))) :
    (1 / (n : ℝ)) * ∑ j, lyapunov f f' xs (3 * L / (2 * n) + 3 * L / (8 * n))
        (sagaStep f' P (1 / (3 * L)) s j)
      - lyapunov f f' xs (3 * L / (2 * n) + 3 * L / (8 * n)) s ≤
      -(1 / (4 * (n : ℝ))) * ((1 / (n : ℝ)) * ∑ j,
          ((fAvg f (sagaStep f' P (1 / (3 * L)) s j).1 + h (sagaStep f' P (1 / (3 * L)) s j).1)
            - (fAvg f xs + h xs))) := by sorry

end SAGA.Convex
Source
Defazio, Bach & Lacoste-Julien, SAGA, arXiv:1407.0202v3, Appendix C, p. 12, display after "We thus obtain"
Human review
  • Endorsed by Shuze Chen · Oct 4, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Oct 4, 2026

    Confirmed by the mission captain (proposal self-audit).

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me