AFTD Auto-Formalizing Theoretical Domains

hedgeLoss_le_one

theoremverifiedimported Lean

Hedge's expected loss is at most one. Fix a learning rate $\eta \in \bbr$, and let $\ell$ be a valid loss sequence for $N \ge 1$ experts over $T$ rounds, so that $0 \le \ell_t(i) \le 1$ for every round $t$ and expert $i$. Then at each round $t$ the expected loss of the learner under the Hedge distribution satisfies $\widehat{\ell}_t \le 1$.

Statement

set_option relaxedAutoImplicit false in
set_option autoImplicit false in
open Real Finset BigOperators in
lemma hedgeLoss_le_one {N T : ℕ} [NeZero N] (η : ℝ) (ℓ : LossSeq N T) (hℓ : ℓ.Valid)
    (t : Fin T) : hedgeLoss η ℓ t ≤ 1
Source
TCSlib, `hedgeLoss_le_one`
Lean proof
By Karim Abdel Sadek, Mark Bedaywi, from github.com/Shilun-Allan-Li/tcslib at c8a02591b1e5 (Copyright (c) 2026 Karim Abdel Sadek and Mark Bedaywi. All rights reserved, Apache-2.0). Compiled here against leanprover/lean4:v4.33.1, Mathlib v4.33.1; written for leanprover/lean4:v4.25.0.
Verified
07 Oct 2026
Axioms
Classical.choiceQuot.soundpropext
Built on 6
  • hedgeDistThe Hedge distribution at round $t$ is the normalization of the weight vector: \[ p_t(i) \;=\; \frac{w_t(i)}{W_t}. \]
  • LossSeq.ValidA loss sequence $\ell$ is valid if all individual losses are in $[0,1]$: $\forall t\,i,\; 0 \le \ell_t(i) \le 1$.
  • hedgeLossThe expected loss of the learner at round $t$ under the Hedge distribution is…
  • hedgeDist_nonnegNonnegativity of the Hedge distribution. Fix $N \ge 1$ experts and $T$ rounds, a learning rate $\eta \in \bbr$, and a loss sequence…
  • LossSeqA loss sequence $\ell$ for $N$ experts over $T$ rounds is a function $\ell : \mathrm{Fin}\,T \to \mathrm{Fin}\,N \to \mathbb{R}$,…
  • hedgeDist_sumThe Hedge distribution sums to one. Fix a number of experts $N \ge 1$, a horizon $T$, a learning rate $\eta \in \bbr$, a loss sequence…
Used by 2
  • log_potential_step_tightTight per-step logarithmic potential bound for Hedge. Fix $N \ge 1$ experts and a learning rate $\eta > 0$, and let $\ell$ be a valid loss…
  • hedge_regret_boundRegret bound for the Hedge algorithm. Fix $N \ge 1$ experts and $T$ rounds, and let $\ell$ be a valid loss sequence, so that…

Lean source view module on GitHub

set_option relaxedAutoImplicit false inset_option autoImplicit false inopen Real Finset BigOperators in/-- For a valid loss sequence, Hedge's expected loss at each round is at most `1`. -/lemma hedgeLoss_le_one {N T : ℕ} [NeZero N] (η : ℝ) (ℓ : LossSeq N T) (hℓ : ℓ.Valid)    (t : Fin T) : hedgeLoss η ℓ t ≤ 1 := by  -- A convex combination of losses in `[0, 1]` is at most `1`.  have hsum : hedgeLoss η ℓ t ≤ ∑ i : Fin N, hedgeDist η ℓ t.val i * 1 := by    apply Finset.sum_le_sum    intro i _    exact mul_le_mul_of_nonneg_left (hℓ t i).2 (hedgeDist_nonneg η ℓ t.val i)  simp only [mul_one] at hsum  linarith [hedgeDist_sum η ℓ t.val]
See it in the graphDiscuss this resultChallenge it