AFTD Auto-Formalizing Theoretical Domains

hedgeWeight_succ

theoremverifiedimported Lean

Recursion for the Hedge weight. Fix a learning rate $\eta \in \bbr$ and a loss sequence $\ell$ for $N$ experts over $T$ rounds. For every round $t \in \mathrm{Fin}\,T$ and every expert $i \in \mathrm{Fin}\,N$, the unnormalized Hedge weights satisfy \[ w_{t+1}(i) \;=\; w_t(i)\cdot \exp\!\bigl(-\eta\,\ell_t(i)\bigr). \]

Statement

set_option relaxedAutoImplicit false in
set_option autoImplicit false in
open Real Finset BigOperators in
lemma hedgeWeight_succ {N T : ℕ} (η : ℝ) (ℓ : LossSeq N T) (t : Fin T) (i : Fin N) :
    hedgeWeight η ℓ (t.val + 1) i = hedgeWeight η ℓ t.val i * Real.exp (-η * ℓ t i)
Source
TCSlib, `hedgeWeight_succ`
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 3
  • 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}$,…
  • cumLoss_succCumulative loss recurrence. Let $\ell$ be a loss sequence for $N$ experts over $T$ rounds, and write $L_t(i) = \sum_{s < t} \ell_s(i)$ for…
Used by 1
  • 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…

Lean source view module on GitHub

set_option relaxedAutoImplicit false inset_option autoImplicit false inopen Real Finset BigOperators in/-- The weight update is multiplicative: `w_{t+1}(i) = w_t(i) · exp(-η · ℓ_t(i))` [FS97, §2]. -/lemma hedgeWeight_succ {N T : ℕ} (η : ℝ) (ℓ : LossSeq N T) (t : Fin T) (i : Fin N) :    hedgeWeight η ℓ (t.val + 1) i = hedgeWeight η ℓ t.val i * Real.exp (-η * ℓ t i) := by  simp only [hedgeWeight, cumLoss_succ]  ring_nf  rw [← exp_add]  ring_nf
See it in the graphDiscuss this resultChallenge it