Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Theorem 6 (corrected) — ∑t≤Trt2≤8nβTln⁡(T+1)\sum_{t\le T}r_t^2\le8n\beta_T\ln(T+1)∑t≤T​rt2​≤8nβT​ln(T+1) while μ∈Bt2\mu\in B^2_tμ∈Bt2​

Proved
StochLinOpt.UpperBound.sum_sq_instRegret_le

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

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

Let D⊆[−1,1]nD\subseteq[-1,1]^nD⊆[−1,1]n, 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 0<δ<10<\delta<10<δ<1 with β1≥1\beta_1\ge1β1​≥1, and let (xt)(x_t)(xt​) be a run of ConfidenceBall₂(D,δ)(D,\delta)(D,δ) with losses (ℓt)(\ell_t)(ℓt​). Write rt=μ⊤xt−μ⊤x∗r_t=\mu^\top x_t-\mu^\top x^*rt​=μ⊤xt​−μ⊤x∗ for the instantaneous regret. If μ∈Bt2\mu\in B^2_tμ∈Bt2​ for every 1≤t≤T1\le t\le T1≤t≤T, then

∑t=1Trt2≤8n βTln⁡(T+1).\sum_{t=1}^{T}r_t^2\le8n\,\beta_T\ln(T+1).t=1∑T​rt2​≤8nβT​ln(T+1).

This is the sum-of-squares regret bound: on the event that the confidence ellipsoids contain the true mean, the regret is controlled deterministically. Together with the confidence theorem (Theorem 5) and Cauchy–Schwarz, it gives the problem-independent upper bound.

Formalization Note The paper prints 8nβTln⁡T8n\beta_T\ln T8nβT​lnT; the proof, via Lemma 9, gives 8nβTln⁡(T+1)8n\beta_T\ln(T+1)8nβT​ln(T+1), and the printed bound is false at T=1T=1T=1 (with n=1n=1n=1, D=[−1,1]D=[-1,1]D=[−1,1], μ>0\mu>0μ>0, the tie-break x1=1x_1=1x1​=1 gives r12=4μ2>0r_1^2=4\mu^2>0r12​=4μ2>0). The paper's proof uses "1<β11<\beta_11<β1​"; it is added as the hypothesis β1≥1\beta_1\ge1β1​≥1, which holds whenever n≥1n\ge1n≥1 and n≤β1n\le\beta_1n≤β1​. The statement is deterministic.

Preamble
import Mathlib
import Definitions.Def_StochLinOpt_UpperBound_confidenceBall2
import Definitions.Def_StochLinOpt_UpperBound_analysisQuantities

open Matrix
Formal statement
namespace StochLinOpt.UpperBound

theorem sum_sq_instRegret_le {n : ℕ} (D : Set (Fin n → ℝ)) (δ : ℝ)
    (μ xstar : Fin n → ℝ) (x : ℕ → Fin n → ℝ) (ℓ : ℕ → ℝ)
    (hD_cube : ∀ y ∈ D, ∀ i, |y i| ≤ 1)
    (hμD : ∀ y ∈ D, |μ ⬝ᵥ y| ≤ 1)
    (hxstar : xstar ∈ D ∧ ∀ y ∈ D, μ ⬝ᵥ xstar ≤ μ ⬝ᵥ y)
    (hδ : 0 < δ) (hδ1 : δ < 1) (hβ₁ : 1 ≤ beta n δ 1)
    (hrun : IsConfidenceBall2Run D δ x ℓ) (T : ℕ)
    (hμ : ∀ t ∈ Finset.Icc 1 T, μ ∈ confBall δ x ℓ t) :
    ∑ t ∈ Finset.Icc 1 T, (μ ⬝ᵥ x t - μ ⬝ᵥ xstar) ^ 2 ≤
      8 * n * beta n δ T * Real.log (T + 1) := by sorry

end StochLinOpt.UpperBound
Source
Dani, Hayes, Kakade, Stochastic Linear Optimization under Bandit Feedback, COLT 2008, PDF p. 7, Theorem 6 (ConfidenceBall2 bullet); proof PDF p. 8, Section 5.1
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, μ,x∗∈Rn\mu, x^* \in \mathbb{R}^nμ,x∗∈Rn, a sequence xxx in Rn\mathbb{R}^nRn, a real sequence ℓ\ellℓ, and T∈NT \in \mathbb{N}T∈N. 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);
  • 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​}.

Hypotheses.

  1. Every y∈Dy \in Dy∈D satisfies ∣yi∣≤1|y_i| \le 1∣yi​∣≤1 for all coordinates iii.
  2. ∣⟨μ,y⟩∣≤1|\langle\mu,y\rangle|\le1∣⟨μ,y⟩∣≤1 for all y∈Dy\in Dy∈D.
  3. 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.
  4. 0<δ<10<\delta<10<δ<1.
  5. 1≤β11 \le \beta_11≤β1​. Since ln⁡1=0\ln 1 = 0ln1=0, β1=(83ln⁡1δ)2\beta_1 = (\tfrac83\ln\tfrac1\delta)^2β1​=(38​lnδ1​)2, so with 0<δ<10<\delta<10<δ<1 this condition is equivalent to δ≤e−3/8\delta \le e^{-3/8}δ≤e−3/8.
  6. 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.
  7. μ∈Bt\mu \in B_tμ∈Bt​ for every ttt with 1≤t≤T1\le t\le T1≤t≤T.

Conclusion.

∑t=1T(⟨μ,xt⟩−⟨μ,x∗⟩)2  ≤  8 n βT ln⁡(T+1).\sum_{t=1}^{T}\big(\langle\mu,x_t\rangle-\langle\mu,x^*\rangle\big)^2 \;\le\; 8\,n\,\beta_T\,\ln(T+1).t=1∑T​(⟨μ,xt​⟩−⟨μ,x∗⟩)2≤8nβT​ln(T+1).

The statement is fully deterministic: hypothesis 7 is simply assumed for every round up to TTT.

Degenerate cases.

  • T=0T = 0T=0: the claim is 0≤8nβ0ln⁡1=00 \le 8n\beta_0\ln 1 = 00≤8nβ0​ln1=0.
  • DDD empty: hypothesis 3 fails, so the statement is vacuous.
  • 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