Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

(15), p. 14 — random-index weak law of large numbers for the rewards of one arm

Proved
FragileBandit.CauchyTail.random_index_wlln

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

law-of-large-numbersmulti-armed-banditp2o-batch-pfp2ap2o-gran-per-chapterp2o-plan-paperp2o-strengthenedp2o-v1random-index

Weak law of large numbers along a random number of plays. Let ν=(Q1,…,QK)\nu = (Q_1,\dots,Q_K)ν=(Q1​,…,QK​) be any environment, π\piπ any algorithm and jjj an arm whose number of plays tends to infinity in probability:

lim⁡T→∞Pνπ(Nj(T)≤m)=0for every m∈N.\lim_{T\to\infty}\mathbb P_{\nu\pi}\big(N_j(T) \le m\big) = 0 \quad \text{for every } m \in \mathbb N.T→∞lim​Pνπ​(Nj​(T)≤m)=0for every m∈N.

Let φ:R→R\varphi : \mathbb R \to \mathbb Rφ:R→R be measurable and QjQ_jQj​-integrable, and let Xj(1),Xj(2),…X_j(1), X_j(2), \dotsXj​(1),Xj​(2),… be the successive rewards of arm jjj. Then for every δ>0\delta > 0δ>0,

lim⁡T→∞Pνπ(∣1Nj(T)∑s=1Nj(T)φ(Xj(s))−∫φ dQj∣>δ)=0.\lim_{T\to\infty}\mathbb P_{\nu\pi}\Big(\Big|\frac{1}{N_j(T)}\sum_{s=1}^{N_j(T)}\varphi\big(X_j(s)\big) - \int \varphi\,dQ_j\Big| > \delta\Big) = 0.T→∞lim​Pνπ​(​Nj​(T)1​s=1∑Nj​(T)​φ(Xj​(s))−∫φdQj​​>δ)=0.

In the paper this is the step "by (14) and the WLLN" giving (15), with φ=log⁡dPμ1/dPμ~1\varphi = \log dP^{\mu_1}/dP^{\tilde\mu_1}φ=logdPμ1​/dPμ~​1​ and ∫φ dPμ~1=−dP(μ~1,μ1)\int\varphi\,dP^{\tilde\mu_1} = -d_P(\tilde\mu_1,\mu_1)∫φdPμ~​1​=−dP​(μ~​1​,μ1​); the same step gives lim⁡Pν~π(BT)=1\lim\mathbb P_{\tilde\nu\pi}(\mathcal B_T) = 1limPν~π​(BT​)=1 on p. 38 and lim⁡Pν~π(Bn)=1\lim \mathbb P_{\tilde\nu\pi}(\mathcal B_n) = 1limPν~π​(Bn​)=1 on p. 46. The difficulty is that the policy is adaptive, so the number of terms is a random time depending on the rewards themselves.

Formalization Note The sample average is the sum of φ\varphiφ over the rounds t≤Tt \le Tt≤T in which arm jjj was played, divided by Nj(T)N_j(T)Nj​(T); when Nj(T)=0N_j(T) = 0Nj​(T)=0 Lean's division gives 000, an event whose probability vanishes under the hypothesis.

Differences from the source:

  • generalization: (15): φ = log dP^{µ1}/dP^{µ̃1} under ν̃, with N_1(T)/log T → 1/d_P(µ̃1, µ2) in probability (14) → any environment, algorithm and arm j with N_j(T) → ∞ in probability, and any measurable Q_j-integrable φ; reason: (14) implies N_1(T) → ∞ in probability, and φ = log dP^{µ1}/dP^{µ̃1} is measurable and P^{µ̃1}-integrable with integral −d_P(µ̃1, µ1), so (15) is the special case
  • encoding: (1/N_j(T)) Σ_{s=1}^{N_j(T)} φ(X_j(s)) → (Σ over rounds t ≤ T with A(t) = j of φ(Y(t))) / N_j(T), with value 0 when N_j(T) = 0; reason: the rewards of the rounds in which j is played are X_j(1), …, X_j(N_j(T)); the N_j(T) = 0 event has vanishing probability
  • encoding: P_νπ on ([K] × ℝ)^∞ (p. 7), events about N_i(T) → banditMeasure ν π T on the histories of the first T rounds (published BanditPolicy), N_i(T) = armPullCount i h; reason: the infinite-horizon law restricted to the first T rounds is exactly banditMeasure ν π T, and N_i(T) depends only on those rounds
Preamble
import Mathlib
import Definitions.Def_FragileBandit_CauchyTail_Setting
Formal statement
namespace FragileBandit.CauchyTail

open MeasureTheory ProbabilityTheory Filter BanditAlgorithm
open scoped ENNReal Topology

/-- Random-index weak law of large numbers ((15), p. 14; "the WLLN for sample means", pp. 38 and 46):
if the number of plays `N_j(T)` of arm `j` tends to infinity in `P_νπ`-probability, then for every
`Q_j`-integrable `φ` the average of `φ` over the rewards of arm `j` up to time `T`,
`(1/N_j(T)) ∑_{s ≤ N_j(T)} φ(X_j(s))`, converges in `P_νπ`-probability to `∫ φ dQ_j`. -/
theorem random_index_wlln {K : ℕ} (ν : StochasticBandit K) (π : BanditPolicy K) (j : Fin K)
    (φ : ℝ → ℝ) (hφm : Measurable φ) (hφ : Integrable φ (ν.P j))
    (hN : ∀ m : ℕ, Tendsto (fun T : ℕ => banditMeasure ν π T {h | armPullCount j h ≤ m})
      atTop (𝓝 0)) :
    ∀ δ : ℝ, 0 < δ → Tendsto (fun T : ℕ => banditMeasure ν π T
      {h | δ < |(∑ t ∈ Finset.univ.filter (fun t : Fin T => (h t).1 = j), φ (h t).2) /
          (armPullCount j h : ℝ) - ∫ y, φ y ∂(ν.P j)|}) atTop (𝓝 0) := by sorry

end FragileBandit.CauchyTail
Source
Fan, Glynn, The Fragility of Optimized Bandit Algorithms, arXiv:2109.13595v8, p. 14, (14)–(15) ('by (14) and the WLLN'); p. 38 and p. 46 ('the WLLN for sample means')
Human review
  • Endorsed by Shuze Chen · Oct 24, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Oct 24, 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