Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Theorem 2 — ConfidenceBall₂ has regret ≤8nTβTln⁡(T+1)\le\sqrt{8nT\beta_T\ln(T+1)}≤8nTβT​ln(T+1)​ for all TTT with probability ≥1−δ\ge1-\delta≥1−δ

Proved
StochLinOpt.UpperBound.confidenceBall2_regret_bound

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

banditslinear-banditsp2o-batch-p100ap2o-gran-per-chapterp2o-plan-paperp2o-v1regret-bounds

Model. Let (Ω,F,P)(\Omega,\mathcal F,\mathbb P)(Ω,F,P) be a probability space with a filtration (Ft)(\mathcal F_t)(Ft​), where Ft\mathcal F_tFt​ is the information available before round t=1,2,…t=1,2,\dotst=1,2,…. The decision set D⊆RnD\subseteq\mathbb R^nD⊆Rn is compact, contains the standard basis vectors e1,…,ene_1,\dots,e_ne1​,…,en​, and lies in the cube [−1,1]n[-1,1]^n[−1,1]n (the standard basis is a barycentric spanner of DDD). The unknown mean μ∈Rn\mu\in\mathbb R^nμ∈Rn satisfies ∣μ⊤y∣≤1|\mu^\top y|\le1∣μ⊤y∣≤1 for y∈Dy\in Dy∈D, and x∗∈Dx^*\in Dx∗∈D minimises μ⊤y\mu^\top yμ⊤y over DDD. On round ttt the learner plays an Ft\mathcal F_tFt​-measurable decision xtx_txt​ and observes an Ft+1\mathcal F_{t+1}Ft+1​-measurable loss ℓt∈[−1,1]\ell_t\in[-1,1]ℓt​∈[−1,1] with

E[ℓt∣Ft]=μ⊤xtand∣ℓt−μ⊤xt∣≤1.\mathbb E[\ell_t\mid\mathcal F_t]=\mu^\top x_t\quad\text{and}\quad|\ell_t-\mu^\top x_t|\le1.E[ℓt​∣Ft​]=μ⊤xt​and∣ℓt​−μ⊤xt​∣≤1.

On every outcome, (xt)(x_t)(xt​) is a run of ConfidenceBall₂(D,δ)(D,\delta)(D,δ) with losses (ℓt)(\ell_t)(ℓt​) (Algorithm 3.1), with 0<δ<10<\delta<10<δ<1 and n≤(83ln⁡(1/δ))2n\le\big(\tfrac83\ln(1/\delta)\big)^2n≤(38​ln(1/δ))2.

Claim. With βT=max⁡(128nln⁡Tln⁡(T2/δ), (83ln⁡(T2/δ))2)\beta_T=\max\big(128n\ln T\ln(T^2/\delta),\ (\tfrac83\ln(T^2/\delta))^2\big)βT​=max(128nlnTln(T2/δ), (38​ln(T2/δ))2) and RT=∑t=1T(μ⊤xt−μ⊤x∗)R_T=\sum_{t=1}^T(\mu^\top x_t-\mu^\top x^*)RT​=∑t=1T​(μ⊤xt​−μ⊤x∗),

Pr⁡(∀T≥1, RT≤8nTβTln⁡(T+1))≥1−δ.\Pr\Big(\forall T\ge1,\ R_T\le\sqrt{8nT\beta_T\ln(T+1)}\Big)\ge1-\delta.Pr(∀T≥1, RT​≤8nTβT​ln(T+1)​)≥1−δ.

Since βT=O(nlog⁡2T)\beta_T=O(n\log^2T)βT​=O(nlog2T), this is regret O∗(nT)O^*(n\sqrt T)O∗(nT​) uniformly over all horizons, with no dependence on the gap of the problem.

Formalization Note Three corrections of the printed statement, each forced by the paper's own proof:

  1. ln⁡(T+1)\ln(T+1)ln(T+1) replaces the printed ln⁡T\ln TlnT: the printed bound is false at T=1T=1T=1 (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 R1=2μ>0R_1=2\mu>0R1​=2μ>0), and the proof, via Lemma 9, gives ln⁡(T+1)\ln(T+1)ln(T+1).
  2. The hypothesis n≤β1=(83ln⁡(1/δ))2n\le\beta_1=(\tfrac83\ln(1/\delta))^2n≤β1​=(38​ln(1/δ))2 is added: the proof of Theorem 5 uses Z1≤n<β1Z_1\le n<\beta_1Z1​≤n<β1​, which fails for δ\deltaδ near 111.
  3. The hypothesis ∣ℓt−μ⊤xt∣≤1|\ell_t-\mu^\top x_t|\le1∣ℓt​−μ⊤xt​∣≤1 is added: Section 5.2 uses ∣ηt∣≤1|\eta_t|\le1∣ηt​∣≤1 while the paper's model only gives ∣ηt∣≤2|\eta_t|\le2∣ηt​∣≤2. It holds when costs lie in [0,1][0,1][0,1].

Section 5 takes the barycentric spanner to be the standard basis without loss of generality. The filtration is general (containing the natural one), the conditional mean is imposed at the chosen decision only, and the event quantifies over all horizons T≥1T\ge1T≥1 at once.


Retired 2026-10-27: a Lean-vs-paper fidelity audit found this statement weaker than, or narrower than, the cited result. A corrected statement will be resubmitted.

Preamble
import Mathlib
import Definitions.Def_StochLinOpt_UpperBound_confidenceBall2
import Definitions.Def_StochLinOpt_UpperBound_analysisQuantities

open Matrix MeasureTheory
Formal statement
namespace StochLinOpt.UpperBound

theorem confidenceBall2_regret_bound {n : ℕ} {Ω : Type*} {mΩ : MeasurableSpace Ω}
    (P : Measure Ω) [IsProbabilityMeasure P] (𝓕 : Filtration ℕ mΩ)
    (D : Set (Fin n → ℝ)) (hD_compact : IsCompact D)
    (hD_basis : ∀ i : Fin n, (Pi.single i (1 : ℝ) : Fin n → ℝ) ∈ D)
    (hD_cube : ∀ y ∈ D, ∀ i, |y i| ≤ 1)
    (μ : Fin n → ℝ) (hμD : ∀ y ∈ D, |μ ⬝ᵥ y| ≤ 1)
    (δ : ℝ) (hδ : 0 < δ) (hδ1 : δ < 1)
    (x : ℕ → Ω → Fin n → ℝ) (ℓ : ℕ → Ω → ℝ)
    (hx_meas : ∀ t : ℕ, 1 ≤ t → Measurable[𝓕 t] (x t))
    (hℓ_meas : ∀ t : ℕ, 1 ≤ t → Measurable[𝓕 (t + 1)] (ℓ t))
    (hℓ_bdd : ∀ t : ℕ, 1 ≤ t → ∀ ω, |ℓ t ω| ≤ 1)
    (hη_bdd : ∀ t : ℕ, 1 ≤ t → ∀ ω, |ℓ t ω - μ ⬝ᵥ x t ω| ≤ 1)
    (hmean : ∀ t : ℕ, 1 ≤ t → P[ℓ t | 𝓕 t] =ᵐ[P] fun ω => μ ⬝ᵥ x t ω)
    (hrun : ∀ ω, IsConfidenceBall2Run D δ (fun t => x t ω) (fun t => ℓ t ω))
    (hβ₁ : (n : ℝ) ≤ (8 / 3 * Real.log (1 / δ)) ^ 2)
    (xstar : Fin n → ℝ) (hxstar : xstar ∈ D ∧ ∀ y ∈ D, μ ⬝ᵥ xstar ≤ μ ⬝ᵥ y) :
    1 - δ ≤ P.real {ω | ∀ T : ℕ, 1 ≤ T →
      regret μ xstar (fun t => x t ω) T ≤
        Real.sqrt (8 * n * T * 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. 5, Theorem 2 (ConfidenceBall2 bullet); proof PDF p. 7
Read-back

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

Let n∈Nn \in \mathbb{N}n∈N and write Rn\mathbb{R}^nRn for real vectors indexed by {0,…,n−1}\{0,\dots,n-1\}{0,…,n−1}, with dot product u⋅v=∑iuiviu \cdot v = \sum_i u_i v_iu⋅v=∑i​ui​vi​. Let (Ω,A)(\Omega, \mathcal{A})(Ω,A) be a measurable space and PPP a probability measure on it. Let (Ft)t∈N(\mathcal{F}_t)_{t \in \mathbb{N}}(Ft​)t∈N​ be a filtration, meaning an increasing sequence of sub-σ-algebras of A\mathcal{A}A indexed by the natural numbers, starting at t=0t = 0t=0. The statement also depends on three objects from imported definition files that are not shown here: the predicate IsConfidenceBall2Run, the function regret and the function beta. This read-back cannot unfold them. It refers to them only by name and by the arguments they receive:

  • Run(D,δ,x,ℓ)\mathrm{Run}(D, \delta, x, \ell)Run(D,δ,x,ℓ) is a predicate on a set DDD, a number δ\deltaδ, a sequence of vectors xxx and a sequence of reals ℓ\ellℓ.
  • Regret(μ,x∗,x,T)\mathrm{Regret}(\mu, x^*, x, T)Regret(μ,x∗,x,T) is a real number that depends on a vector μ\muμ, a vector x∗x^*x∗, a sequence of vectors xxx and a natural number TTT.
  • β(n,δ,T)\beta(n, \delta, T)β(n,δ,T) is a real number that depends on nnn, δ\deltaδ and TTT.

Hypotheses. The statement assumes all of the following:

  • The set DDD. D⊆RnD \subseteq \mathbb{R}^nD⊆Rn is compact. It contains every standard basis vector eie_iei​ for i=0,…,n−1i = 0, \dots, n-1i=0,…,n−1. Every y∈Dy \in Dy∈D has ∣yi∣≤1|y_i| \le 1∣yi​∣≤1 for every coordinate iii.
  • The vector μ\muμ. μ∈Rn\mu \in \mathbb{R}^nμ∈Rn satisfies ∣μ⋅y∣≤1|\mu \cdot y| \le 1∣μ⋅y∣≤1 for every y∈Dy \in Dy∈D.
  • The number δ\deltaδ. δ\deltaδ is a real number with 0<δ<10 < \delta < 10<δ<1.
  • The processes. For each t∈Nt \in \mathbb{N}t∈N there is a function xt:Ω→Rnx_t : \Omega \to \mathbb{R}^nxt​:Ω→Rn and a function ℓt:Ω→R\ell_t : \Omega \to \mathbb{R}ℓt​:Ω→R. For every t≥1t \ge 1t≥1 they satisfy:
    • xtx_txt​ is Ft\mathcal{F}_tFt​-measurable, and ℓt\ell_tℓt​ is Ft+1\mathcal{F}_{t+1}Ft+1​-measurable.
    • For every ω∈Ω\omega \in \Omegaω∈Ω (not just almost every ω\omegaω), ∣ℓt(ω)∣≤1|\ell_t(\omega)| \le 1∣ℓt​(ω)∣≤1 and ∣ℓt(ω)−μ⋅xt(ω)∣≤1|\ell_t(\omega) - \mu \cdot x_t(\omega)| \le 1∣ℓt​(ω)−μ⋅xt​(ω)∣≤1.
    • The conditional expectation of ℓt\ell_tℓt​ given Ft\mathcal{F}_tFt​ equals μ⋅xt\mu \cdot x_tμ⋅xt​ almost surely:
EP[ℓt∣Ft](ω)=μ⋅xt(ω)for P-a.e. ω.\mathbb{E}_P[\ell_t \mid \mathcal{F}_t](\omega) = \mu \cdot x_t(\omega) \quad \text{for } P\text{-a.e. } \omega.EP​[ℓt​∣Ft​](ω)=μ⋅xt​(ω)for P-a.e. ω.
  • No hypothesis says that xt(ω)x_t(\omega)xt​(ω) lies in DDD. Any such requirement could only come from Run\mathrm{Run}Run.
  • The run condition. For every ω∈Ω\omega \in \Omegaω∈Ω, the fixed sequences t↦xt(ω)t \mapsto x_t(\omega)t↦xt​(ω) and t↦ℓt(ω)t \mapsto \ell_t(\omega)t↦ℓt​(ω) satisfy Run(D,δ,(xt(ω))t,(ℓt(ω))t)\mathrm{Run}\big(D, \delta, (x_t(\omega))_t, (\ell_t(\omega))_t\big)Run(D,δ,(xt​(ω))t​,(ℓt​(ω))t​).
  • Dimension versus δ\deltaδ.
n≤(83log⁡1δ)2.n \le \Big(\tfrac{8}{3}\log\tfrac{1}{\delta}\Big)^2.n≤(38​logδ1​)2.

Here log⁡\loglog is the natural logarithm, and log⁡(1/δ)>0\log(1/\delta) > 0log(1/δ)>0 because δ<1\delta < 1δ<1.

  • The comparator x∗x^*x∗. x∗∈Dx^* \in Dx∗∈D and μ⋅x∗≤μ⋅y\mu \cdot x^* \le \mu \cdot yμ⋅x∗≤μ⋅y for every y∈Dy \in Dy∈D. So x∗x^*x∗ is a minimiser of y↦μ⋅yy \mapsto \mu \cdot yy↦μ⋅y over DDD.

Conclusion. Let EEE be the set of ω∈Ω\omega \in \Omegaω∈Ω such that, for every T≥1T \ge 1T≥1 at once,

Regret(μ,x∗,(xt(ω))t∈N,T)  ≤   8 n T β(n,δ,T) log⁡(T+1) .\mathrm{Regret}\big(\mu, x^*, (x_t(\omega))_{t\in\mathbb{N}}, T\big) \;\le\; \sqrt{\,8\, n\, T\, \beta(n,\delta,T)\, \log(T+1)\,}.Regret(μ,x∗,(xt​(ω))t∈N​,T)≤8nTβ(n,δ,T)log(T+1)​.

Then P(E)≥1−δP(E) \ge 1 - \deltaP(E)≥1−δ, where P(E)P(E)P(E) is taken as a real number. The statement does not claim that EEE is measurable. If EEE is not measurable, P(E)P(E)P(E) means the outer measure of EEE. The square root here is the real square root, which returns 000 for a negative argument. So if 8nTβ(n,δ,T)log⁡(T+1)<08 n T \beta(n,\delta,T)\log(T+1) < 08nTβ(n,δ,T)log(T+1)<0, the bound for that TTT reads Regret≤0\mathrm{Regret} \le 0Regret≤0.

Degenerate cases.

  • Index t=0t = 0t=0. Nothing constrains x0x_0x0​ or ℓ0\ell_0ℓ0​ (measurability, boundedness or conditional mean), except whatever Run\mathrm{Run}Run requires. The conclusion quantifies only over T≥1T \ge 1T≥1, but whether Regret(⋅,T)\mathrm{Regret}(\cdot, T)Regret(⋅,T) uses index 000 is fixed by the unseen definition.
  • Measurability and integrability. Each ℓt\ell_tℓt​ with t≥1t \ge 1t≥1 is bounded and A\mathcal{A}A-measurable, so it is PPP-integrable. The conditional expectation is therefore not the default value 000 that is returned for non-integrable functions.
  • Dimension n=0n = 0n=0. R0\mathbb{R}^0R0 has one point, the empty vector 000. The basis hypothesis is vacuous. Because x∗∈Dx^* \in Dx∗∈D, the set DDD must be {0}\{0\}{0}, so every dot product is 000. The dimension hypothesis 0≤(⋅)20 \le (\cdot)^20≤(⋅)2 holds automatically. The right-hand side becomes 0=0\sqrt{0} = 00​=0, so the conclusion says that with probability at least 1−δ1 - \delta1−δ, Regret≤0\mathrm{Regret} \le 0Regret≤0 for all T≥1T \ge 1T≥1.
  • Dimension n≥1n \ge 1n≥1. The dimension hypothesis forces δ≤exp⁡ ⁣(−38n)\delta \le \exp\!\big(-\tfrac{3}{8}\sqrt{n}\big)δ≤exp(−83​n​), which is a real restriction on δ\deltaδ.
  • Emptiness of DDD. DDD is never empty, because it contains x∗x^*x∗.
  • Possible vacuity. It cannot be determined here whether the "for every ω\omegaω" run condition, together with the other hypotheses, can be satisfied. That depends on the unseen definition of Run\mathrm{Run}Run. If it cannot be satisfied, the theorem is vacuous.
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