AFTD Auto-Formalizing Theoretical Domains

cumLoss_horizon

theoremverifiedimported Lean

Cumulative loss at the horizon. Fix $N$ experts and a horizon $T$, and let $\ell$ be a loss sequence assigning to each round $t$ and expert $i$ a real loss $\ell_t(i)$. For every expert $i$, the cumulative loss through the first $T$ rounds equals the total loss over all rounds: $L_T(i) = \sum_{t} \ell_t(i)$, where $t$ ranges over all $T$ rounds.

Statement

set_option relaxedAutoImplicit false in
set_option autoImplicit false in
open Real Finset BigOperators in
lemma cumLoss_horizon {N T : ℕ} (ℓ : LossSeq N T) (i : Fin N) :
    cumLoss ℓ T i = ∑ t : Fin T, ℓ t i
Source
TCSlib, `cumLoss_horizon`
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
  • 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 1
  • 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…

Lean source view module on GitHub

set_option relaxedAutoImplicit false inset_option autoImplicit false inopen Real Finset BigOperators in/-- At the final horizon `T`, the cumulative loss of expert `i` is the sum of its losses over all `T` rounds. -/lemma cumLoss_horizon {N T : ℕ} (ℓ : LossSeq N T) (i : Fin N) :    cumLoss ℓ T i = ∑ t : Fin T, ℓ t i := by  simp only [cumLoss]  congr 1  ext t  simp
See it in the graphDiscuss this resultChallenge it