Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Theorem 2(a), pp. 15–16 — above load b_max/t_{b_max} the token backlog diverges a.s. under every scheduler

Proved
LLMThroughput.TokenBudget.theorem_2_a

by tianyipeng · Oct 29, 2026 · Mathlib 0df444a (Lean v4.33.1)

llm-inferencequeueingstabilitythroughput-optimality

Consider the basic LLM queueing model of §3.1: the batch processing time is tb=c+a⌈b/b0⌉t_b=c+a\lceil b/b_0\rceiltb​=c+a⌈b/b0​⌉ (Assumption 1, b0∣bmax⁡b_0\mid b_{\max}b0​∣bmax​, tbmax⁡≥1t_{b_{\max}}\ge 1tbmax​​≥1); the arrival counts ana_nan​ per slot are i.i.d. with finite mean λ\lambdaλ; the request sizes (vp(i),vd(i))(v_p(i),v_d(i))(vp​(i),vd​(i)) are i.i.d., independent of the arrivals, with values in [1,vpmax⁡]×[1,vdmax⁡][1,v_p^{\max}]\times[1,v_d^{\max}][1,vpmax​]×[1,vdmax​] and means mp,mdm_p,m_dmp​,md​. Write ∣X(n)∣=∑i∈Qn(Pi(n)+Di(n))|X(n)|=\sum_{i\in Q_n}(P_i(n)+D_i(n))∣X(n)∣=∑i∈Qn​​(Pi​(n)+Di​(n)) for the total number of unprocessed tokens at the beginning of slot nnn.

Theorem 2(a) (instability). If

λ(mp+md)>bmax⁡tbmax⁡,\lambda(m_p+m_d)>\frac{b_{\max}}{t_{b_{\max}}},λ(mp​+md​)>tbmax​​bmax​​,

then for every (batch) scheduling algorithm and every admissible initial state,

P{lim⁡n→∞∣X(n)∣=∞}=1.\mathbb P\Big\{\lim_{n\to\infty}|X(n)|=\infty\Big\}=1 .P{n→∞lim​∣X(n)∣=∞}=1.

This is part (a) of Theorem 2 of the source: bmax⁡/tbmax⁡b_{\max}/t_{b_{\max}}bmax​/tbmax​​ is the largest token processing rate of any schedule, so above it no algorithm can keep up with the incoming work.

Formalization Note This is the first conjunct of LLMThroughput.TokenBudget.theorem_2, with the load hypothesis moved before the quantifiers; slots are 0-based, the policy is a function of the labelled state and is required to be feasible at every admissible scheduling instant, and almost-sure divergence is ∀ᵐ ω, Tendsto |X(n)| atTop atTop.

Preamble
import Mathlib
import Definitions.Def_LLMThroughput_TokenBudget_Model
Formal statement
namespace LLMThroughput.TokenBudget

open MeasureTheory ProbabilityTheory Filter Topology

theorem theorem_2_a {Ω : Type*} [MeasurableSpace Ω] (μ : Measure Ω) [IsProbabilityMeasure μ]
    (P : Params) (hP : P.Valid) (vpmax vdmax : ℕ) (a : ℕ → Ω → ℕ) (v : ℕ → Ω → ℕ × ℕ)
    (hA : IIDArrivals μ a v vpmax vdmax)
    (hload : (P.bmax : ℝ) / (P.t P.bmax : ℝ) < arrivalRate μ a * (meanPrefill μ v + meanDecode μ v)) :
    ∀ π : Policy, IsScheduler P π → ∀ x : State, Admissible P.bmax x →
      ∀ᵐ ω ∂μ, Tendsto
        (fun n => totalTokens (run P π x (fun m => a m ω) (fun i => v i ω) n)) atTop atTop := by sorry

end LLMThroughput.TokenBudget
Source
Dai, Deng, Li & Peng, Throughput-Optimal Scheduling Algorithms for LLM Inference and AI Agents, arXiv:2504.07347v3, pp. 15–16, Theorem 2(a) (eq. (10)); proof sketch p. 16 and App. B.3, pp. 41–42

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