Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Finite prevailing-charge stack-coupling representation

Proved
BanditAlgorithm.gittins_finite_prevailing_charge_eq_stack_coupling_value

by Harry_Xu · Aug 1, 2026 · Mathlib c5ea003 (Lean v4.30.0)

banditsgittins-indexprobability

Fix a finite horizon NNN, an initial state vector, and a Markov bandit policy π\piπ. On a common product space, sample one independent infinite Markov trajectory for each arm. For every length-NNN action sequence, weight the associated interleaving of the arms' prevailing-charge stacks by the likelihood that π\piπ follows that action sequence. Then the resulting finite sum of weighted stack integrals is exactly the policy's expected finite discounted prevailing-charge value:

CNπ=∑a∫∑t=0N−1αtvat ⁣(Tat(t))Lπ(a,ω) dMx(ω).C_N^\pi =\sum_{a}\int\sum_{t=0}^{N-1}\alpha^t v_{a_t}\!\left(T_{a_t}(t)\right)L_\pi(a,\omega)\,dM_x(\omega).CNπ​=a∑​∫t=0∑N−1​αtvat​​(Tat​​(t))Lπ​(a,ω)dMx​(ω).

Here MxM_xMx​ is the product law of the independent arm trajectories, Lπ(a,ω)L_\pi(a,\omega)Lπ​(a,ω) is the action-sequence likelihood, and Ti(t)T_i(t)Ti​(t) counts prior selections of arm iii.

This theorem isolates the finite common-stack coupling identity used in the Gittins-index comparison.

Preamble
import Definitions.Def_GittinsPrevailingChargeValue
Formal statement
open MeasureTheory ProbabilityTheory ENNReal

theorem BanditAlgorithm.gittins_finite_prevailing_charge_eq_stack_coupling_value
    {k : ℕ} {S : Type*} [MeasurableSpace S]
    [StandardBorelSpace S]
    (P : Kernel S S) [IsMarkovKernel P]
    {r : S → ℝ} (hr : Measurable r)
    {α : ℝ} (hα0 : 0 < α) (hα1 : α < 1)
    (hint : DiscountedRewardIntegrable P r α)
    (π : MarkovBanditPolicy k S) (x : Fin k → S) (N : ℕ) :
    let count := fun (a : Fin N → Fin k) (i : Fin k) (t : ℕ) ↦
      ∑ s : Fin N, if (s : ℕ) < t ∧ a s = i then 1 else 0
    let historyBefore := fun (a : Fin N → Fin k)
        (ω : Fin k → ℕ → S) (t : Fin N) ↦
      ((fun u : Fin (t : ℕ) ↦
          ((fun i ↦ ω i (count a i u)),
            a ⟨u, lt_trans u.isLt t.isLt⟩)),
        fun i ↦ ω i (count a i t))
    let likelihood := fun (a : Fin N → Fin k) (ω : Fin k → ℕ → S) ↦
      ∏ t : Fin N, (π.select t) (historyBefore a ω t) {a t}
    let charge := fun (ω : Fin k → ℕ → S) (i : Fin k) (u : ℕ) ↦
      (Finset.range (u + 1)).inf'
        ⟨0, Finset.mem_range.2 (Nat.zero_lt_succ u)⟩
        (fun v ↦ gittinsIndex P r α (ω i v))
    let value := fun (a : Fin N → Fin k) (ω : Fin k → ℕ → S) ↦
      ∑ t : Fin N, α ^ (t : ℕ) *
        charge ω (a t) (count a (a t) t)
    let stackMeasure : Measure (Fin k → ℕ → S) :=
      Measure.pi (fun i ↦ markovChainMeasure P (x i))
    markovBanditFinitePrevailingChargeValue P r α π x N =
      ∑ a : Fin N → Fin k,
        ∫ ω, value a ω ∂stackMeasure.withDensity (likelihood a) := by
  sorry
Source
Tor Lattimore and Csaba Szepesvári, Bandit Algorithms, §35.4, proof of Lemma 35.10, printed pp. 452–453 (free PDF pp. 460–461), https://tor-lattimore.com/downloads/book/book.pdf

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