Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Eq. (C.5) — second-order bound 1ηlog⁡∑jx(j)eηv(j)−⟨x,v⟩≤(e−2)η∑jx(j)v(j)2\frac1\eta\log\sum_jx(j)e^{\eta v(j)}-\langle x,v\rangle\le(e-2)\eta\sum_jx(j)v(j)^2η1​log∑j​x(j)eηv(j)−⟨x,v⟩≤(e−2)η∑j​x(j)v(j)2

Proved
CalibeatBandit.eq_C_5

by iris · Nov 6, 2026 · Mathlib 0df444a (Lean v4.33.1)

bandit-feedbackcalibeatingonline-learningp2o-gran-per-chapterp2o-plan-paperp2o-strengthenedp2o-v1swap-regret

Let x∈Δ(A)x\in\Delta(\mathcal A)x∈Δ(A), η>0\eta>0η>0 and v∈RKv\in\mathbb R^Kv∈RK with 0≤ηv(j)≤10\le\eta v(j)\le10≤ηv(j)≤1 for every jjj. Then

1ηlog⁡(∑jx(j)eηv(j))−⟨x,v⟩≤1ηlog⁡(1+η⟨x,v⟩+(e−2)η2∑jx(j)v(j)2)−⟨x,v⟩≤(e−2)η∑jx(j)v(j)2.\frac1\eta\log\Bigl(\sum_jx(j)e^{\eta v(j)}\Bigr)-\langle x,v\rangle\le\frac1\eta\log\Bigl(1+\eta\langle x,v\rangle+(e-2)\eta^2\sum_jx(j)v(j)^2\Bigr)-\langle x,v\rangle\le(e-2)\eta\sum_jx(j)v(j)^2 .η1​log(j∑​x(j)eηv(j))−⟨x,v⟩≤η1​log(1+η⟨x,v⟩+(e−2)η2j∑​x(j)v(j)2)−⟨x,v⟩≤(e−2)ηj∑​x(j)v(j)2.

The first inequality uses ez≤1+z+(e−2)z2e^z\le1+z+(e-2)z^2ez≤1+z+(e−2)z2 for z≤1z\le1z≤1, the second log⁡(1+x)≤x\log(1+x)\le xlog(1+x)≤x. Combined with (C.4) it reduces the regret on corrected rewards to a second moment.

Differences from the source:

  • generalization: the algorithm's xtx_txt​, vtv_tvt​, for which the paper derives 0≤ηvt(j)≤10\le\eta v_t(j)\le10≤ηvt​(j)≤1 from pt(j)≥4ηp_t(j)\ge4\etapt​(j)≥4η and η≤1/8\eta\le1/8η≤1/8 → any x∈Δ(A)x\in\Delta(\mathcal A)x∈Δ(A) and vvv with 0≤ηv(j)≤10\le\eta v(j)\le10≤ηv(j)≤1; reason: the algorithm's quantities satisfy the hypothesis, as the page shows
  • reading: log⁡\loglog → the natural logarithm Real.log; reason: p.7 fixes eee as the base of the natural logarithm, and the proof's Klog⁡K=log⁡KKK\log K=\log K^KKlogK=logKK counts the KKK^KKK post-processing rules
  • encoding: actions A=[K]\mathcal A=[K]A=[K] → Fin K; reason: a relabelling; same instances
Preamble
import Mathlib
import Definitions.Def_CalibeatBandit_IsProbVec

set_option autoImplicit false

open MeasureTheory Matrix
Formal statement
namespace CalibeatBandit

/-- **(C.5): the second-order bound on the log-moment** (§C.2, proof of Lemma C.3, p.34).
For `x ∈ Δ(𝒜)`, `η > 0` and a vector `v` with `0 ≤ ηv(j) ≤ 1` for every `j`,
`(1/η) log(∑_j x(j) exp(ηv(j))) − ⟨x, v⟩
  ≤ (1/η) log(1 + η⟨x, v⟩ + (e − 2)η² ∑_j x(j)v(j)²) − ⟨x, v⟩ ≤ (e − 2)η ∑_j x(j)v(j)²`.

Hartline, Wang, Wu, *Calibeating Bandit Advice* (manuscript, sha256 a65ccb08…), §C.2, display (C.5), p.34.

**Formalization Note.** The paper derives `0 ≤ ηv_t(j) ≤ 1` for the algorithm's `v_t` from
`p_t(j) ≥ 4η` and `η ≤ 1/8`; here that range is the hypothesis, for arbitrary `x`, `v`. `log` is
`Real.log`, `e` is `Real.exp 1`, `⟨x, v⟩` is `x ⬝ᵥ v`. -/
theorem eq_C_5 {K : ℕ} (η : ℝ) (hη : 0 < η) (x v : Fin K → ℝ) (hx : IsProbVec x)
    (hv : ∀ j, 0 ≤ η * v j ∧ η * v j ≤ 1) :
    1 / η * Real.log (∑ j, x j * Real.exp (η * v j)) - x ⬝ᵥ v
        ≤ 1 / η * Real.log (1 + η * (x ⬝ᵥ v) + (Real.exp 1 - 2) * η ^ 2 * ∑ j, x j * v j ^ 2)
          - x ⬝ᵥ v ∧
    1 / η * Real.log (1 + η * (x ⬝ᵥ v) + (Real.exp 1 - 2) * η ^ 2 * ∑ j, x j * v j ^ 2)
          - x ⬝ᵥ v
        ≤ (Real.exp 1 - 2) * η * ∑ j, x j * v j ^ 2 := by sorry

end CalibeatBandit
Source
Hartline, Wang, Wu, Calibeating Bandit Advice (manuscript, STOC 2027 submission, sha256 a65ccb0880e6e4698eee1717d9a7121019b84a5ebcb4dfaa2e1614dbd3de0b44), §C.2, display (C.5), p.34 (PDF 34)
Human review
  • Endorsed by Shuze Chen · Nov 6, 2026

    Confirmed by the moderator at approval.

  • Endorsed by iris · Nov 6, 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