Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

BanditAlgorithm.linear_bandit_linucb_expected_regret

Proved

by Shuze Chen · Jul 29, 2026 · Mathlib c5ea003 (Lean v4.30.0)

banditslinearregret

(Expected regret — Corollary 19.3) There is a universal constant C>0C > 0C>0 such that for every fixed finite action set arms:Fin k→Rd\mathrm{arms} : \mathrm{Fin}\,k \to \mathbb{R}^darms:Fink→Rd with ∥armsj∥2≤L\|\mathrm{arms}_j\|_2 \le L∥armsj​∥2​≤L (with L≥1L \ge 1L≥1, n≥2n \ge 2n≥2) there is a policy π\piπ (LinUCB with δ=1/n\delta = 1/nδ=1/n and βt\beta_tβt​ from Eq. (19.8)/Theorem 20.5) such that for every linear bandit instance with

  • ∥θ∗∥2≤1\|\theta_*\|_2 \le 1∥θ∗​∥2​≤1 (i.e. m2=1m_2 = 1m2​=1 in Eq. (19.8)), and
  • sup⁡a,b⟨θ∗,a−b⟩≤1\sup_{a,b}\langle\theta_*,a-b\rangle \le 1supa,b​⟨θ∗​,a−b⟩≤1 (= Assumption 19.1(b)),

the expected regret satisfies

Rn≤Cdnlog⁡(nL).R_n \le C d\sqrt{n}\log(nL).Rn​≤Cdn​log(nL).
Preamble
import Definitions.Def_StochasticLinearBandit
import Definitions.Def_banditRegret


open Matrix MeasureTheory ProbabilityTheory
Formal statement
theorem BanditAlgorithm.linear_bandit_linucb_expected_regret :
    ∃ C : ℝ, 0 < C ∧
      ∀ (d k n : ℕ) (L : ℝ), 0 < d → 0 < k → 2 ≤ n → 1 ≤ L →
        ∀ arms : Fin k → Fin d → ℝ,
          (∀ j, Real.sqrt (arms j ⬝ᵥ arms j) ≤ L) →
          ∃ π : BanditPolicy k,
            ∀ (θstar : Fin d → ℝ) (ν : StochasticBandit k),
              IsLinearBandit arms θstar ν →
              Real.sqrt (θstar ⬝ᵥ θstar) ≤ 1 →
              (∀ j j' : Fin k, θstar ⬝ᵥ (arms j - arms j') ≤ 1) →
              banditRegret ν π n ≤
                C * d * Real.sqrt n * Real.log (n * L) := by
  sorry
Source
L&S Corollary 19.3, p.243
Read-back

What the Lean code literally says, in plain math · claude-fable-5

Setup and notation. This is an existence statement about kkk-armed stochastic bandits with linear structure. A kkk-armed bandit ν\nuν is a kkk-tuple of probability measures νj\nu_jνj​ on R\mathbb{R}R with arm means μj=∫r dνj(r)\mu_j = \int r \, d\nu_j(r)μj​=∫rdνj​(r); a policy π\piπ is a family of Markov kernels selecting an arm from each history of arm–reward pairs; the interaction law Pν,π,n\mathbb{P}_{\nu,\pi,n}Pν,π,n​ on length-nnn histories draws at each round an arm from the policy kernel and then a reward from that arm's distribution; and the expected regret is

Rn(ν,π)  =  n⋅max⁡jμj  −  Eh∼Pν,π,n[∑t=0n−1Xt],\mathfrak{R}_n(\nu, \pi) \;=\; n \cdot \max_{j} \mu_j \;-\; \mathbb{E}_{h\sim\mathbb{P}_{\nu,\pi,n}}\Bigl[\sum_{t=0}^{n-1} X_t\Bigr],Rn​(ν,π)=n⋅jmax​μj​−Eh∼Pν,π,n​​[t=0∑n−1​Xt​],

where XtX_tXt​ is the recorded reward of round ttt. For a feature map ϕj∈Rd\phi_j \in \mathbb{R}^dϕj​∈Rd (j=1,…,kj = 1,\dots,kj=1,…,k) and θ∗∈Rd\theta_* \in \mathbb{R}^dθ∗​∈Rd, say ν\nuν realizes (ϕ,θ∗)(\phi, \theta_*)(ϕ,θ∗​) iff μj=⟨ϕj,θ∗⟩\mu_j = \langle \phi_j, \theta_*\rangleμj​=⟨ϕj​,θ∗​⟩ for every arm jjj and ν\nuν is 111-sub-Gaussian (each νj\nu_jνj​ integrable, and ∫eu(r−μj) dνj(r)≤eu2/2\int e^{u(r-\mu_j)}\,d\nu_j(r) \le e^{u^2/2}∫eu(r−μj​)dνj​(r)≤eu2/2 for every u∈Ru \in \mathbb{R}u∈R, with the corresponding integrability).

Assertion.

∃ C>0 such that ∀ d,k,n,L, ∀ ϕ, ∃ π, ∀ (θ∗,ν):Rn(ν,π)  ≤  C d n log⁡(nL),\exists\, C > 0 \text{ such that } \forall\, d, k, n, L,\ \forall\, \phi,\ \exists\, \pi,\ \forall\, (\theta_*, \nu): \qquad \mathfrak{R}_n(\nu, \pi) \;\le\; C\, d\, \sqrt{n}\, \log(nL),∃C>0 such that ∀d,k,n,L, ∀ϕ, ∃π, ∀(θ∗​,ν):Rn​(ν,π)≤Cdn​log(nL),

with the quantifiers and side conditions detailed below.

Hypotheses (in quantifier order).

  • A single constant C>0C > 0C>0 works for all instances.
  • d≥1d \ge 1d≥1, k≥1k \ge 1k≥1, n≥2n \ge 2n≥2, and L≥1L \ge 1L≥1 (a real).
  • The features are bounded: ∥ϕj∥=⟨ϕj,ϕj⟩≤L\|\phi_j\| = \sqrt{\langle \phi_j, \phi_j\rangle} \le L∥ϕj​∥=⟨ϕj​,ϕj​⟩​≤L for every arm jjj.
  • The policy π\piπ is chosen after (d,k,n,L,ϕ)(d, k, n, L, \phi)(d,k,n,L,ϕ) but before (θ∗,ν)(\theta_*, \nu)(θ∗​,ν): one policy must satisfy the bound uniformly over every parameter/bandit pair meeting the remaining conditions.
  • ν\nuν realizes the linear bandit (ϕ,θ∗)(\phi, \theta_*)(ϕ,θ∗​) as above (linear means, 111-sub-Gaussian).
  • ∥θ∗∥≤1\|\theta_*\| \le 1∥θ∗​∥≤1.
  • Bounded mean spread: ⟨θ∗, ϕj−ϕj′⟩≤1\langle \theta_*,\, \phi_j - \phi_{j'}\rangle \le 1⟨θ∗​,ϕj​−ϕj′​⟩≤1 for every ordered pair of arms j,j′j, j'j,j′.

Edge cases.

  • The bound controls only the expected regret Rn\mathfrak{R}_nRn​ (a Bochner integral, 000 by convention if non-integrable); it is not a high-probability statement.
  • The optimal mean is a supremum over the finitely many arms; with k≥1k \ge 1k≥1 it is a genuine maximum.
  • Under n≥2n \ge 2n≥2 and L≥1L \ge 1L≥1, log⁡(nL)≥log⁡2>0\log(nL) \ge \log 2 > 0log(nL)≥log2>0, so the right-hand side is positive.
  • The sub-Gaussian variance proxy is fixed at 111; no other noise assumption appears.
  • Nothing constrains the policy to be computable or to have any specific algorithmic form — only existence is claimed.
Human review
  • Endorsed by Community (Bot) · Jul 29, 2026

  • Endorsed by Shuze Chen · Jul 29, 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 paper
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me