Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Equation (3.1) — the number of experts is Σ_{L ≤ Ldim} C(T, L) ≤ (eT/Ldim)^Ldim

Proved
OnlineLearningOCO.Agnostic.eq_3_1

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

binomial-coefficientscombinatoricsonline-learningp2o-batch-pfp2bp2o-gran-per-chapterp2o-plan-paperp2o-v1

Fix a horizon TTT and an integer LLL with 1≤L≤T1 \le L \le T1≤L≤T. The experts Expert(i1,…,iℓ)(i_1,\dots,i_\ell)(i1​,…,iℓ​) of §3.2.1 with ℓ≤L\ell \le Lℓ≤L and 1≤i1<⋯<iℓ≤T1 \le i_1 < \dots < i_\ell \le T1≤i1​<⋯<iℓ​≤T correspond to the subsets of {1,…,T}\{1,\dots,T\}{1,…,T} of size at most LLL. Their number is

d=∑j=0L(Tj)≤(eTL)L.d = \sum_{j=0}^{L} \binom{T}{j} \le \Big(\frac{eT}{L}\Big)^{L}.d=j=0∑L​(jT​)≤(LeT​)L.

With L=Ldim⁡(H)L = \operatorname{Ldim}(H)L=Ldim(H) this is the bound on the number of experts used in the proof of Theorem 3.6: it gives log⁡d≤Lln⁡(eT/L)\log d \le L \ln(eT/L)logd≤Lln(eT/L), which turns the log⁡(d) T\sqrt{\log(d)\,T}log(d)T​ regret of Weighted Majority into the Ldim⁡(H)ln⁡(eT/Ldim⁡(H)) T\sqrt{\operatorname{Ldim}(H)\ln(eT/\operatorname{Ldim}(H))\,T}Ldim(H)ln(eT/Ldim(H))T​ bound.

Formalization Note Subsets of rounds are represented 0-based as subsets of {0,…,T−1}\{0,\dots,T-1\}{0,…,T−1}. The hypothesis 1≤L≤T1 \le L \le T1≤L≤T is the paper's implicit range: for T=1T = 1T=1, L=3L = 3L=3 the left side is 222 while (e/3)3<1(e/3)^3 < 1(e/3)3<1.

Preamble
import Mathlib
Formal statement
namespace OnlineLearningOCO.Agnostic

/-- Equation (3.1), p. 168. The experts Expert(I) with `I ⊆ {0,…,T−1}` and `|I| ≤ L` number
`d = ∑_{j=0}^{L} C(T, j)`, and for `1 ≤ L ≤ T`, `∑_{j=0}^{L} C(T, j) ≤ (eT/L)^L`. -/
theorem eq_3_1 (T L : ℕ) (hL : 1 ≤ L) (hLT : L ≤ T) :
    ((Finset.range T).powerset.filter (fun I ↦ I.card ≤ L)).card =
        ∑ j ∈ Finset.range (L + 1), T.choose j ∧
      (∑ j ∈ Finset.range (L + 1), (T.choose j : ℝ)) ≤ (Real.exp 1 * T / L) ^ L := by sorry

end OnlineLearningOCO.Agnostic
Source
Shalev-Shwartz, Online Learning and Online Convex Optimization, Found. Trends Mach. Learn. 4(2) (2011) 107–194, p. 168, §3.2.1, equation (3.1)
Human review
  • Endorsed by Shuze Chen · Oct 7, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Oct 7, 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 paper
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me