Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Eq. (7.7) — Wq=(E[X2]−E[U2])/(2E[U])W_q = (E[X^2] - E[U^2])/(2E[U])Wq​=(E[X2]−E[U2])/(2E[U])

Proved
QueueingFundamentals.Bounds.mean_wait_formula

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

gg1mean-waiting-timep2o-batch-b23bp2o-gran-per-chapterp2o-plan-bookp2o-v1queueing

Consider a G/G/1 queue whose interarrival time TTT and service time SSS are nonnegative, have finite second moments, and satisfy E[T]=1/λE[T] = 1/\lambdaE[T]=1/λ and E[S]=1/μE[S] = 1/\muE[S]=1/μ with λ,μ>0\lambda, \mu > 0λ,μ>0 and ρ=λ/μ<1\rho = \lambda/\mu < 1ρ=λ/μ<1. Let ν\nuν be a stationary law of the line delay under Lindley's recursion (7.1), let U=S−TU = S - TU=S−T, and let X=−min⁡(0,Wq+U)X = -\min(0, W_q + U)X=−min(0,Wq​+U) with Wq∼νW_q \sim \nuWq​∼ν, SSS and TTT independent.

Then the stationary line delay has a finite mean Wq=E[Wq(n)]W_q = E[W_q^{(n)}]Wq​=E[Wq(n)​], and

Wq=E[X2]−E[U2]2E[U].(7.7)W_q = \frac{E[X^2] - E[U^2]}{2E[U]}. \qquad (7.7)Wq​=2E[U]E[X2]−E[U2]​.(7.7)

This expresses the mean wait of a stable G/G/1 queue through second moments of UUU and of the idle gap XXX. The upper bound (7.13) and the lower bound (7.14) are both read off from it.

Formalization Note The finiteness of WqW_qWq​ is part of the conclusion, not a hypothesis. No finite second moment of the stationary wait is assumed, although the book's derivation squares (7.3). E[U]=1/μ−1/λ<0E[U] = 1/\mu - 1/\lambda < 0E[U]=1/μ−1/λ<0, so the denominator is nonzero.

Preamble
import Mathlib
import Definitions.Def_QueueingFundamentals_Bounds_GG1
Formal statement
namespace QueueingFundamentals.Bounds

open MeasureTheory ProbabilityTheory Filter Topology

/-- Eq. (7.7), p.331. For a stationary G/G/1 queue with `ρ < 1`, the stationary line delay has
finite mean `W_q = E[W_q^{(n)}]` and `W_q = (E[X²] − E[U²]) / (2E[U])`. -/
theorem mean_wait_formula
    {A B ν : Measure ℝ} {lam mu : ℝ} (hlam : 0 < lam) (hmu : 0 < mu)
    (hin : IsGG1Input A B lam mu) (hrho : lam / mu < 1) (hν : IsStationaryWaitLaw A B ν) :
    Integrable (fun w : ℝ => w) ν ∧
    meanWait ν =
      (∫ p, idleX p.1 p.2.1 p.2.2 ^ 2 ∂(stepLaw ν B A) - ∫ p, (p.2.1 - p.2.2) ^ 2 ∂(stepLaw ν B A)) /
        (2 * ∫ p, (p.2.1 - p.2.2) ∂(stepLaw ν B A)) := by sorry

end QueueingFundamentals.Bounds
Source
Gross, Shortle, Thompson & Harris, Fundamentals of Queueing Theory, 4th ed., Wiley 2008, DOI 10.1002/9781118625651, p.331, Eq. (7.7)
Human review
  • Endorsed by Shuze Chen · Oct 5, 2026

    Confirmed by the moderator at approval.

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