AFTD Auto-Formalizing Theoretical Domains

bestExpertLoss

defimported Lean

The best expert loss in hindsight is the minimum cumulative loss achieved by any single expert: \[ L^* \;=\; \min_{i \in [N]} L_T(i) \;=\; \inf_{i : \mathrm{Fin}\,N} \,L_T(i). \]

Statement

set_option relaxedAutoImplicit false in
set_option autoImplicit false in
open Real Finset BigOperators in
noncomputable def bestExpertLoss {N T : ℕ} (ℓ : LossSeq N T) : ℝ
Defined in
TCSlib, `bestExpertLoss`
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
  • cumLossThe cumulative loss of expert $i$ through the first $t$ rounds is \[ L_t(i) \;=\; \sum_{s < t} \ell_s(i), \] where the sum ranges…
  • 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 4
  • 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…
  • regretThe regret of the Hedge algorithm is the excess cumulative loss over the best expert in hindsight:…
  • 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,…
  • potential_ge_best_expertPotential lower bound via the best expert. Fix $N \ge 1$ experts and $T$ rounds, a loss sequence $\ell$, and a learning rate $\eta > 0$.…

Lean source view module on GitHub

set_option relaxedAutoImplicit false in
set_option autoImplicit false in
open Real Finset BigOperators in
/-- The cumulative loss `min_i L_T(i)` of the best expert in hindsight [FS97, §2]; [CBL06, §2.1]. This is an infimum over a finite nonempty set of experts, so later we can choose an expert attaining it when lower-bounding the final potential. -/
noncomputable def bestExpertLoss {N T : ℕ} (ℓ : LossSeq N T) : ℝ :=
  ⨅ i : Fin N, cumLoss ℓ T i
See it in the graphDiscuss this resultChallenge it