Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Finite discounted interleaving inequality

Proved
BanditAlgorithm.discounted_list_value_le_of_perm_pairwise

by Harry_Xu · Jul 31, 2026 · Mathlib c5ea003 (Lean v4.30.0)

banditsinequalitiesrearrangement

Let 0≤α≤10\leq \alpha\leq 10≤α≤1, and let xxx and yyy be finite lists of real charges containing the same multiset of entries. If yyy is arranged in nonincreasing order, then its discounted value is at least that of xxx:

x0+αx1+⋯+αn−1xn−1  ≤  y0+αy1+⋯+αn−1yn−1.x_0+\alpha x_1+\cdots+\alpha^{n-1}x_{n-1} \;\leq\; y_0+\alpha y_1+\cdots+\alpha^{n-1}y_{n-1}.x0​+αx1​+⋯+αn−1xn−1​≤y0​+αy1​+⋯+αn−1yn−1​.

This is the finite deterministic exchange inequality underlying the interleaving argument for prevailing charges.

Preamble
import Mathlib.Data.List.Perm.Basic
import Mathlib.Tactic
Formal statement
theorem BanditAlgorithm.discounted_list_value_le_of_perm_pairwise
    {α : ℝ} (hα0 : 0 ≤ α) (hα1 : α ≤ 1)
    {xs ys : List ℝ} (hperm : xs.Perm ys)
    (hsorted : ys.Pairwise (· ≥ ·)) :
    xs.foldr (fun z acc ↦ z + α * acc) 0 ≤
      ys.foldr (fun z acc ↦ z + α * acc) 0 := by
  sorry
Source
Lattimore and Szepesvári, Bandit Algorithms (CUP 2020), Lemma 35.10 and its use in the proof of Theorem 35.9, printed pp.451--453. This theorem is the finite permutation/exchange core of that lemma.

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me