Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Lemma 2, p. 637 — if E[r_t | 𝓕_t] = 0 and E[‖r_t‖² | 𝓕_t] ≤ B, then Σ γ_t r_t and Σ γ_t²‖r_t‖² converge a.s. when Σ γ_t² < ∞

Proved
GradErrors.Stochastic.lemma_2

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

martingalep2o-batch-pfp1ap2o-gran-per-chapterp2o-plan-paperp2o-v1series-convergencestochastic-approximation

Let (Ω,F,P)(\Omega,\mathcal F,P)(Ω,F,P) be a probability space with a filtration F0⊆F1⊆⋯⊆F\mathcal F_0\subseteq\mathcal F_1\subseteq\cdots\subseteq\mathcal FF0​⊆F1​⊆⋯⊆F, let VVV be a finite-dimensional real inner-product space (for instance R\mathbb RR or Rn\mathbb R^nRn), and let (γt)t≥0(\gamma_t)_{t\ge0}(γt​)t≥0​ be deterministic real numbers with

∑t=0∞γt2<∞.\sum_{t=0}^\infty\gamma_t^2<\infty .t=0∑∞​γt2​<∞.

Let rt:Ω→Vr_t:\Omega\to Vrt​:Ω→V be random vectors such that, for every ttt,

  1. rtr_trt​ is Ft+1\mathcal F_{t+1}Ft+1​-measurable;
  2. ∥rt∥2\|r_t\|^2∥rt​∥2 is integrable;
  3. E[rt∣Ft]=0E[r_t\mid\mathcal F_t]=0E[rt​∣Ft​]=0 almost surely;
  4. E[∥rt∥2∣Ft]≤BE[\|r_t\|^2\mid\mathcal F_t]\le BE[∥rt​∥2∣Ft​]≤B almost surely, where BBB is a deterministic constant.

Then, with probability 1, both sequences of partial sums

∑t=0Tγtrtand∑t=0Tγt2∥rt∥2,T=0,1,…,\sum_{t=0}^{T}\gamma_t r_t\qquad\text{and}\qquad\sum_{t=0}^{T}\gamma_t^2\|r_t\|^2,\qquad T=0,1,\dots,t=0∑T​γt​rt​andt=0∑T​γt2​∥rt​∥2,T=0,1,…,

converge to finite limits as T→∞T\to\inftyT→∞.

In the proof of Proposition 3 this lemma is applied to the noise wtw_twt​ rescaled by Ft\mathcal F_tFt​-measurable factors (Lemma 3 of the paper), to show that the accumulated noise and its second-order contribution are almost surely finite.

Formalization Note The space is a general finite-dimensional real inner-product space, because the paper applies the lemma both to real-valued and to Rn\mathbb R^nRn-valued rtr_trt​. The conditional expectations are Mathlib's condExp. Integrability of ∥rt∥2\|r_t\|^2∥rt​∥2 is stated explicitly: Mathlib's conditional expectation of a non-integrable function is 000, so without it hypotheses 3 and 4 would hold vacuously. It costs nothing, since E[∥rt∥2∣Ft]≤BE[\|r_t\|^2\mid\mathcal F_t]\le BE[∥rt​∥2∣Ft​]≤B in the paper's sense already gives E∥rt∥2≤BE\|r_t\|^2\le BE∥rt​∥2≤B. Convergence is convergence of the partial sums, not Lean's Summable, which would mean unconditional convergence; ∑tγtrt\sum_t\gamma_tr_t∑t​γt​rt​ may converge only conditionally. Only ∑tγt2<∞\sum_t\gamma_t^2<\infty∑t​γt2​<∞ is assumed of the stepsizes, as in the paper.

Preamble
import Mathlib

open Filter Topology NNReal ENNReal MeasureTheory ProbabilityTheory InnerProductSpace
Formal statement
namespace GradErrors.Stochastic

theorem lemma_2 {Ω : Type*} {m0 : MeasurableSpace Ω} (P : Measure Ω) [IsProbabilityMeasure P]
    (ℱ : Filtration ℕ m0) {F : Type*} [NormedAddCommGroup F] [InnerProductSpace ℝ F]
    [FiniteDimensional ℝ F] (γ : ℕ → ℝ) (hsq : Summable (fun t => γ t ^ 2))
    (r : ℕ → Ω → F) (B : ℝ)
    (hrm : ∀ t, StronglyMeasurable[ℱ (t + 1)] (r t))
    (hr2 : ∀ t, Integrable (fun ω => ‖r t ω‖ ^ 2) P)
    (hr0 : ∀ t, P[r t | ℱ t] =ᵐ[P] 0)
    (hrB : ∀ t, P[fun ω => ‖r t ω‖ ^ 2 | ℱ t] ≤ᵐ[P] fun _ => B) :
    ∀ᵐ ω ∂P,
      (∃ S : F, Tendsto (fun T => ∑ t ∈ Finset.range (T + 1), γ t • r t ω) atTop (𝓝 S)) ∧
      (∃ S' : ℝ,
        Tendsto (fun T => ∑ t ∈ Finset.range (T + 1), γ t ^ 2 * ‖r t ω‖ ^ 2) atTop (𝓝 S')) := by sorry

end GradErrors.Stochastic
Source
Bertsekas and Tsitsiklis, Gradient Convergence in Gradient Methods with Errors, SIAM J. Optim. 10 (2000), https://doi.org/10.1137/S1052623497331063, p. 637, Lemma 2
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