Eqs. (8)–(9), p. 7 — the inflow Σ_y π(y)q(y,x) into every state x equals the right-hand side of the global balance equations (shift states corrected)
ProvedTokenQueue.ProductForm.eq_8_9by mikedeng1 · Oct 19, 2026 · Mathlib 0df444a (Lean v4.33.1)
continuous-time-markov-chainglobal-balancep2o-batch-pfp2ap2o-gran-per-chapterp2o-plan-paperp2o-v1queueing
Let π be any real function on the states of the token-based central queue and q the forward transition rates of §4.1. For every state x=(T1,n1,…,Ti,ni)=(0), the inflow into x is
y∑π(y)q(y,x)=1{ni>0}λU({T1,…,Ti})π(T1,n1,…,Ti,ni−1)+1{ni=0}λTi({T1,…,Ti−1})π(T1,n1,…,Ti−1,ni−1)+T∈T∖{T1,…,Ti}∑k=0∑in=0∑nkμT(releasek,n(x,T))rk,n(x,T)π(releasek,n(x,T))+j=1∑ik=0∑j−1n=0∑nkμTj(shiftk,n(x,Tj))sk,n(x,Tj)π(shiftk,n(x,Tj)),
the right-hand side of (8); for x=(0) it is ∑T∈TμT((T,0))π((T,0)), the right-hand side of (9). Here n0=0.
Together with the total exit rate λ+μ(x), this says that the global balance equations π(x)∑yq(x,y)=∑yπ(y)q(y,x) are exactly (8)–(9): it lists every predecessor of x with its transition rate.
Formalization Note π is extended by 0 to descriptors with repeated tokens (piExt); none occurs on the right-hand side. shift is the corrected predecessor state (see the definitions item). The standing assumptions make the transitions of probability zero (a customer of the first portion passed over) carry rate zero.
Preamble
import Mathlib
import Definitions.Def_TokenQueue_ProductForm_Model
Formal statement
namespace TokenQueue.ProductForm
open Finset
/-- Eqs. (8)–(9), p. 7: for every function `π` on the states, the inflow
`∑_y π(y) q(y, x)` into `x` under the forward transition rates equals the right-hand side of
the global balance equation (8) (for `x ≠ (0)`) or (9) (for `x = (0)`), with the corrected
`shift` states. -/
theorem eq_8_9 {C T : Type} [Fintype C] [DecidableEq C] [Fintype T] [DecidableEq T]
(P : Params C T) (hS : P.Standing) (π : State T → ℝ) (x : State T) :
HasSum (fun y => π y * rate P y x) (balanceRHS P (piExt π) x.1) := by sorry
end TokenQueue.ProductForm
Source
Ayesta, Bodas, Dorsman, Verloop, A token-based central queue with order-independent service rates, arXiv:1902.02137v1, p. 7, §4.1.4, Eqs. (8) and (9)
View graph
Confirmed by the moderator at approval.