Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Lemma 2.4: with ν(B₁) > ν(B₂) and τ attaining ν(B₁), continuing B₁ for τ then B₂ for σ beats the reverse order

Proved
AllocationIndices.interchange_portions

by naimengye · Sep 24, 2026 · Mathlib 0df444a (Lean v4.33.1)

gittins-indexinterchange-argument

Lemma 2.4. If bandit processes B1B_1B1​ and B2B_2B2​ have indices ν(B1)\nu(B_1)ν(B1​) and ν(B2)\nu(B_2)ν(B2​) with ν(B1)>ν(B2)\nu(B_1) > \nu(B_2)ν(B1​)>ν(B2​), and τ\tauτ is a stopping time for B1B_1B1​ such that ντ(B1)=ν(B1)\nu_\tau(B_1) = \nu(B_1)ντ​(B1​)=ν(B1​), while σ\sigmaσ is an arbitrary stopping time for B2B_2B2​, then the expected reward from selecting B1B_1B1​ for time τ\tauτ, and then B2B_2B2​ for time σ\sigmaσ, is greater than from reversing the order of selection.

Formally: B1,B2B_1, B_2B1​,B2​ bandit processes on countable state spaces S1,S2S_1, S_2S1​,S2​ with bounded rewards, the same discount factor a∈(0,1)a \in (0,1)a∈(0,1), initial states x1,x2x_1, x_2x1​,x2​ with ν(B2,x2)<ν(B1,x1)\nu(B_2, x_2) < \nu(B_1, x_1)ν(B2​,x2​)<ν(B1​,x1​); τ\tauτ a positive stopping time of B1B_1B1​ with Rτ(B1)/Wτ(B1)=ν(B1,x1)R_\tau(B_1)/W_\tau(B_1) = \nu(B_1, x_1)Rτ​(B1​)/Wτ​(B1​)=ν(B1​,x1​); σ\sigmaσ any positive stopping time of B2B_2B2​. Then

Rσ(B2)+E[aσ] Rτ(B1)<Rτ(B1)+E[aτ] Rσ(B2),R_\sigma(B_2) + \mathbb{E}[a^\sigma]\, R_\tau(B_1) < R_\tau(B_1) + \mathbb{E}[a^\tau]\, R_\sigma(B_2),Rσ​(B2​)+E[aσ]Rτ​(B1​)<Rτ​(B1​)+E[aτ]Rσ​(B2​),

the two sides being the expected rewards of the two orders, since the processes are independent.

Preamble
import Definitions.Def_AllocationIndices_Index

open MeasureTheory ProbabilityTheory BanditAlgorithm
Formal statement
namespace AllocationIndices

theorem interchange_portions {S₁ S₂ : Type*} [MeasurableSpace S₁] [Countable S₁]
    [MeasurableSingletonClass S₁] [MeasurableSpace S₂] [Countable S₂] [MeasurableSingletonClass S₂]
    (P₁ : Kernel S₁ S₁) [IsMarkovKernel P₁] {r₁ : S₁ → ℝ} (hr₁ : BoundedReward r₁)
    (P₂ : Kernel S₂ S₂) [IsMarkovKernel P₂] {r₂ : S₂ → ℝ} (hr₂ : BoundedReward r₂)
    {a : ℝ} (ha0 : 0 < a) (ha1 : a < 1) {x₁ : S₁} {x₂ : S₂}
    (hν : gittinsIndex P₂ r₂ a x₂ < gittinsIndex P₁ r₁ a x₁)
    {τ : (ℕ → S₁) → ℕ∞} (hτ : IsPositiveStoppingTime τ)
    (hτν : stoppedRatio P₁ r₁ a τ x₁ = gittinsIndex P₁ r₁ a x₁)
    {σ : (ℕ → S₂) → ℕ∞} (hσ : IsPositiveStoppingTime σ) :
    interchangeValue P₂ r₂ P₁ r₁ a σ τ x₂ x₁ < interchangeValue P₁ r₁ P₂ r₂ a τ σ x₁ x₂ := by sorry

end AllocationIndices
Source
Gittins, Glazebrook and Weber, Multi-armed Bandit Allocation Indices, 2nd ed., Wiley 2011, doi:10.1002/9780470980033, §2.7 p. 34, Lemma 2.4 with its proof
Human review
  • Endorsed by Shuze Chen · Sep 25, 2026

    Confirmed by the moderator at approval.

  • Endorsed by naimengye · Sep 25, 2026

    Confirmed by the mission captain (proposal self-audit).

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