Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Theorem 1, p. 12 — under covariate diversity the two-armed Greedy Bandit has R_T ≤ A log T + A + 160 b_max x³_max d/λ₀ + 2x_max b_max

Proved
MostlyExplorationFree.GreedyBandit.theorem_1

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

contextual-banditcovariate-diversitygreedy-algorithmp2o-batch-pfp2ap2o-gran-per-chapterp2o-plan-paperp2o-v1regret

Consider the Greedy Bandit (Algorithm 1) on the two-armed linear contextual bandit in dimension d≥2d \ge 2d≥2, with σ\sigmaσ-sub-Gaussian noise (σ>0\sigma > 0σ>0), under Assumption 1 (contexts bounded by xmax⁡x_{\max}xmax​ and parameters by bmax⁡b_{\max}bmax​ in ℓ2\ell_2ℓ2​), Assumption 2 (margin condition with constant C0C_0C0​) and Assumption 3 (covariate diversity with constant λ0\lambda_0λ0​). Let

Cˉ=13+72(log⁡d)−1/2+383(log⁡d)−1+674(log⁡d)−3/2,A=128C0Cˉxmax⁡4σ2d(log⁡d)3/2λ02.\bar C = \frac13 + \frac72(\log d)^{-1/2} + \frac{38}{3}(\log d)^{-1} + \frac{67}{4}(\log d)^{-3/2}, \qquad A = \frac{128 C_0 \bar C x_{\max}^4 \sigma^2 d (\log d)^{3/2}}{\lambda_0^2}.Cˉ=31​+27​(logd)−1/2+338​(logd)−1+467​(logd)−3/2,A=λ02​128C0​Cˉxmax4​σ2d(logd)3/2​.

Then for every horizon T≥3T \ge 3T≥3 the cumulative expected regret satisfies

RT≤Alog⁡T+(A+160 bmax⁡xmax⁡3dλ0+2xmax⁡bmax⁡).R_T \le A \log T + \Big(A + \frac{160\, b_{\max} x_{\max}^3 d}{\lambda_0} + 2 x_{\max} b_{\max}\Big).RT​≤AlogT+(A+λ0​160bmax​xmax3​d​+2xmax​bmax​).

In particular RT=O(log⁡T)R_T = O(\log T)RT​=O(logT): an algorithm that never explores attains the optimal logarithmic regret rate of the two-armed contextual bandit once the context distribution is diverse enough. This is the paper's main result.

Formalization Note

  1. The bound is the one the proof establishes (p. 42). The printed display (3) also multiplies 160bmax⁡xmax⁡3d/λ0+2xmax⁡bmax⁡160b_{\max}x_{\max}^3d/\lambda_0 + 2x_{\max}b_{\max}160bmax​xmax3​d/λ0​+2xmax​bmax​ by Cˉ\bar CCˉ, which the proof never produces; whenever Cˉ≥1\bar C \ge 1Cˉ≥1 (every ddd with log⁡d≤64\log d \le 64logd≤64) the bound stated here is at least as strong as (3). The consequence "≤CGBlog⁡T\le C_{GB}\log T≤CGB​logT" follows at once from log⁡T≥1\log T \ge 1logT≥1 for T≥3T \ge 3T≥3 and is not restated.
  2. d≥2d \ge 2d≥2 is assumed because Cˉ\bar CCˉ divides by log⁡d\log dlogd (the paper's own range Cˉ∈(1/3,52)\bar C \in (1/3, 52)Cˉ∈(1/3,52) needs it); σ>0\sigma > 0σ>0 because C2,C3C_2, C_3C2​,C3​ divide by σ2\sigma^2σ2.
  3. Noise sub-Gaussianity is two-sided and the context law need not have a density; see the model definition.
Preamble
import Mathlib
import Definitions.Def_MostlyExplorationFree_GreedyBandit_Model

open Matrix MeasureTheory ProbabilityTheory
Formal statement
namespace MostlyExplorationFree.GreedyBandit

theorem theorem_1 {Ω : Type*} [MeasurableSpace Ω] (P : Measure Ω) {d : ℕ} (hd : 2 ≤ d)
    (μ : Measure (Fin d → ℝ)) (X : ℕ → Ω → Fin d → ℝ) (ε : Fin 2 → ℕ → Ω → ℝ)
    (W : ℕ → Ω → Bool) (σ : ℝ) (hσ : 0 < σ) (β : Fin 2 → Fin d → ℝ)
    (xmax bmax C0 lam0 : ℝ)
    (hmodel : IsGreedyModel P μ X ε W σ) (hA1 : ParameterSet μ β xmax bmax)
    (hA2 : MarginCondition μ β C0) (hA3 : CovariateDiversity μ lam0)
    (T : ℕ) (hT : 3 ≤ T) :
    regret β X ε W P T
      ≤ 128 * C0 * Cbar d * xmax ^ 4 * σ ^ 2 * d * Real.log d ^ (3 / 2 : ℝ) / lam0 ^ 2
          * Real.log T
        + (128 * C0 * Cbar d * xmax ^ 4 * σ ^ 2 * d * Real.log d ^ (3 / 2 : ℝ) / lam0 ^ 2
          + 160 * bmax * xmax ^ 3 * d / lam0 + 2 * xmax * bmax) := by sorry

end MostlyExplorationFree.GreedyBandit
Source
Bastani, Bayati & Khosravi, arXiv:1704.09011v8, p. 12, Theorem 1 and display (4) (bound in the form proved on p. 42, Appendix C)
Human review
  • Endorsed by Shuze Chen · Oct 22, 2026

    Confirmed by the moderator at approval.

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