Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Lemma 8 — instantaneous regret at most 2min⁡(βtwt,1)2\min(\sqrt{\beta_t}w_t,1)2min(βt​​wt​,1)

Proved
StochLinOpt.UpperBound.instRegret_le_two_min_width

by mikedeng1 · Sep 26, 2026 · Mathlib 0df444a (Lean v4.33.1)

banditslinear-banditsp2o-batch-p100ap2o-gran-per-chapterp2o-plan-paperp2o-v1

Let D⊆RnD\subseteq\mathbb R^nD⊆Rn, let μ∈Rn\mu\in\mathbb R^nμ∈Rn satisfy ∣μ⊤y∣≤1|\mu^\top y|\le1∣μ⊤y∣≤1 for all y∈Dy\in Dy∈D, and let x∗∈Dx^*\in Dx∗∈D minimise μ⊤y\mu^\top yμ⊤y over DDD. Let (xt)(x_t)(xt​) be a run of ConfidenceBall₂(D,δ)(D,\delta)(D,δ) with losses (ℓt)(\ell_t)(ℓt​), and let wt=xt⊤At−1xtw_t=\sqrt{x_t^\top A_t^{-1}x_t}wt​=xt⊤​At−1​xt​​. Fix a round t≥1t\ge1t≥1. If μ∈Bt2\mu\in B^2_tμ∈Bt2​, then the instantaneous regret rt=μ⊤xt−μ⊤x∗r_t=\mu^\top x_t-\mu^\top x^*rt​=μ⊤xt​−μ⊤x∗ satisfies

rt≤2min⁡(βt wt, 1).r_t\le2\min\big(\sqrt{\beta_t}\,w_t,\ 1\big).rt​≤2min(βt​​wt​, 1).

This is the per-round step of the upper bound: while the confidence ellipsoid contains the true mean, the regret of a round is controlled by the width of the ellipsoid in the chosen direction.

Formalization Note The statement is deterministic (pathwise). Rounds are indexed from 111. The bound by 222 comes from ∣μ⊤y∣≤1|\mu^\top y|\le1∣μ⊤y∣≤1 on DDD, which is the paper's assumption that expected costs lie in [−1,1][-1,1][−1,1].

Preamble
import Mathlib
import Definitions.Def_StochLinOpt_UpperBound_confidenceBall2
import Definitions.Def_StochLinOpt_UpperBound_analysisQuantities

open Matrix
Formal statement
namespace StochLinOpt.UpperBound

theorem instRegret_le_two_min_width {n : ℕ} (D : Set (Fin n → ℝ)) (δ : ℝ)
    (μ xstar : Fin n → ℝ) (x : ℕ → Fin n → ℝ) (ℓ : ℕ → ℝ)
    (hμD : ∀ y ∈ D, |μ ⬝ᵥ y| ≤ 1)
    (hxstar : xstar ∈ D ∧ ∀ y ∈ D, μ ⬝ᵥ xstar ≤ μ ⬝ᵥ y)
    (hrun : IsConfidenceBall2Run D δ x ℓ) (t : ℕ) (ht : 1 ≤ t)
    (hμ : μ ∈ confBall δ x ℓ t) :
    μ ⬝ᵥ x t - μ ⬝ᵥ xstar ≤ 2 * min (Real.sqrt (beta n δ t) * width x t) 1 := by sorry

end StochLinOpt.UpperBound
Source
Dani, Hayes, Kakade, Stochastic Linear Optimization under Bandit Feedback, COLT 2008, PDF p. 8, Lemma 8 (ConfidenceBall2 bullet)
Read-back

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

Setting. D⊆RnD \subseteq \mathbb{R}^nD⊆Rn, δ∈R\delta \in \mathbb{R}δ∈R (no constraint), μ,x∗∈Rn\mu, x^* \in \mathbb{R}^nμ,x∗∈Rn, a sequence xxx in Rn\mathbb{R}^nRn and a real sequence ℓ\ellℓ. The notation is:

  • βt=max⁡(128nln⁡tln⁡t2δ,(83ln⁡t2δ)2)\beta_t = \max\big(128 n \ln t \ln\tfrac{t^2}{\delta}, (\tfrac83\ln\tfrac{t^2}{\delta})^2\big)βt​=max(128nlntlnδt2​,(38​lnδt2​)2), with ln⁡0=0\ln 0 = 0ln0=0 and ln⁡(−u)=ln⁡u\ln(-u) = \ln uln(−u)=lnu;
  • At=I+∑1≤τ<txτxτ⊤A_t = I + \sum_{1\le\tau<t} x_\tau x_\tau^\topAt​=I+∑1≤τ<t​xτ​xτ⊤​;
  • μ^t=At−1∑1≤τ<tℓτxτ\hat\mu_t = A_t^{-1}\sum_{1\le\tau<t}\ell_\tau x_\tauμ^​t​=At−1​∑1≤τ<t​ℓτ​xτ​;
  • Bt={ν:(ν−μ^t)⊤At(ν−μ^t)≤βt}B_t = \{\nu : (\nu-\hat\mu_t)^\top A_t(\nu-\hat\mu_t)\le\beta_t\}Bt​={ν:(ν−μ^​t​)⊤At​(ν−μ^​t​)≤βt​};
  • wt=xt⊤At−1xtw_t = \sqrt{x_t^\top A_t^{-1}x_t}wt​=xt⊤​At−1​xt​​.

Hypotheses.

  1. ∣⟨μ,y⟩∣≤1|\langle\mu, y\rangle| \le 1∣⟨μ,y⟩∣≤1 for all y∈Dy \in Dy∈D.
  2. x∗∈Dx^* \in Dx∗∈D and ⟨μ,x∗⟩≤⟨μ,y⟩\langle\mu, x^*\rangle \le \langle\mu, y\rangle⟨μ,x∗⟩≤⟨μ,y⟩ for all y∈Dy\in Dy∈D.
  3. xxx is a run: for every s≥1s\ge1s≥1, xs∈Dx_s\in Dxs​∈D and some μ~s∈Bs\tilde\mu_s \in B_sμ~​s​∈Bs​ satisfies ⟨μ~s,xs⟩≤⟨ν,y⟩\langle\tilde\mu_s,x_s\rangle \le \langle\nu,y\rangle⟨μ~​s​,xs​⟩≤⟨ν,y⟩ for all ν∈Bs\nu\in B_sν∈Bs​ and y∈Dy\in Dy∈D.
  4. t∈Nt \in \mathbb{N}t∈N with t≥1t \ge 1t≥1.
  5. μ∈Bt\mu \in B_tμ∈Bt​ for this single ttt.

Conclusion.

⟨μ,xt⟩−⟨μ,x∗⟩  ≤  2min⁡(βt wt, 1).\langle\mu, x_t\rangle - \langle\mu, x^*\rangle \;\le\; 2\min\big(\sqrt{\beta_t}\, w_t,\ 1\big).⟨μ,xt​⟩−⟨μ,x∗⟩≤2min(βt​​wt​, 1).

Degenerate cases.

  • DDD empty: hypothesis 2 cannot hold, so the statement is vacuous.
  • δ=0\delta = 0δ=0: βt=0\beta_t = 0βt​=0, so Bt={μ^t}B_t = \{\hat\mu_t\}Bt​={μ^​t​} and hypothesis 5 forces μ=μ^t\mu = \hat\mu_tμ=μ^​t​. The claim is then ⟨μ,xt⟩≤⟨μ,x∗⟩\langle\mu,x_t\rangle \le \langle\mu,x^*\rangle⟨μ,xt​⟩≤⟨μ,x∗⟩.
  • t=1t = 1t=1, δ=1\delta = 1δ=1: β1=0\beta_1 = 0β1​=0, so B1={0}B_1=\{0\}B1​={0}, which forces μ=0\mu = 0μ=0. Both sides are then 000.
  • δ<0\delta < 0δ<0: behaves as ∣δ∣|\delta|∣δ∣.
  • n=0n = 0n=0: both sides are 000.
Human review
  • Endorsed by Shuze Chen · Sep 27, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Sep 27, 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