AFTD Auto-Formalizing Theoretical Domains

potential_zero

theoremverifiedimported Lean

Initial value of the potential. Fix $N \ge 1$ experts, a horizon $T$, and a loss sequence $\ell$ over these experts and rounds, and let $\eta \in \bbr$ be a learning rate. At time $0$ every expert has zero cumulative loss, so each unnormalized Hedge weight equals $1$, and the potential is \[ W_0 \;=\; \sum_{i=1}^{N} \exp\!\bigl(-\eta \cdot L_0(i)\bigr) \;=\; N . \]

Statement

set_option relaxedAutoImplicit false in
set_option autoImplicit false in
open Real Finset BigOperators in
lemma potential_zero {N T : ℕ} [NeZero N] (η : ℝ) (ℓ : LossSeq N T) :
    potential η ℓ 0 = N
Source
TCSlib, `potential_zero`
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
  • potentialThe potential (sum of unnormalized weights) at time $t$ is \[ W_t \;=\; \sum_{i=1}^{N} w_t(i). \] The potential telescopes to…
  • 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 1
  • 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,…

Lean source view module on GitHub

set_option relaxedAutoImplicit false inset_option autoImplicit false inopen Real Finset BigOperators in/-- The potential at time `0` equals `N`: every cumulative loss is `0`, so every weight is `1`. -/lemma potential_zero {N T : ℕ} [NeZero N] (η : ℝ) (ℓ : LossSeq N T) :    potential η ℓ 0 = N := by  simp only [potential, hedgeWeight, cumLoss]  have hfilt : ∀ i : Fin N, ((Finset.univ (α := Fin T)).filter (fun s => s.val < 0)).sum      (fun s => ℓ s i) = 0 := by    intro i    apply Finset.sum_eq_zero    intro s hs    simp at hs  simp only [hfilt, mul_zero, exp_zero, Finset.sum_const, Finset.card_fin]  simp
See it in the graphDiscuss this resultChallenge it