AFTD Auto-Formalizing Theoretical Domains

hedgeWeight_pos

theoremverifiedimported Lean

Positivity of Hedge weights. Fix a learning rate $\eta \in \bbr$, a loss sequence $\ell$ for $N$ experts over $T$ rounds, a time $t$, and an expert $i$. Then the unnormalized Hedge weight $w_t(i) = \exp\!\bigl(-\eta \cdot L_t(i)\bigr)$, where $L_t(i) = \sum_{s < t} \ell_s(i)$ is the cumulative loss of expert $i$ through the first $t$ rounds, is strictly positive.

Statement

set_option relaxedAutoImplicit false in
set_option autoImplicit false in
open Real Finset BigOperators in
lemma hedgeWeight_pos {N T : ℕ} (η : ℝ) (ℓ : LossSeq N T) (t : ℕ) (i : Fin N) :
    0 < hedgeWeight η ℓ t i
Source
TCSlib, `hedgeWeight_pos`
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 2
  • hedgeWeightThe unnormalized Hedge weight of expert $i$ at time $t$ with learning rate $\eta$ is…
  • 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 3
  • 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…
  • potential_posPositivity of the Hedge potential. Fix a learning rate $\eta \in \bbr$, a loss sequence $\ell$ for $N \ge 1$ experts over $T$ rounds, and…
  • hedgeDist_nonnegNonnegativity of the Hedge distribution. Fix $N \ge 1$ experts and $T$ rounds, a learning rate $\eta \in \bbr$, and a loss sequence…

Lean source view module on GitHub

set_option relaxedAutoImplicit false inset_option autoImplicit false inopen Real Finset BigOperators in/-- Every Hedge weight is strictly positive, being an exponential. -/lemma hedgeWeight_pos {N T : ℕ} (η : ℝ) (ℓ : LossSeq N T) (t : ℕ) (i : Fin N) :    0 < hedgeWeight η ℓ t i := by  exact exp_pos _
See it in the graphDiscuss this resultChallenge it