Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

p. 46, proof of Lemma 4 — Pr[x̄_{i,n}(c) ≤ μ_i(c) − ω(n)] and Pr[x̄_{i,n}(c) ≥ μ_i(c) + ω(n)] are at most exp(−4 log T)

Proved
CrossLearnCB.UCB1CL.hoeffding_step

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

concentrationcontextual-banditshoeffdingp2o-batch-pfp2ap2o-gran-per-chapterp2o-plan-paperp2o-v1

Consider the stochastic contextual bandit with cross-learning: rewards ri,t(c)∈[0,1]r_{i,t}(c)\in[0,1]ri,t​(c)∈[0,1] independent across rounds with fixed laws Fi(c)\mathcal F_i(c)Fi​(c) of means μi(c)\mu_i(c)μi​(c), an oblivious context sequence, cross-learning graphs with self-loops, a horizon T≥2T\ge2T≥2, and an arm process (It)(I_t)(It​) run by UCB1.CL. Fix an arm iii, a context ccc and n≥1n\ge1n≥1, let xˉi,n(c)\bar x_{i,n}(c)xˉi,n​(c) be the average of the first nnn rewards of arm iii in context ccc observed by the algorithm, and let ω(n)=2log⁡T/n\omega(n)=\sqrt{2\log T/n}ω(n)=2logT/n​. Then

Pr⁡[τi,T+1(c)≥n, xˉi,n(c)≤μi(c)−ω(n)]≤e−4log⁡T,Pr⁡[τi,T+1(c)≥n, xˉi,n(c)≥μi(c)+ω(n)]≤e−4log⁡T,\Pr\big[\tau_{i,T+1}(c)\ge n,\ \bar x_{i,n}(c)\le\mu_i(c)-\omega(n)\big]\le e^{-4\log T},\qquad \Pr\big[\tau_{i,T+1}(c)\ge n,\ \bar x_{i,n}(c)\ge\mu_i(c)+\omega(n)\big]\le e^{-4\log T},Pr[τi,T+1​(c)≥n, xˉi,n​(c)≤μi​(c)−ω(n)]≤e−4logT,Pr[τi,T+1​(c)≥n, xˉi,n​(c)≥μi​(c)+ω(n)]≤e−4logT,

where τi,T+1(c)≥n\tau_{i,T+1}(c)\ge nτi,T+1​(c)≥n says that the nnn-th observation happens within the TTT rounds.

This is the concentration step of the analysis of UCB1.CL: since 2n ω(n)2=4log⁡T2n\,\omega(n)^2=4\log T2nω(n)2=4logT, Hoeffding's inequality gives the bound T−4T^{-4}T−4. The observations are taken at random rounds chosen by the algorithm, so the step is Hoeffding's inequality for a sample collected by an adaptive (optional-skipping) rule rather than for a fixed sample.

Formalization Note. The paper applies the lower tail to the optimal arm i⋆(ct)i^\star(c_t)i⋆(ct​) and the upper tail to arm iii; one generic statement covers both. The paper uses xˉi,n\bar x_{i,n}xˉi,n​ only when at least nnn observations have been made; the statement is restricted to the event that the nnn-th observation occurs before the horizon. The paper's final ≤t−4\le t^{-4}≤t−4 uses t≤Tt\le Tt≤T; the statement gives e−4log⁡T=T−4e^{-4\log T}=T^{-4}e−4logT=T−4. Logarithms are natural.

Preamble
import Mathlib
import Definitions.Def_CrossLearnCB_UCB1CL_Model

open MeasureTheory ProbabilityTheory
Formal statement
namespace CrossLearnCB.UCB1CL

/-- Hoeffding step, p. 46 (proof of Lemma 4): the average `x̄_{i,n}(c)` of the first `n`
observed rewards of arm `i` in context `c` under UCB1.CL deviates below `μ_i(c) - ω(n)` or above
`μ_i(c) + ω(n)` with probability at most `exp(-4 log T)`, on the event that the `n`-th observation
happens within the horizon. -/
theorem hoeffding_step {K C : ℕ} [NeZero K] [NeZero C] {Ω : Type*} [MeasurableSpace Ω]
    (P : Measure Ω) [IsProbabilityMeasure P] (R : ℕ → Ω → Fin K → Fin C → ℝ)
    (hR : IsStochRewards P R) (G : Fin K → Fin C → Fin C → Prop) (hG : HasSelfLoops G)
    (ctx : ℕ → Fin C) (T : ℕ) (hT : 2 ≤ T) (I : ℕ → Ω → Fin K)
    (hI : IsUCB1CLProcess R T G ctx I) (i : Fin K) (c : Fin C) (n : ℕ) (hn : 1 ≤ n) :
    P {ω | n ≤ obsCount G ctx (fun s => I s ω) T i c ∧
        firstNMean G ctx (fun s => I s ω) (fun s => R s ω) i c n
          ≤ mu P R i c - Real.sqrt (2 * Real.log T / n)}
        ≤ ENNReal.ofReal (Real.exp (-4 * Real.log T)) ∧
    P {ω | n ≤ obsCount G ctx (fun s => I s ω) T i c ∧
        mu P R i c + Real.sqrt (2 * Real.log T / n)
          ≤ firstNMean G ctx (fun s => I s ω) (fun s => R s ω) i c n}
        ≤ ENNReal.ofReal (Real.exp (-4 * Real.log T)) := by sorry

end CrossLearnCB.UCB1CL
Source
Balseiro et al., Contextual Bandits with Cross-Learning, arXiv:1809.09582v3, p. 46, proof of Lemma 4 (App. C.1); events 1–2 and x̄_{i,n}(c) p. 45
Human review
  • Endorsed by Shuze Chen · Oct 23, 2026

    Confirmed by the moderator at approval.

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