AFTD Auto-Formalizing Theoretical Domains

hedgeLoss

defimported Lean

The expected loss of the learner at round $t$ under the Hedge distribution is \[ \widehat{\ell}_t \;=\; \sum_{i=1}^{N} p_t(i)\,\ell_t(i). \]

Statement

set_option relaxedAutoImplicit false in
set_option autoImplicit false in
open Real Finset BigOperators in
noncomputable def hedgeLoss {N T : ℕ} (η : ℝ) (ℓ : LossSeq N T) (t : Fin T) : ℝ
Defined in
TCSlib, `hedgeLoss`
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
none listed
Built on 2
  • hedgeDistThe Hedge distribution at round $t$ is the normalization of the weight vector: \[ p_t(i) \;=\; \frac{w_t(i)}{W_t}. \]
  • LossSeqA loss sequence $\ell$ for $N$ experts over $T$ rounds is a function $\ell : \mathrm{Fin}\,T \to \mathrm{Fin}\,N \to \mathbb{R}$,…
Used by 10
  • hedge_regret_bound_tightTight Hedge regret bound. Fix $N \ge 1$ experts and a horizon of $T$ rounds, and run the Hedge algorithm with a learning rate $\eta > 0$.…
  • 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…
  • potential_ratio_lePotential ratio bound for Hedge. Fix $N \ge 1$ experts, a horizon of $T$ rounds, a learning rate $\eta > 0$, and a valid loss sequence…
  • hedge_constructionHedge yields an approximate minimax pair. Let $G$ be a finite two-player zero-sum game with $M \ge 2$ row actions and $N \ge 1$ column…
  • hedgeLoss_le_oneHedge'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…
  • hedgeCumLossThe cumulative loss of the Hedge algorithm over all $T$ rounds is \[ \widehat{L}_T \;=\; \sum_{t=0}^{T-1} \widehat{\ell}_t. \]
  • hedgeLoss_nonnegNonnegativity of Hedge's expected loss. Let $\ell$ be a valid loss sequence for $N \ge 1$ experts over $T$ rounds, fix any learning rate…
  • log_potential_stepOne-step logarithmic potential bound for Hedge. Fix $N \ge 1$ experts and $T$ rounds, a learning rate $\eta > 0$, and a valid loss…
  • regret_le_of_log_potential_stepRegret from a per-step log-potential bound. Let $N \ge 1$, let $\eta > 0$, let $\ell$ be a loss sequence for $N$ experts over $T$ rounds,…
  • 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 in
set_option autoImplicit false in
open Real Finset BigOperators in
/-- The expected loss `∑_i p_t(i) ℓ_t(i)` of the learner at round `t` under the Hedge distribution [FS97, §2]; [CBL06, §2.1]. Deviation: the loss is linear in the distribution (the expert setting of [FS97]), not CBL's convex loss of a weighted-average prediction; the latter is recovered in `Hedge.ConvexPrediction` via Jensen. -/
noncomputable def hedgeLoss {N T : ℕ} (η : ℝ) (ℓ : LossSeq N T) (t : Fin T) : ℝ :=
  ∑ i : Fin N, hedgeDist η ℓ t.val i * ℓ t i
See it in the graphDiscuss this resultChallenge it