AFTD Auto-Formalizing Theoretical Domains

prefixGameLoss

defimported Lean

Given a game $G$, a prefix of $t$ column actions, and a row $i$, the prefix cumulative loss of row $i$ is \[ L_t(i) \;=\; \sum_{s=0}^{t-1} \bigl(1 - A_{i, a_s}\bigr). \] This mirrors cumLoss from the abstract Hedge framework, expressed directly in terms of game payoffs.

Statement

set_option relaxedAutoImplicit false in
set_option autoImplicit false in
open Real Finset BigOperators in
noncomputable def prefixGameLoss {M N : ℕ} (G : ZeroSumGame M N)
    {t : ℕ} (actions : Fin t → Fin N) (i : Fin M) : ℝ
Defined in
TCSlib, `prefixGameLoss`
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 1
  • ZeroSumGameA finite two-player zero-sum game with $M$ row actions and $N$ column actions is a record consisting of a payoff matrix…
Used by 2
  • prefixHedgeWeightThe unnormalised Hedge weight of row $i$ after seeing a prefix of column actions at learning rate $\eta$ is…
  • prefixGameLoss_eq_cumLossPrefix game loss equals induced cumulative loss. Let $G$ be a finite two-player zero-sum game with $M$ row actions and $N$ column actions,…

Lean source view module on GitHub

set_option relaxedAutoImplicit false in
set_option autoImplicit false in
open Real Finset BigOperators in
/-- The cumulative game loss `Σ_{s < t} (1 − A(i, j_s))` of row `i` along a finite prefix `j_0, …, j_{t−1}` of column actions. -/
noncomputable def prefixGameLoss {M N : ℕ} (G : ZeroSumGame M N)
    {t : ℕ} (actions : Fin t → Fin N) (i : Fin M) : ℝ :=
  ∑ s : Fin t, (1 - G.payoff i (actions s))
See it in the graphDiscuss this resultChallenge it