Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Lemma 2 — EQ1=nλ\mathbb EQ_1 = n\lambdaEQ1​=nλ and EQi=nλ P(Q1=⋯=Qi−1=n)\mathbb EQ_i = n\lambda\,\mathbb P(Q_1 = \dots = Q_{i-1} = n)EQi​=nλP(Q1​=⋯=Qi−1​=n)

Proved
JSQHalfinWhitt.Tightness.lemma_2

by mikedeng1 · Oct 8, 2026 · Mathlib 0df444a (Lean v4.33.1)

markov-chainsp2o-batch-pfp2ap2o-gran-per-chapterp2o-plan-paperp2o-v1queueingstationary-distribution

Consider the join-the-shortest-queue chain with n≥1n \ge 1n≥1 servers and λ∈(0,1)\lambda \in (0,1)λ∈(0,1), and let Q=(Q1,Q2,… )Q = (Q_1, Q_2, \dots)Q=(Q1​,Q2​,…) have a stationary distribution of the chain, where QiQ_iQi​ is the number of servers with at least iii customers. Then

EQ1=nλ,(3.2)\mathbb E Q_1 = n\lambda, \tag{3.2}EQ1​=nλ,(3.2) EQi=nλ P(Q1=⋯=Qi−1=n),i>1.(3.3)\mathbb E Q_i = n\lambda\, \mathbb P(Q_1 = \dots = Q_{i-1} = n),\qquad i > 1. \tag{3.3}EQi​=nλP(Q1​=⋯=Qi−1​=n),i>1.(3.3)

In particular n−EQ1=n(1−λ)n - \mathbb E Q_1 = n(1-\lambda)n−EQ1​=n(1−λ), so in the Halfin–Whitt regime n E∣X1∣=β\sqrt n\,\mathbb E|X_1| = \betan​E∣X1​∣=β, which is the i=1i = 1i=1 case of (2.2).

Formalization Note Lean indices are 0-based: q.1 0 is Q1Q_1Q1​ and q.1 i (i≥1i \ge 1i≥1) is Qi+1Q_{i+1}Qi+1​, so (3.3) for the paper's index i+1i+1i+1 reads E Qi+1=nλ P(Q1=⋯=Qi=n)\mathbb E\,Q_{i+1} = n\lambda\,\mathbb P(Q_1 = \dots = Q_i = n)EQi+1​=nλP(Q1​=⋯=Qi​=n). Expectations and probabilities are sums against π\piπ; all summands are bounded (0≤Qi≤n0 \le Q_i \le n0≤Qi​≤n).

Preamble
import Mathlib
import Definitions.Def_JSQHalfinWhitt_Tightness_Stationary
import Definitions.Def_JSQHalfinWhitt_Tightness_Model
Formal statement
namespace JSQHalfinWhitt.Tightness

/-- Lemma 2 (Braverman, p. 6): for `n ≥ 1`, `λ ∈ (0, 1)` and every stationary distribution `π`
of the JSQ chain, `E Q_1 = nλ` (3.2) and `E Q_i = nλ P(Q_1 = … = Q_{i−1} = n)` for `i > 1` (3.3).
Lean indices are 0-based: `q.1 0` is `Q_1`, and `q.1 i` for `i ≥ 1` is `Q_{i+1}`. -/
theorem lemma_2 (n : ℕ) (lam : ℝ) (hn : 1 ≤ n) (hlam0 : 0 < lam) (hlam1 : lam < 1)
    (π : State n → ℝ) (hπ : IsStationaryDist (genQ n lam) π) :
    expect π (fun q => (q.1 0 : ℝ)) = n * lam ∧
      ∀ i : ℕ, 1 ≤ i →
        expect π (fun q => (q.1 i : ℝ)) = n * lam * prob π (fun q => ∀ j, j < i → q.1 j = n) := by sorry

end JSQHalfinWhitt.Tightness
Source
Braverman, Steady-State Analysis of the Join-the-Shortest-Queue Model in the Halfin-Whitt Regime, arXiv:1801.05121v2 (published in Math. Oper. Res. 45(3), 2020), p. 6, Lemma 2, (3.2)–(3.3)
Human review
  • Endorsed by Shuze Chen · Oct 8, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Oct 8, 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