Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Erlang's formula: the blocking probability of a link with CCC circuits

Proved
KellyStochasticNetworks.erlang_formula

by naimengye · Sep 18, 2026 · Mathlib 0df444a (Lean v4.33.1)

markov-chainqueueing-theorystochastic-networksteletraffic

A telephone link has CCC parallel circuits. Calls arrive as a Poisson process of rate λ>0\lambda > 0λ>0; each call holds one circuit for an exponentially distributed time of parameter μ>0\mu > 0μ>0, independently of the other calls and of the arrival process; a call that finds every circuit busy is lost. Let X(t)X(t)X(t) be the number of busy circuits, a Markov process on {0,1,…,C}\{0,1,\dots,C\}{0,1,…,C} with transition rates

q(j,j+1)=λ(j=0,…,C−1),q(j,j−1)=jμ(j=1,…,C).q(j,j+1) = \lambda \quad (j = 0,\dots,C-1), \qquad q(j,j-1) = j\mu \quad (j = 1,\dots,C).q(j,j+1)=λ(j=0,…,C−1),q(j,j−1)=jμ(j=1,…,C).

Let π=(π(j))j=0C\pi = (\pi(j))_{j=0}^{C}π=(π(j))j=0C​ satisfy the detailed balance equations for these rates and be normalized, ∑j=0Cπ(j)=1\sum_{j=0}^{C} \pi(j) = 1∑j=0C​π(j)=1. Then the equilibrium probability that all CCC circuits are busy is

π(C)=E ⁣(λμ,C),E(ν,C)=νC/C!∑j=0Cνj/j!.\pi(C) = E\!\left(\frac{\lambda}{\mu}, C\right), \qquad E(\nu, C) = \frac{\nu^{C}/C!}{\sum_{j=0}^{C} \nu^{j}/j!}.π(C)=E(μλ​,C),E(ν,C)=∑j=0C​νj/j!νC/C!​.

This is Erlang's formula, equation (1.5) of Kelly and Yudovina, Stochastic Networks. It is the blocking probability of the link: by the PASTA property, Poisson arrivals see time averages, so E(λ/μ,C)E(\lambda/\mu, C)E(λ/μ,C) is also the probability that an arriving call is lost. It is the quantity a network operator dimensions against, and the building block from which the loss networks of Chapter 3 are assembled.

Formalization Note The blocking state is the last element of the index type Fin (C + 1). The hypothesis is detailed balance rather than the equilibrium equations, matching the book's derivation; detailed balance is the stronger of the two.

Preamble
import Mathlib
import Definitions.Def_KellyStochasticNetworks_Balance
import Definitions.Def_KellyStochasticNetworks_Erlang
Formal statement
namespace KellyStochasticNetworks

theorem erlang_formula (lam mu : ℝ) (C : ℕ) (hlam : 0 < lam) (hmu : 0 < mu)
    (π : Fin (C + 1) → ℝ) (h : DetailedBalance π (erlangRates lam mu C))
    (hsum : ∑ j, π j = 1) :
    π (Fin.last C) = erlang (lam / mu) C := by sorry

end KellyStochasticNetworks
Source
Kelly & Yudovina, Stochastic Networks, CUP 2014, p. 19 (PDF p. 27), equation (1.5): 'The equilibrium probability that all circuits are busy is therefore pi(C) = E(lambda/mu, C) where E(nu,C) = (nu^C/C!) / sum_{j=0}^{C} nu^j/j!. This is known as Erlang's formula.' sha256 ec271d555059aee58613e5e9a98b8346214b16185c527314f5d94c1ac8b17b6a
Human review
  • Endorsed by Shuze Chen · Sep 25, 2026

    Confirmed by the moderator at approval.

  • Endorsed by naimengye · Sep 25, 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