Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Eqs. (2.52)–(2.53) — Erlang's loss formula for the M/M/c/c queue

Proved
QueueingFundamentals.BirthDeath.erlang_loss_formula

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

erlang-bloss-systemp2o-batch-b23bp2o-gran-per-chapterp2o-plan-bookp2o-v1queueing

The M/M/c/cM/M/c/cM/M/c/c queue (Erlang loss system, c≥1c \ge 1c≥1 servers, no waiting room) is the birth–death process with arrival rates λn=λ>0\lambda_n = \lambda > 0λn​=λ>0 for n<cn < cn<c, λn=0\lambda_n = 0λn​=0 for n≥cn \ge cn≥c, and death rates μn=min⁡(n,c)μ\mu_n = \min(n, c)\muμn​=min(n,c)μ, μ>0\mu > 0μ>0. Let r=λ/μr = \lambda/\mur=λ/μ. Then a steady-state solution exists, and {pn}\{p_n\}{pn​} is a steady-state solution if and only if

pn=(λ/μ)nn!/(∑i=0c(λ/μ)ii!)(0≤n≤c),pn=0(n>c).p_n = \frac{(\lambda/\mu)^n}{n!} \Bigm/ \Bigl(\sum_{i=0}^{c} \frac{(\lambda/\mu)^i}{i!}\Bigr) \quad (0 \le n \le c), \qquad p_n = 0 \quad (n > c).pn​=n!(λ/μ)n​/(i=0∑c​i!(λ/μ)i​)(0≤n≤c),pn​=0(n>c).

In particular the probability of a full system is the Erlang-B formula

pc=B(c,r)=rc/c!∑i=0cri/i!.p_c = B(c, r) = \frac{r^c/c!}{\sum_{i=0}^{c} r^i/i!}.pc​=B(c,r)=∑i=0c​ri/i!rc/c!​.

Since arrivals are Poisson, B(c,r)B(c, r)B(c,r) is also the fraction of arriving customers that are lost; it is the classical formula of telephone-trunk dimensioning.

Formalization Note The book's state space is {0,…,c}\{0, \dots, c\}{0,…,c}; here the process lives on {0,1,2,… }\{0, 1, 2, \dots\}{0,1,2,…} with λn=0\lambda_n = 0λn​=0 for n≥cn \ge cn≥c, which is how §2.5 sets up the truncated queue, and the statement records that the states above ccc carry no mass.

Preamble
import Mathlib
import Definitions.Def_QueueingFundamentals_BirthDeath_Balance
import Definitions.Def_QueueingFundamentals_BirthDeath_Erlang
Formal statement
namespace QueueingFundamentals.BirthDeath

/-- Eqs. (2.52)–(2.53), pp.81–82. The `M/M/c/c` queue is the birth–death process with
`λ_n = λ` for `n < c`, `λ_n = 0` for `n ≥ c` (§2.5), and the death rates (2.30). It has a
steady-state solution, and `{p_n}` is a steady-state solution exactly when
`p_n = ((λ/μ)^n/n!) / ∑_{i=0}^{c} (λ/μ)^i/i!` for `0 ≤ n ≤ c` and `p_n = 0` for `n > c`; in
particular the probability of a full system is `p_c = B(c, r)` with `r = λ/μ`. -/
theorem erlang_loss_formula (lam mu : ℝ) (c : ℕ) (r : ℝ) (hlam : 0 < lam) (hmu : 0 < mu)
    (hc : 1 ≤ c) (hr : r = lam / mu) :
    (∃ p : ℕ → ℝ, IsSteadyState (truncArrival lam c) (mmcDeath mu c) p) ∧
      (∀ p : ℕ → ℝ, IsSteadyState (truncArrival lam c) (mmcDeath mu c) p ↔
        ((∀ n : ℕ, n ≤ c → p n = ((lam / mu) ^ n / (n.factorial : ℝ)) /
            ∑ i ∈ Finset.range (c + 1), (lam / mu) ^ i / (i.factorial : ℝ)) ∧
          ∀ n : ℕ, c < n → p n = 0)) ∧
      ∀ p : ℕ → ℝ, IsSteadyState (truncArrival lam c) (mmcDeath mu c) p →
        p c = erlangB c r := by sorry

end QueueingFundamentals.BirthDeath
Source
Gross, Shortle, Thompson & Harris, Fundamentals of Queueing Theory, 4th ed., Wiley 2008, DOI 10.1002/9781118625651, pp.81–82, Eqs. (2.52), (2.53)
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