Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Eq. (4), p. 19 — X_i(c_(1)) + ··· + X_i(c_(j)) ≤ m_i(c_(j)) + 1 for contexts ordered by decreasing gap

Proved
CrossLearnCB.UCB1CL.eq_4

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

clique-covercontextual-banditsp2o-batch-pfp2ap2o-gran-per-chapterp2o-plan-paperp2o-v1regret-bound

Fix an arm iii, a horizon TTT, a context sequence and an arm sequence, and a set SSS of contexts. Enumerate SSS as c(1),…,c(∣S∣)c_{(1)},\dots,c_{(|S|)}c(1)​,…,c(∣S∣)​ so that the gaps are positive and non-increasing,

Δi(c(1))≥Δi(c(2))≥⋯≥Δi(c(∣S∣))>0,\Delta_i(c_{(1)})\ge\Delta_i(c_{(2)})\ge\cdots\ge\Delta_i(c_{(|S|)})>0,Δi​(c(1)​)≥Δi​(c(2)​)≥⋯≥Δi​(c(∣S∣)​)>0,

so that mi(c(1))≤⋯≤mi(c(∣S∣))m_i(c_{(1)})\le\cdots\le m_i(c_{(|S|)})mi​(c(1)​)≤⋯≤mi​(c(∣S∣)​), where mi(c)=8log⁡T/Δi(c)2m_i(c)=8\log T/\Delta_i(c)^2mi​(c)=8logT/Δi​(c)2. Let Xi(c)X_i(c)Xi​(c) be the number of rounds t≤Tt\le Tt≤T with ct=cc_t=cct​=c, It=iI_t=iIt​=i and τ~i,t(S)≤mi(c)\tilde\tau_{i,t}(S)\le m_i(c)τ~i,t​(S)≤mi​(c), where τ~i,t(S)\tilde\tau_{i,t}(S)τ~i,t​(S) counts the pulls of arm iii in contexts of SSS before round ttt. Then for every jjj,

Xi(c(1))+Xi(c(2))+⋯+Xi(c(j))≤mi(c(j))+1.X_i(c_{(1)})+X_i(c_{(2)})+\cdots+X_i(c_{(j)})\le m_i(c_{(j)})+1 .Xi​(c(1)​)+Xi​(c(2)​)+⋯+Xi​(c(j)​)≤mi​(c(j)​)+1.

This system of inequalities is the combinatorial core of the bound on the pre-regret (Lemma 3): weighting the jjj-th inequality by Δi(c(j))−Δi(c(j+1))\Delta_i(c_{(j)})-\Delta_i(c_{(j+1)})Δi​(c(j)​)−Δi​(c(j+1)​) and summing bounds the pre-regret incurred on one clique of a clique cover.

Formalization Note. The page prints the right-hand sides as mi(c(j))m_i(c_{(j)})mi​(c(j)​); the statement holds only with mi(c(j))+1m_i(c_{(j)})+1mi​(c(j)​)+1, because τ~\tilde\tauτ~ takes the values 0,1,…,⌊m⌋0,1,\dots,\lfloor m\rfloor0,1,…,⌊m⌋ while it is at most mmm, i.e. up to ⌊m⌋+1\lfloor m\rfloor+1⌊m⌋+1 rounds (with mmm not an integer the printed first row fails). The inequality is pathwise: it holds for every arm and context sequence, and for any set SSS, not only a clique of GiG_iGi​. The enumeration is an injective map e:{0,…,n−1}→[C]e:\{0,\dots,n-1\}\to[C]e:{0,…,n−1}→[C] with image SSS; Lean indices are 0-based. Positive gaps are required because Lean's 8log⁡T/08\log T/08logT/0 is 000 rather than +∞+\infty+∞.

Preamble
import Mathlib
import Definitions.Def_CrossLearnCB_UCB1CL_Model

open MeasureTheory ProbabilityTheory
Formal statement
namespace CrossLearnCB.UCB1CL

/-- System (4), p. 19, with the right-hand sides `m_i(c_(j)) + 1`: for contexts `e 0, …, e (n-1)`
enumerating `S` in order of non-increasing positive gap, the counts `X_i(c_(k))` for `k ≤ j`
sum to at most `m_i(c_(j)) + 1`. Pathwise, for any arm and context sequences. -/
theorem eq_4 {K C : ℕ} (gap : Fin K → Fin C → ℝ) (ctx : ℕ → Fin C) (I : ℕ → Fin K) (T : ℕ)
    (i : Fin K) (S : Finset (Fin C)) {n : ℕ} (e : Fin n → Fin C)
    (he : Function.Injective e) (hrange : Set.range e = ↑S)
    (hpos : ∀ k, 0 < gap i (e k))
    (hord : ∀ k l, k ≤ l → gap i (e l) ≤ gap i (e k)) (j : Fin n) :
    (∑ k ∈ Finset.univ.filter (fun k : Fin n => k ≤ j), (cliqueX gap ctx I T i S (e k) : ℝ))
      ≤ mThr T (gap i (e j)) + 1 := by sorry

end CrossLearnCB.UCB1CL
Source
Balseiro et al., Contextual Bandits with Cross-Learning, arXiv:1809.09582v3, p. 19, Eq. (4); X_i(c), τ̃_{i,t}(r) p. 18
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