Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Lemma 14 — Pr⁡(∀t, ∑τ<tMτ≤βt/2)≥1−δ\Pr(\forall t,\ \sum_{\tau<t}M_\tau\le\beta_t/2)\ge1-\deltaPr(∀t, ∑τ<t​Mτ​≤βt​/2)≥1−δ

Proved
StochLinOpt.UpperBound.martingale_sum_le_half_beta

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

banditsconcentrationlinear-banditsp2o-batch-p100ap2o-gran-per-chapterp2o-plan-paperp2o-v1probability

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 ttt. The decision set D⊆[−1,1]nD\subseteq[-1,1]^nD⊆[−1,1]n is compact and contains e1,…,ene_1,\dots,e_ne1​,…,en​; the unknown mean μ∈Rn\mu\in\mathbb R^nμ∈Rn satisfies ∣μ⊤y∣≤1|\mu^\top y|\le1∣μ⊤y∣≤1 on DDD; and 0<δ<10<\delta<10<δ<1. The decisions xtx_txt​ are Ft\mathcal F_tFt​-measurable, the losses ℓt∈[−1,1]\ell_t\in[-1,1]ℓt​∈[−1,1] are Ft+1\mathcal F_{t+1}Ft+1​-measurable, E[ℓt∣Ft]=μ⊤xt\mathbb E[\ell_t\mid\mathcal F_t]=\mu^\top x_tE[ℓt​∣Ft​]=μ⊤xt​ almost surely, the noise satisfies ∣ℓt−μ⊤xt∣≤1|\ell_t-\mu^\top x_t|\le1∣ℓt​−μ⊤xt​∣≤1, and on every outcome (xt)(x_t)(xt​) is a run of ConfidenceBall₂(D,δ)(D,\delta)(D,δ) with losses (ℓt)(\ell_t)(ℓt​).

With Mt=2ηtEt xt⊤(μ^t−μ)/(1+wt2)M_t=2\eta_tE_t\,x_t^\top(\hat\mu_t-\mu)/(1+w_t^2)Mt​=2ηt​Et​xt⊤​(μ^​t​−μ)/(1+wt2​),

Pr⁡(∀t≥1, ∑τ=1t−1Mτ≤βt2)≥1−δ.\Pr\Big(\forall t\ge1,\ \sum_{\tau=1}^{t-1}M_\tau\le\frac{\beta_t}{2}\Big)\ge1-\delta.Pr(∀t≥1, τ=1∑t−1​Mτ​≤2βt​​)≥1−δ.

This is the concentration step of the confidence argument, obtained from Freedman's inequality and a union bound over ttt.

Formalization Note The event is a single event quantified over all t≥1t\ge1t≥1. The hypothesis ∣ℓt−μ⊤xt∣≤1|\ell_t-\mu^\top x_t|\le1∣ℓt​−μ⊤xt​∣≤1 is added: the paper's proof uses ∣ητ∣≤1|\eta_\tau|\le1∣ητ​∣≤1 (PDF p. 10), but its model only gives ∣ηt∣≤2|\eta_t|\le2∣ηt​∣≤2; the hypothesis holds when costs lie in [0,1][0,1][0,1]. A general filtration makes the statement more general than the natural filtration of the losses; the proof uses only the listed properties. The conditional-mean hypothesis is imposed only at the chosen decision xtx_txt​, which is weaker than the paper's "for all x∈Dx\in Dx∈D". The Section 5 coordinates (spanner equal to the standard basis) are without loss of generality.

Preamble
import Mathlib
import Definitions.Def_StochLinOpt_UpperBound_confidenceBall2
import Definitions.Def_StochLinOpt_UpperBound_analysisQuantities

open Matrix MeasureTheory
Formal statement
namespace StochLinOpt.UpperBound

theorem martingale_sum_le_half_beta {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 ω)) :
    1 - δ ≤ P.real {ω | ∀ t : ℕ, 1 ≤ t →
      ∑ τ ∈ Finset.Ico 1 t, mIncrement δ μ (fun s => x s ω) (fun s => ℓ s ω) τ ≤
        beta n δ t / 2} := by sorry

end StochLinOpt.UpperBound
Source
Dani, Hayes, Kakade, Stochastic Linear Optimization under Bandit Feedback, COLT 2008, PDF p. 9, Lemma 14; proof PDF p. 10, Section 5.2.1
Read-back

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

Setting. (Ω,P)(\Omega,P)(Ω,P) is a probability space with filtration (Fk)k∈N(\mathcal{F}_k)_{k\in\mathbb{N}}(Fk​)k∈N​, and n∈Nn\in\mathbb{N}n∈N. The notation, for a fixed outcome ω\omegaω (with xs=xs(ω)x_s = x_s(\omega)xs​=xs​(ω), ℓs=ℓs(ω)\ell_s = \ell_s(\omega)ℓs​=ℓs​(ω)), is:

  • βt=max⁡(128nln⁡tln⁡t2δ,(83ln⁡t2δ)2)\beta_t=\max\big(128n\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​};
  • wt=xt⊤At−1xtw_t=\sqrt{x_t^\top A_t^{-1}x_t}wt​=xt⊤​At−1​xt​​;
  • Zt=(μ^t−μ)⊤At(μ^t−μ)Z_t=(\hat\mu_t-\mu)^\top A_t(\hat\mu_t-\mu)Zt​=(μ^​t​−μ)⊤At​(μ^​t​−μ);
  • Et=1E_t=1Et​=1 if Zτ≤βτZ_\tau\le\beta_\tauZτ​≤βτ​ for all 1≤τ≤t1\le\tau\le t1≤τ≤t, and 000 otherwise;
  • Mt=2(ℓt−⟨μ,xt⟩) Et ⟨xt,μ^t−μ⟩1+wt2M_t=\dfrac{2(\ell_t-\langle\mu,x_t\rangle)\,E_t\,\langle x_t,\hat\mu_t-\mu\rangle}{1+w_t^2}Mt​=1+wt2​2(ℓt​−⟨μ,xt​⟩)Et​⟨xt​,μ^​t​−μ⟩​.

Hypotheses.

  1. D⊆RnD\subseteq\mathbb{R}^nD⊆Rn is compact, contains every standard basis vector eie_iei​, and satisfies ∣yi∣≤1|y_i|\le1∣yi​∣≤1 for all y∈Dy\in Dy∈D and all iii.
  2. μ∈Rn\mu\in\mathbb{R}^nμ∈Rn is a fixed (non-random) vector with ∣⟨μ,y⟩∣≤1|\langle\mu,y\rangle|\le1∣⟨μ,y⟩∣≤1 for all y∈Dy\in Dy∈D.
  3. 0<δ<10<\delta<10<δ<1.
  4. xt:Ω→Rnx_t:\Omega\to\mathbb{R}^nxt​:Ω→Rn and ℓt:Ω→R\ell_t:\Omega\to\mathbb{R}ℓt​:Ω→R for t∈Nt \in \mathbb{N}t∈N, and for every t≥1t\ge1t≥1:
    • xtx_txt​ is Ft\mathcal{F}_tFt​-measurable;
    • ℓt\ell_tℓt​ is Ft+1\mathcal{F}_{t+1}Ft+1​-measurable;
    • ∣ℓt(ω)∣≤1|\ell_t(\omega)|\le1∣ℓt​(ω)∣≤1 for every ω\omegaω;
    • ∣ℓt(ω)−⟨μ,xt(ω)⟩∣≤1|\ell_t(\omega)-\langle\mu,x_t(\omega)\rangle|\le1∣ℓt​(ω)−⟨μ,xt​(ω)⟩∣≤1 for every ω\omegaω;
    • E[ℓt∣Ft]=⟨μ,xt⟩\mathbb{E}[\ell_t\mid\mathcal{F}_t]=\langle\mu,x_t\rangleE[ℓt​∣Ft​]=⟨μ,xt​⟩ almost surely.
  5. For every outcome ω\omegaω (not just almost every one), (xt(ω))t(x_t(\omega))_t(xt​(ω))t​ is a run with losses (ℓt(ω))t(\ell_t(\omega))_t(ℓt​(ω))t​: 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.

x0x_0x0​ and ℓ0\ell_0ℓ0​ are unconstrained.

Conclusion.

P(for every t≥1: ∑τ=1t−1Mτ≤βt2)  ≥  1−δ.P\Big(\text{for every } t\ge1:\ \sum_{\tau=1}^{t-1}M_\tau \le \tfrac{\beta_t}{2}\Big) \;\ge\; 1-\delta.P(for every t≥1: τ=1∑t−1​Mτ​≤2βt​​)≥1−δ.

This is a single event covering all rounds t≥1t \ge 1t≥1, with no horizon.

Degenerate cases.

  • t=1t=1t=1: the sum is empty, so the requirement is 0≤β1/20\le\beta_1/20≤β1​/2, which always holds.
  • n=0n=0n=0: every Mτ=0M_\tau=0Mτ​=0, so the event is all of Ω\OmegaΩ.
  • n=0n=0n=0 with DDD empty: hypothesis 5 cannot hold (Ω\OmegaΩ is nonempty because PPP is a probability measure), so the statement is vacuous.
  • Division: the denominators 1+wt2≥11+w_t^2\ge11+wt2​≥1, so there is no division by zero.

StochLinOpt.UpperBound.confidence

Setting and hypotheses. These are the same as in the previous statement. (Ω,P)(\Omega,P)(Ω,P) is a probability space with filtration (Fk)(\mathcal{F}_k)(Fk​). The notation, for a fixed outcome ω\omegaω, is:

  • βt=max⁡(128nln⁡tln⁡t2δ,(83ln⁡t2δ)2)\beta_t=\max\big(128n\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​}.

The hypotheses are:

  1. D⊆RnD\subseteq\mathbb{R}^nD⊆Rn is compact, contains every standard basis vector, and lies in the cube [−1,1]n[-1,1]^n[−1,1]n.
  2. μ∈Rn\mu\in\mathbb{R}^nμ∈Rn is fixed, with ∣⟨μ,y⟩∣≤1|\langle\mu,y\rangle|\le1∣⟨μ,y⟩∣≤1 on DDD.
  3. 0<δ<10<\delta<10<δ<1.
  4. Random xt:Ω→Rnx_t:\Omega\to\mathbb{R}^nxt​:Ω→Rn and ℓt:Ω→R\ell_t:\Omega\to\mathbb{R}ℓt​:Ω→R such that, for every t≥1t\ge1t≥1:
    • xtx_txt​ is Ft\mathcal{F}_tFt​-measurable;
    • ℓt\ell_tℓt​ is Ft+1\mathcal{F}_{t+1}Ft+1​-measurable;
    • ∣ℓt∣≤1|\ell_t|\le1∣ℓt​∣≤1 and ∣ℓt−⟨μ,xt⟩∣≤1|\ell_t-\langle\mu,x_t\rangle|\le1∣ℓt​−⟨μ,xt​⟩∣≤1 at every outcome;
    • E[ℓt∣Ft]=⟨μ,xt⟩\mathbb{E}[\ell_t\mid\mathcal{F}_t]=\langle\mu,x_t\rangleE[ℓt​∣Ft​]=⟨μ,xt​⟩ almost surely.
  5. For every outcome ω\omegaω, (xt(ω))(x_t(\omega))(xt​(ω)) is a run with losses (ℓt(ω))(\ell_t(\omega))(ℓt​(ω)): 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.

One additional hypothesis:

  1. n≤(83ln⁡1δ)2n\le\big(\tfrac83\ln\tfrac1\delta\big)^2n≤(38​lnδ1​)2. This quantity equals β1\beta_1β1​, so the condition says n≤β1n \le \beta_1n≤β1​. Given 0<δ<10<\delta<10<δ<1, it is equivalent to δ≤e−3n/8\delta\le e^{-3\sqrt n/8}δ≤e−3n​/8.

Conclusion.

P(μ∈Bt  for every t≥1)  ≥  1−δ.P\big(\mu\in B_t \ \text{ for every } t\ge1\big)\;\ge\;1-\delta.P(μ∈Bt​  for every t≥1)≥1−δ.

Here BtB_tBt​ is built from the outcome's own x1,…,xt−1x_1,\dots,x_{t-1}x1​,…,xt−1​ and ℓ1,…,ℓt−1\ell_1,\dots,\ell_{t-1}ℓ1​,…,ℓt−1​.

Degenerate cases.

  • t=1t=1t=1: A1=IA_1=IA1​=I, μ^1=0\hat\mu_1=0μ^​1​=0 and B1={ν:∥ν∥2≤β1}B_1=\{\nu:\|\nu\|^2\le\beta_1\}B1​={ν:∥ν∥2≤β1​}.
  • n=0n=0n=0: the event is all of Ω\OmegaΩ, provided DDD is nonempty. If DDD is empty, hypothesis 5 cannot hold (Ω\OmegaΩ is nonempty) and the statement is vacuous.
  • x0x_0x0​ and ℓ0\ell_0ℓ0​: unconstrained and unused.
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