Prove2Me
Navigate
DiscoverFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

Stochastic Systems

166 missions · 63 completed

The mathematics of systems that evolve under randomness, modeled as families of random variables indexed by time — from Markov chains and martingales to Brownian motion and stochastic differential equations. The field spans stochastic analysis, filtering and optimal control under uncertainty, ergodic behavior of random dynamics, and concentration of measure, with models reaching across physics, engineering, finance, and biology.

Missions

Open103Completed63All166
🏆Completed
Markov ChainProbability·Captain: naimengye

Introduction to Stochastic Networks II: Kolmogorov's Criterion for ReversibilityTextbook

Motivation

A Markov process is reversible when, in equilibrium, transitions from xxx to yyy occur at the same average rate as transitions from yyy to xxx. Algebraically this is the detailed balance condition π(x)q(x,y)=π(y)q(y,x)\pi(x)q(x,y)=\pi(y)q(y,x)π(x)q(x,y)=π(y)q(y,x), and it is the single most useful structural property a network process can have: it replaces a global linear system by one equation per pair of states, and it hands you the equilibrium measure as a product of rate ratios rather than as the solution of anything.

The catch is that detailed balance mentions π\piπ, which is exactly what one is trying to find. Chapter 2 of Richard Serfozo's Introduction to Stochastic Networks (Springer, 1999) removes the circularity. Kolmogorov's criterion characterizes reversibility by a condition on the rates alone: around every closed path, the product of the forward rates equals the product of the backward rates. And the proof is constructive — once the criterion holds, the invariant measure is

π(x)=∏i=1nq(xi−1,xi)q(xi,xi−1)\pi(x)=\prod_{i=1}^{n}\frac{q(x_{i-1},x_i)}{q(x_i,x_{i-1})}π(x)=i=1∏n​q(xi​,xi−1​)q(xi−1​,xi​)​

along any path from a fixed origin x0x^0x0 to xxx, the criterion being precisely what makes the answer independent of the path chosen.

Setting

q(x,y)q(x,y)q(x,y) is a non-negative rate function on a state space E\mathbb EE, with the two-way communication property that q(x,y)q(x,y)q(x,y) and q(y,x)q(y,x)q(y,x) are positive together — a process failing this is visibly not reversible, since some transition would be possible but its reverse would not. A path x0,…,xnx_0,\dots,x_nx0​,…,xn​ is a sequence with q(xi−1,xi)>0q(x_{i-1},x_i)>0q(xi−1​,xi​)>0 throughout, and qqq is assumed irreducible: every state is reachable from every other along a path. Write ρ(x,y)=q(x,y)/q(y,x)\rho(x,y)=q(x,y)/q(y,x)ρ(x,y)=q(x,y)/q(y,x) for the rate ratio.

qqq is reversible when some positive π\piπ satisfies the detailed balance equations. Such a π\piπ is automatically an invariant measure, the total balance equations being the sum of the detailed ones.

Formalization targets

Goal — Theorem 2.8, Kolmogorov's criterion and the canonical measure

Three statements are equivalent:

  1. qqq is reversible;
  2. (Kolmogorov's criterion) for every closed sequence x0,…,xn=x0x_0,\dots,x_n=x_0x0​,…,xn​=x0​,
∏i=1nq(xi−1,xi)=∏i=1nq(xi,xi−1);\prod_{i=1}^{n}q(x_{i-1},x_i)=\prod_{i=1}^{n}q(x_i,x_{i-1});i=1∏n​q(xi−1​,xi​)=i=1∏n​q(xi​,xi−1​);
  1. for every path, ∏i=1nρ(xi−1,xi)\prod_{i=1}^n\rho(x_{i-1},x_i)∏i=1n​ρ(xi−1​,xi​) depends on the path only through its endpoints.

And when they hold, fixing any origin x0x^0x0 there is a positive π\piπ with π(x0)=1\pi(x^0)=1π(x0)=1 satisfying detailed balance and given at every state by the product of ratios along any path from x0x^0x0.

Supporting levels

The canonical form (2.2), that qqq is reversible with respect to π\piπ exactly when q(x,y)=γ(x,y)/π(x)q(x,y)=\gamma(x,y)/\pi(x)q(x,y)=γ(x,y)/π(x) for a symmetric non-negative γ\gammaγ; Example 2.1, the birth–death process with π(x)=∏n=1xλ(n−1)/μ(n)\pi(x)=\prod_{n=1}^{x}\lambda(n-1)/\mu(n)π(x)=∏n=1x​λ(n−1)/μ(n); Theorem 2.2, that a process whose communication graph is a tree is reversible; and Theorem 2.5, the time-reversal criterion, which identifies a stationary distribution from a candidate reversed rate function without mentioning reversibility at all.

Significance

The results themselves. Kolmogorov's criterion is the working test. It is how one checks that a birth–death process, a random walk on a tree, a reversible Jackson network or a Whittle network with reversible routing is reversible, and it is a finite check on cycles rather than a search for an unknown measure. The ratio form (iii) is what gets used in practice: it says the product of ratios along a path is a well-defined function of the endpoints, which is exactly what licenses defining π\piπ by that product.

Theorem 2.2 is the structural special case with no computation at all — a tree has no cycles, so the criterion is vacuous and reversibility is automatic. Theorem 2.5 points in a different direction: it identifies a stationary distribution from a guess at the time-reversed rates, and it is the tool Serfozo uses later to prove the Whittle equilibrium theorem a second way and to establish that departure processes from networks are Poisson.

Formalizing them. Mathlib has no reversibility theory for Markov processes: no detailed balance, no Kolmogorov criterion, no time reversal of a rate function. It has SimpleGraph.IsTree, which the tree item uses, and nothing else that bears on this chapter. The whole apparatus is contributed here.

Difficulty

The goal is a genuine equivalence with a constructive core, and the three implications are of quite different character.

(i) ⇒\Rightarrow⇒ (ii) is the easy one: multiply the detailed balance equations around the closed path and cancel the π\piπ's, which is legitimate because the π\piπ values are positive. Note the criterion is asserted for arbitrary closed sequences, not only for paths; the two-way property is what makes both sides vanish together when some rate is zero.

(ii) ⇔\Leftrightarrow⇔ (iii) is a cycle-splicing argument: two paths with the same endpoints concatenate, one reversed, into a closed path, and the criterion says its forward and backward products agree, which is the equality of ratio products.

(ii) ⇒\Rightarrow⇒ (i) is where the construction lives. Fix an origin x0x^0x0; irreducibility gives a path to every state; define π\piπ by the ratio product; (iii) makes it well defined; and then detailed balance at an edge follows by extending a path by that edge. Serfozo's Remark 2.9 gives the same construction as a recursion over the sets En\mathbb E_nEn​ of states reachable in nnn steps, which may be the easier route to organize.

The birth–death item is a telescoping recursion, π(x+1)μ(x+1)=π(x)λ(x)\pi(x+1)\mu(x+1)=\pi(x)\lambda(x)π(x+1)μ(x+1)=π(x)λ(x), and the observation that the two families of detailed balance equations — for y=x+1y=x+1y=x+1 and for y=x−1y=x-1y=x−1 — are the same family. Theorem 2.2 is a cut argument: removing an edge of a tree splits the state space into two pieces joined by that edge alone, so the flow balance across the cut is the detailed balance equation for that edge. Theorem 2.5 is two lines of rearrangement once the sums are known to converge.

Formalization scope

The state space is an arbitrary type and qqq is an arbitrary non-negative real rate function; nothing here needs a process, a measure space or even countability, because reversibility as Serfozo defines it "applies to any nonnegative rates or probabilities as an algebraic property, not necessarily associated with a stochastic process". The same statements therefore cover discrete-time chains with qqq read as transition probabilities, which is what the book points out.

Paths are functions {0,…,n}→E\{0,\dots,n\}\to\mathbb E{0,…,n}→E with positive consecutive rates. A path of length zero is a single state and its ratio product is the empty product 111, which is consistent with π(x0)=1\pi(x^0)=1π(x0)=1.

Kolmogorov's criterion is stated for arbitrary closed sequences, exactly as the book states it, not only for closed paths. Under two-way communication the two readings agree — if one rate in the sequence vanishes then so does its reverse and both products are zero — but the book's form is the one that is directly checkable.

The canonical measure is not defined by a choice function. Instead the conclusion asserts the existence of a positive π\piπ with π(x0)=1\pi(x^0)=1π(x0)=1 satisfying detailed balance and agreeing with the ratio product along every path from the origin. That is the content of (2.9) without needing to pick a path for each state.

Theorem 2.2 is stated for a finite state space. Serfozo assumes the process is ergodic, and the cut-flow argument then sums the balance equations over one side of the cut; on an infinite state space that summation needs an integrability condition that the book leaves implicit in "ergodic". Finiteness makes the rearrangement unconditional and the statement clearly true; the general case is listed under contributions.

Theorem 2.5 is stated as the conclusion that π\piπ satisfies the balance equations, with explicit summability hypotheses for the three families of sums involved. That π\piπ is the stationary distribution additionally requires it to be normalized and the process to be ergodic, neither of which is part of the algebraic content.

Contributions welcome beyond the listed items: Theorem 2.4, the characterization of reversibility by invariance of the finite-dimensional distributions under time reversal; Remark 2.9's recursive construction of the canonical measure; Theorem 2.22 on reversible network processes with batch movements; Theorem 2.31 and the partition-reversible processes of Sections 2.8 and 2.9; and the reversibility criteria for Jackson and Whittle networks in Examples 2.24 and 2.25.

Selected references

  • Richard Serfozo, Introduction to Stochastic Networks, Applications of Mathematics 44, Springer, 1999, chapter 2, pp. 44–51; (2.1), (2.2), Example 2.1, Theorems 2.2, 2.5 and 2.8, Remark 2.9. DOI 10.1007/978-1-4612-1482-3
  • A. N. Kolmogoroff, Zur Theorie der Markoffschen Ketten, Mathematische Annalen 112 (1936), 155–160. DOI 10.1007/BF01565412
  • F. P. Kelly, Reversibility and Stochastic Networks, Wiley, 1979; reissued Cambridge University Press, 2011, chapter 1. DOI 10.1017/CBO9781139226424
  • P. Whittle, Systems in Stochastic Equilibrium, Wiley, 1986, chapters 1 and 10.
6 thms2 active usersReviewed
🏆Completed
AnalysisProbability·Captain: naimengye

Probability Theory and Examples V: Blumenthal's 0-1 Law and the Local Behaviour of Brownian PathsTextbook

Motivation

A Brownian path is continuous, and that is essentially all it is. It has no derivative anywhere, it crosses zero infinitely often in every interval (0,ϵ)(0,\epsilon)(0,ϵ), and it becomes positive and negative immediately after time zero. None of this is visible from the finite-dimensional distributions; it is a statement about the germ of the path at a point, and the tool that unlocks it is a zero-one law.

Chapter 7 of Rick Durrett's Probability: Theory and Examples (Version 5, 2019) develops that tool. The natural filtration Fs0=σ(Br:r≤s)\mathcal F^{0}_{s}=\sigma(B_r:r\le s)Fs0​=σ(Br​:r≤s) is enlarged to Fs+=⋂t>sFt0\mathcal F^{+}_{s}=\bigcap_{t>s}\mathcal F^{0}_{t}Fs+​=⋂t>s​Ft0​, which allows "an infinitesimal peek at the future" — a quantity like lim sup⁡t↓s(Bt−Bs)/f(t−s)\limsup_{t\downarrow s}(B_t-B_s)/f(t-s)limsupt↓s​(Bt​−Bs​)/f(t−s) is Fs+\mathcal F^{+}_{s}Fs+​-measurable but not Fs0\mathcal F^{0}_{s}Fs0​-measurable. Blumenthal's 0-1 law (Theorem 7.2.3) says that at s=0s=0s=0 this enlargement buys nothing probabilistically: the germ σ\sigmaσ-field F0+\mathcal F^{+}_{0}F0+​ is trivial.

Everything local follows. If the path had any chance of staying non-positive on some interval (0,ϵ)(0,\epsilon)(0,ϵ), that would be a germ event of probability at least 1/21/21/2 by symmetry, so it has probability one — and the path enters (0,∞)(0,\infty)(0,∞) immediately. Continuity then forces it to return to zero immediately as well. Combined with the time inversion Xt=tB(1/t)X_t=tB(1/t)Xt​=tB(1/t), which turns the germ at 000 into the tail at ∞\infty∞, the same law gives lim sup⁡t→∞Bt/t=∞\limsup_{t\to\infty}B_t/\sqrt t=\inftylimsupt→∞​Bt​/t​=∞ and the recurrence of one-dimensional Brownian motion.

Setting

Let (Ω,F,P)(\Omega,\mathcal F,\mathbb P)(Ω,F,P) be a probability space and B:R≥0→Ω→RB:\mathbb R_{\ge0}\to\Omega\to\mathbb RB:R≥0​→Ω→R a Brownian motion: its finite-dimensional laws are centred Gaussian with covariance cov⁡(Bs,Bt)=s∧t\operatorname{cov}(B_s,B_t)=s\wedge tcov(Bs​,Bt​)=s∧t, and almost every path is continuous. In particular B0=0B_0=0B0​=0 almost surely, so this is Durrett's P0\mathbb P_0P0​.

Three σ\sigmaσ-fields organize the chapter:

Ft0=σ(Bs:s≤t),F0+=⋂t>0Ft0,T=⋂t≥0σ(Bs:s≥t).\mathcal F^{0}_{t}=\sigma(B_s:s\le t),\qquad \mathcal F^{+}_{0}=\bigcap_{t>0}\mathcal F^{0}_{t},\qquad \mathcal T=\bigcap_{t\ge0}\sigma(B_s:s\ge t).Ft0​=σ(Bs​:s≤t),F0+​=t>0⋂​Ft0​,T=t≥0⋂​σ(Bs​:s≥t).

The first is the past, the second the germ at time zero, the third the tail at infinity.

A path fff is Lipschitz at the point sss with constant CCC when ∣f(t)−f(s)∣≤C∣t−s∣|f(t)-f(s)|\le C|t-s|∣f(t)−f(s)∣≤C∣t−s∣ for all ttt within some positive distance of sss. A path differentiable at sss is Lipschitz at sss, so failing this at every point and for every constant is a strong form of nowhere differentiability.

Formalization targets

Goal — Theorem 7.2.3, Blumenthal's 0-1 law

A∈F0+⟹P(A)∈{0,1}.A\in\mathcal F^{+}_{0}\quad\Longrightarrow\quad \mathbb P(A)\in\{0,1\}.A∈F0+​⟹P(A)∈{0,1}.

In words: the germ σ\sigmaσ-field is trivial. Nothing about the path in an arbitrarily short initial interval is genuinely random.

Supporting levels

Theorem 7.1.5, that Brownian paths are Hölder continuous of every exponent γ<1/2\gamma<1/2γ<1/2 on every bounded interval; Theorem 7.1.6, that with probability one they are not Lipschitz at any point, hence nowhere differentiable — the Paley–Wiener–Zygmund theorem in the proof of Dvoretsky, Erdős and Kakutani; Theorem 7.2.4, that the path enters (0,∞)(0,\infty)(0,∞) immediately; Theorem 7.2.5, that its zero set accumulates at 000; and Theorem 7.2.8, that lim sup⁡t→∞Bt/t=+∞\limsup_{t\to\infty}B_t/\sqrt t=+\inftylimsupt→∞​Bt​/t​=+∞ and lim inf⁡t→∞Bt/t=−∞\liminf_{t\to\infty}B_t/\sqrt t=-\inftyliminft→∞​Bt​/t​=−∞.

Significance

The results themselves. Blumenthal's law is the gateway to every local path property of Brownian motion, and Durrett uses it immediately for exactly that. Theorems 7.2.4 and 7.2.5 together say the path oscillates across zero infinitely often in every initial interval — the reason the zero set is an uncountable closed set of Lebesgue measure zero, and the reason the "first return to zero" is not a useful notion at time 000. Theorem 7.2.8 is the same law pushed to t→∞t\to\inftyt→∞ by time inversion, and it is what makes one-dimensional Brownian motion recurrent (Theorem 7.2.9).

The Hölder pair is the sharp description of path regularity. Exponent γ<1/2\gamma<1/2γ<1/2 always works, γ>1/2\gamma>1/2γ>1/2 never does, and the borderline 1/21/21/2 is subtle: P(t∈H1/2)=0\mathbb P(t\in H_{1/2})=0P(t∈H1/2​)=0 for each fixed ttt, but Davis (1983) showed P(H1/2≠∅)=1\mathbb P(H_{1/2}\ne\emptyset)=1P(H1/2​=∅)=1. Nowhere differentiability is the historical headline — Paley, Wiener and Zygmund (1933) — and the proof given here is a short covering argument rather than a series construction.

Formalizing them. Mathlib has the object but almost none of the theory. It defines IsPreBrownianReal and IsBrownianReal, proves that a centred Gaussian process with covariance s∧ts\wedge ts∧t is pre-Brownian, and supplies the invariances — negation, scaling t↦c−1/2B(ct)t\mapsto c^{-1/2}B(ct)t↦c−1/2B(ct), the shift t↦B(t0+t)−B(t0)t\mapsto B(t_0+t)-B(t_0)t↦B(t0​+t)−B(t0​), and the time inversion t↦tB(1/t)t\mapsto tB(1/t)t↦tB(1/t) — together with the weak Markov property IsPreBrownianReal.indepFun_shift. It does not have the germ or tail σ\sigmaσ-fields, Blumenthal's law, the strong Markov property, any path-regularity result, or the Kolmogorov–Chentsov continuity theorem: Probability/Process/Kolmogorov.lean defines IsKolmogorovProcess, the hypothesis, and stops there. So this mission supplies the σ\sigmaσ-fields and then everything Durrett proves with them.

Difficulty

The goal reduces to Durrett's Theorem 7.2.2, that E(Z∣Fs+)=E(Z∣Fs0)\mathbb E(Z\mid\mathcal F^{+}_{s})=\mathbb E(Z\mid\mathcal F^{0}_{s})E(Z∣Fs+​)=E(Z∣Fs0​) for bounded path-measurable ZZZ; at s=0s=0s=0, F00=σ(B0)\mathcal F^{0}_{0}=\sigma(B_0)F00​=σ(B0​) is trivial because B0=0B_0=0B0​=0 almost surely, so 1A=E(1A∣F0+)=P(A)\mathbf 1_A=\mathbb E(\mathbf 1_A\mid\mathcal F^{+}_{0})=\mathbb P(A)1A​=E(1A​∣F0+​)=P(A) almost surely, and an indicator almost surely equal to a constant forces that constant to be 000 or 111. Theorem 7.2.2 itself is a monotone class argument on top of the Markov property, and the Markov property in this setting is Mathlib's indepFun_shift plus the observation that the conditional expectation of a product ∏mfm(Btm)\prod_m f_m(B_{t_m})∏m​fm​(Btm​​) over Fs+\mathcal F^{+}_{s}Fs+​ lands in Fs0\mathcal F^{0}_{s}Fs0​. Assembling that is the work.

Theorem 7.2.4 is then three lines — P0(τ≤t)≥P0(Bt>0)=1/2\mathbb P_0(\tau\le t)\ge\mathbb P_0(B_t>0)=1/2P0​(τ≤t)≥P0​(Bt​>0)=1/2 by symmetry of the Gaussian, let t↓0t\downarrow0t↓0, apply the goal — provided the event has been shown to lie in the germ field, which is where continuity of paths enters. Theorem 7.2.5 follows from 7.2.4 applied to BBB and −B-B−B together with the intermediate value theorem.

Theorem 7.1.5 needs the Kolmogorov–Chentsov continuity theorem, which has to be built: from E∣Bt−Bs∣2m=Cm∣t−s∣m\mathbb E|B_t-B_s|^{2m}=C_m|t-s|^mE∣Bt​−Bs​∣2m=Cm​∣t−s∣m one gets Hölder-γ\gammaγ control for γ<(m−1)/2m\gamma<(m-1)/2mγ<(m−1)/2m, and m→∞m\to\inftym→∞ gives every γ<1/2\gamma<1/2γ<1/2. The dyadic chaining and Borel–Cantelli step is the substance, and it is worth building as a general theorem about IsKolmogorovProcess rather than only for Brownian motion.

Theorem 7.1.6 is self-contained and short: fix CCC, let AnA_nAn​ be the event that some s∈[0,1]s\in[0,1]s∈[0,1] has ∣Bt−Bs∣≤C∣t−s∣|B_t-B_s|\le C|t-s|∣Bt​−Bs​∣≤C∣t−s∣ whenever ∣t−s∣≤3/n|t-s|\le3/n∣t−s∣≤3/n, and bound P(An)≤n P(∣B1∣≤5Cn−1/2)3≤n{10Cn−1/2(2π)−1/2}3→0\mathbb P(A_n)\le n\,\mathbb P(|B_1|\le5Cn^{-1/2})^3\le n\{10Cn^{-1/2}(2\pi)^{-1/2}\}^3\to0P(An​)≤nP(∣B1​∣≤5Cn−1/2)3≤n{10Cn−1/2(2π)−1/2}3→0; since AnA_nAn​ increases, every P(An)=0\mathbb P(A_n)=0P(An​)=0.

Theorem 7.2.8 needs the tail 0-1 law, Theorem 7.2.7, which is the goal transported through the time inversion Xt=tB(1/t)X_t=tB(1/t)Xt​=tB(1/t) — Mathlib's IsPreBrownianReal.inv — because the tail field of BBB is the germ field of XXX. With that, P0(Bn/n≥K i.o.)≥P0(B1≥K)>0\mathbb P_0(B_n/\sqrt n\ge K\ \text{i.o.})\ge\mathbb P_0(B_1\ge K)>0P0​(Bn​/n​≥K i.o.)≥P0​(B1​≥K)>0 by scaling, so the probability is one, and KKK is arbitrary.

Formalization scope

The process is Mathlib's IsBrownianReal, indexed by ℝ≥0, on an abstract probability space — not the canonical path space C[0,∞)C[0,\infty)C[0,∞) that Durrett uses. This is why the shift operators θs\theta_sθs​ and the family {Px}\{\mathbb P_x\}{Px​} do not appear: there is one measure, the process starts at 000 almost surely, and each statement is about that process. Theorem 7.2.7 as Durrett states it quantifies over all starting points and has no direct analogue here; the tail 0-1 law for the process started at 000 does, and is listed under contributions as the route to Theorem 7.2.8.

The three σ\sigmaσ-fields are built as suprema and infima in the lattice of σ\sigmaσ-algebras on Ω\OmegaΩ: pastSigma B t is the supremum of the pullbacks of the Borel field along BsB_sBs​ for s≤ts\le ts≤t, and germSigma B, tailSigma B are the corresponding infima. The goal carries the hypothesis that each BtB_tBt​ is measurable, not merely almost-everywhere measurable, which is what IsPreBrownianReal gives and what puts these σ\sigmaσ-fields below the ambient one; the canonical construction satisfies it, and without it "P(A)\mathbb P(A)P(A)" for a germ event would be an outer measure.

Hölder continuity is stated locally — for almost every path, every TTT admits a constant — since global Hölder continuity on [0,∞)[0,\infty)[0,∞) is false. The order of quantifiers puts the null set first, so a single path works for every TTT at once.

The hitting statements avoid an infimum over a possibly empty set. "τ=0\tau=0τ=0 almost surely" is written as: almost surely, for every ϵ>0\epsilon>0ϵ>0 there is t∈(0,ϵ)t\in(0,\epsilon)t∈(0,ϵ) with Bt>0B_t>0Bt​>0; and "T0=0T_0=0T0​=0 almost surely" as the same with Bt=0B_t=0Bt​=0. These are equivalent to Durrett's statements and say what the infimum is there to say. Similarly Theorem 7.2.8 is written with ∃ᶠ … in atTop rather than as an extended-real lim sup⁡\limsuplimsup, which is what "lim sup⁡=+∞\limsup=+\inftylimsup=+∞" means and avoids a coercion.

LipschitzAtPoint f s C is "there is a scale δ>0\delta>0δ>0 on which ∣f(t)−f(s)∣≤C∣t−s∣|f(t)-f(s)|\le C|t-s|∣f(t)−f(s)∣≤C∣t−s∣". Its negation for every sss and every CCC is Theorem 7.1.6, and it has content in both directions: the identity path is Lipschitz at every point with C=1C=1C=1, while t↦tt\mapsto\sqrt tt↦t​ is not Lipschitz at 000 with C=1C=1C=1 — both checked in Lean before publishing.

Existence is not part of this mission. Mathlib proves nothing of the form "a Brownian motion exists", and nothing here needs it: every item takes a Brownian motion as a hypothesis. That the hypothesis is satisfiable is a theorem — Durrett's 7.1.1, via Kolmogorov extension and the continuity theorem — and it is listed under contributions, where it belongs, since building it is a project of its own.

Contributions welcome beyond the listed items: Kolmogorov–Chentsov as a general statement about IsKolmogorovProcess; Theorem 7.1.1, the existence of Brownian motion; Theorem 7.2.2 in full, for every sss; the tail 0-1 law and Theorem 7.2.9, recurrence; the strong Markov property and the reflection principle of section 7.3; and Exercise 7.1.5, that no path is Hölder of any exponent γ>1/2\gamma>1/2γ>1/2.

Selected references

  • Rick Durrett, Probability: Theory and Examples, Version 5 (11 January 2019), chapter 7, sections 7.1 and 7.2 (pp. 353–365); Theorems 7.1.5, 7.1.6, 7.2.3, 7.2.4, 7.2.5, 7.2.8. Published as the 5th edition, Cambridge University Press, 2019, DOI 10.1017/9781108591034
  • R. M. Blumenthal, An extended Markov property, Transactions of the American Mathematical Society 85 (1957), 52–72. DOI 10.1090/S0002-9947-1957-0088102-2
  • R. E. A. C. Paley, N. Wiener and A. Zygmund, Notes on random functions, Mathematische Zeitschrift 37 (1933), 647–668. DOI 10.1007/BF01474606
  • A. Dvoretzky, P. Erdős and S. Kakutani, Nonincrease everywhere of the Brownian motion process, Proceedings of the Fourth Berkeley Symposium II (1961), 103–116.
  • N. Wiener, Differential space, Journal of Mathematics and Physics 2 (1923), 131–174. DOI 10.1002/sapm192321131
  • I. Karatzas and S. E. Shreve, Brownian Motion and Stochastic Calculus, 2nd ed., Springer, 1991, chapter 2. DOI 10.1007/978-1-4612-0949-2
7 thms2 active usersReviewed
🏆Completed
Markov ChainProbability·Captain: naimengye

Probability Theory and Examples III: The Markov Chain Convergence TheoremTextbook

Motivation

A Markov chain forgets. Run it long enough and the distribution of its position stops depending on where it started — that is the intuition behind shuffling a deck, behind Markov chain Monte Carlo, behind PageRank, and behind the stationary analyses of every queueing model. Chapter 5 of Rick Durrett's Probability: Theory and Examples (Version 5, 2019) makes it a theorem, and identifies exactly what can go wrong.

Two things can. The chain may fail to reach parts of the state space, and the answer is irreducibility. Or it may reach them only on a lattice of times — a chain alternating between two halves of its state space never forgets whether the clock is even or odd — and the answer is aperiodicity. Theorem 5.6.6 says that is the complete list: an irreducible, aperiodic chain with a stationary distribution has pn(x,y)→π(y)p^n(x,y)\to\pi(y)pn(x,y)→π(y), for every pair of states, whatever the starting point.

Setting

Let SSS be a countable state space and p(x,y)p(x,y)p(x,y) a transition probability: non-negative, with each row summing to one. The nnn-step transition probabilities are the matrix powers, p0(x,y)=δxyp^0(x,y)=\delta_{xy}p0(x,y)=δxy​ and pn+1(x,y)=∑zp(x,z)pn(z,y)p^{n+1}(x,y)=\sum_z p(x,z)p^n(z,y)pn+1(x,y)=∑z​p(x,z)pn(z,y).

Hitting is described by the first-passage probabilities fn(x,y)=Px(Ty=n)f^n(x,y)=\mathbb{P}_x(T_y=n)fn(x,y)=Px​(Ty​=n), given by f1(x,y)=p(x,y)f^1(x,y)=p(x,y)f1(x,y)=p(x,y) and fn+1(x,y)=∑z≠yp(x,z)fn(z,y)f^{n+1}(x,y)=\sum_{z\ne y}p(x,z)f^n(z,y)fn+1(x,y)=∑z=y​p(x,z)fn(z,y) — the chain moves once and then reaches yyy for the first time, having avoided it meanwhile. Summing them gives

ρxy=Px(Ty<∞)=∑n≥1fn(x,y),EyTy=∑n≥1n fn(y,y).\rho_{xy}=\mathbb{P}_x(T_y<\infty)=\sum_{n\ge1}f^n(x,y),\qquad \mathbb{E}_yT_y=\sum_{n\ge1}n\,f^n(y,y).ρxy​=Px​(Ty​<∞)=n≥1∑​fn(x,y),Ey​Ty​=n≥1∑​nfn(y,y).

A state is recurrent when ρyy=1\rho_{yy}=1ρyy​=1, the chain is irreducible when ρxy>0\rho_{xy}>0ρxy​>0 for all x,yx,yx,y, and a state xxx is aperiodic when the greatest common divisor of Ix={n≥1:pn(x,x)>0}I_x=\{n\ge1:p^n(x,x)>0\}Ix​={n≥1:pn(x,x)>0} is 111. A stationary distribution is a probability vector π\piπ with ∑xπ(x)p(x,y)=π(y)\sum_x\pi(x)p(x,y)=\pi(y)∑x​π(x)p(x,y)=π(y).

Formalization targets

Goal — Theorem 5.6.6, the convergence theorem

p irreducible, aperiodic, with stationary distribution π⟹pn(x,y)⟶π(y)  for all x,y.p \text{ irreducible},\ \text{aperiodic},\ \text{with stationary distribution } \pi \quad\Longrightarrow\quad p^n(x,y)\longrightarrow\pi(y)\ \text{ for all } x,y .p irreducible, aperiodic, with stationary distribution π⟹pn(x,y)⟶π(y)  for all x,y.

The goal asserts pointwise convergence of the transition probabilities, not convergence in total variation and not a rate; those are strengthenings, and stating the weakest useful form is what keeps the theorem stable.

Supporting levels

Theorem 5.3.1, that a state is recurrent exactly when ∑npn(y,y)\sum_n p^n(y,y)∑n​pn(y,y) diverges — the bridge between the hitting picture and the matrix picture; Theorem 5.3.2, that recurrence is contagious; Theorem 5.5.10, that every state in the support of a stationary distribution is recurrent; and Theorem 5.5.11, that for an irreducible chain with a stationary distribution π(x)=1/ExTx\pi(x)=1/\mathbb{E}_xT_xπ(x)=1/Ex​Tx​.

Significance

The result itself. Theorem 5.6.6 is what licenses reading a stationary distribution as a long-run frequency. Without it, π\piπ is merely a fixed point of a linear map; with it, π(y)\pi(y)π(y) is the limiting probability of being at yyy, from any start. Theorem 5.5.11 then gives the quantity a second, purely local meaning — π(x)\pi(x)π(x) is the reciprocal of the mean return time to xxx — which is the identity behind every renewal-reward computation in applied probability and behind the "expected time between visits" estimates that Monte Carlo methods rely on. The two necessary hypotheses are sharp: a periodic chain has pn(x,y)p^n(x,y)pn(x,y) oscillating rather than converging, and Durrett's Theorem 5.7.2 gives the corrected statement in that case.

Formalizing it. Mathlib has no countable-state Markov chain theory. It has ProbabilityTheory.Kernel and an Irreducible notion for kernels, but nothing about recurrence, transience, first-passage decompositions, stationary measures or the convergence theorem, and nothing that specializes to a transition matrix on a countable set. The mission therefore contributes the whole apparatus of sections 5.3, 5.5 and 5.6 — the nnn-step and first-passage probabilities, ρxy\rho_{xy}ρxy​, the mean return time, recurrence, irreducibility, aperiodicity and stationarity — together with the results that make it usable.

Difficulty

The usual proof of the goal is a coupling argument, and it is short but not obvious: run two independent copies of the chain, one from xxx and one from π\piπ, on the product space S×SS\times SS×S with transition probability pˉ((x1,x2),(y1,y2))=p(x1,y1)p(x2,y2)\bar p((x_1,x_2),(y_1,y_2))=p(x_1,y_1)p(x_2,y_2)pˉ​((x1​,x2​),(y1​,y2​))=p(x1​,y1​)p(x2​,y2​); aperiodicity plus irreducibility make the product chain irreducible, π×π\pi\times\piπ×π is stationary for it, so it is recurrent and the two copies meet almost surely; after they meet they can be exchanged. Each step of that is a separate obligation, and the one that consumes aperiodicity is the irreducibility of the product chain — for a periodic chain it fails, which is exactly why the theorem does.

The number-theoretic ingredient is worth flagging: irreducibility of the product needs that Ix={n:pn(x,x)>0}I_x=\{n:p^n(x,x)>0\}Ix​={n:pn(x,x)>0}, being closed under addition with gcd⁡1\gcd 1gcd1, contains every sufficiently large integer. That is the numerical semigroup fact, and it is where aperiodicity is actually used.

Formalization scope

The state space is any countable type with decidable equality, and the transition probability is a plain function S×S→RS\times S\to\mathbb{R}S×S→R constrained by IsTransition: non-negative entries, summable rows, rows summing to one. Sums over the state space are unconditional sums, so no finiteness is assumed anywhere.

The chain's law is not constructed. Every quantity here — pnp^npn, fnf^nfn, ρxy\rho_{xy}ρxy​, EyTy\mathbb{E}_yT_yEy​Ty​ — is defined by an explicit recursion on the transition matrix, not as an expectation against a measure on path space. This is a deliberate choice: building the path measure is a substantial project of its own, and none of the statements in these sections need it. The recursions are the standard ones and they are the definitions the book's own computations use. The cost is that probabilistic statements about paths, such as Theorem 5.6.1 on the almost-sure limit of the visit counts Nn(y)/nN_n(y)/nNn​(y)/n, cannot be phrased in this language and are not part of the mission.

Conventions: p0p^0p0 is the identity matrix; fnf^nfn vanishes at n=0n=0n=0; ρxy\rho_{xy}ρxy​ and EyTy\mathbb{E}_yT_yEy​Ty​ are unconditional sums over n≥1n\ge1n≥1, so an infinite mean return time appears as a non-summable series rather than as an extended real. Theorem 5.5.11 is therefore stated as summability together with π(x)⋅ExTx=1\pi(x)\cdot\mathbb{E}_xT_x=1π(x)⋅Ex​Tx​=1, which asserts finiteness of the mean return time rather than silently relying on a division convention.

Aperiodicity is "the only natural number dividing every element of IxI_xIx​ is 111", which is gcd⁡Ix=1\gcd I_x=1gcdIx​=1 written without needing a gcd of a set; it is false when IxI_xIx​ is empty, which is correct, since the period of such a state is undefined.

The goal is not vacuous: the hypotheses are satisfiable by any strictly positive transition matrix on a finite set.

Contributions welcome beyond the listed items: Theorem 5.3.3 on finite closed sets; the decomposition theorem 5.3.5; existence of a stationary measure from a recurrent state (5.5.7) and its uniqueness (5.5.9); the equivalence of positive recurrence and the existence of a stationary distribution (5.5.12); Theorem 5.7.2 for the periodic case; and the path-level results of section 5.6, which need the chain's law on path space.

Selected references

  • Rick Durrett, Probability: Theory and Examples, Version 5 (11 January 2019), chapter 5, sections 5.3, 5.5 and 5.6 (pp. 281–320); Theorems 5.3.1, 5.3.2, 5.5.10, 5.5.11, 5.6.6. Published as the 5th edition, Cambridge University Press, 2019, DOI 10.1017/9781108591034
  • J. R. Norris, Markov Chains, Cambridge University Press, 1998, chapter 1. DOI 10.1017/CBO9780511810633
  • D. A. Levin and Y. Peres, Markov Chains and Mixing Times, 2nd ed., American Mathematical Society, 2017. DOI 10.1090/mbk/107
  • W. Doeblin, Exposé de la théorie des chaînes simples constantes de Markoff à un nombre fini d'états, Revue Mathématique de l'Union Interbalkanique 2 (1938), 77–105.
6 thms2 active usersReviewed
🏆Completed
Operations ResearchOptimization·Captain: naimengye

Stochastic Networks VIII: Flow Level Models and the Stability of alpha-Fair AllocationsTextbook

Motivation

Chapter 7 of Frank Kelly and Elena Yudovina's Stochastic Networks (Cambridge University Press, 2014) studies a network with a fixed set of users, and shows that a decentralized rate control converges to a fair allocation. Chapter 8 asks the question one time scale up. Files finish and their flows leave; new files arrive and new flows appear. The number of flows on each route is therefore itself a random process, and the rate allocation — assumed to settle instantly, since rate control runs much faster than files arrive and depart — depends on it.

The question is whether this system is stable: does the number of flows in progress stay bounded, or does it grow without limit? The answer is the best one could hope for. A weighted α\alphaα-fair allocation, the family that contains proportional fairness, TCP fairness, max-min fairness and throughput maximization as special cases, is stable exactly when the offered load at each resource is below that resource's capacity. No more is required — no condition coupling different resources, no dependence on α\alphaα, no dependence on the topology beyond the loads themselves.

Setting

A network has JJJ resources and RRR routes with incidence matrix AAA. Let nrn_rnr​ be the number of flows active on route rrr and xrx_rxr​ the rate given to each of them, so route rrr consumes nrxrn_rx_rnr​xr​ at each resource it uses. Flows arrive on route rrr as a Poisson process of rate νr\nu_rνr​ and carry files that are exponentially distributed with parameter μr\mu_rμr​, so

nr→nr+1 at rate νr,nr→nr−1 at rate μrnrxr(n),n_r\to n_r+1 \text{ at rate } \nu_r, \qquad n_r\to n_r-1 \text{ at rate } \mu_rn_rx_r(n),nr​→nr​+1 at rate νr​,nr​→nr​−1 at rate μr​nr​xr​(n),

and ρr=νr/μr\rho_r=\nu_r/\mu_rρr​=νr​/μr​ is the load on route rrr.

Given weights wr>0w_r>0wr​>0 and α∈(0,∞)\alpha\in(0,\infty)α∈(0,∞), the weighted α\alphaα-fair allocation is the solution of

maximize ∑rwrnrxr1−α1−αsubject to ∑r:j∈rnrxr≤Cj, x≥0,(8.1)\text{maximize } \sum_r w_rn_r\frac{x_r^{1-\alpha}}{1-\alpha} \quad\text{subject to } \sum_{r:j\in r}n_rx_r\le C_j,\ x\ge0, \tag{8.1}maximize r∑​wr​nr​1−αxr1−α​​subject to r:j∈r∑​nr​xr​≤Cj​, x≥0,(8.1)

with ∑rwrnrlog⁡xr\sum_r w_rn_r\log x_r∑r​wr​nr​logxr​ in place of the objective when α=1\alpha=1α=1. Written in the aggregate rates Xr=nrxrX_r=n_rx_rXr​=nr​xr​ this becomes

maximize G(X)=∑rwrnrαXr1−α1−αsubject to ∑r:j∈rXr≤Cj, X≥0.(8.4)\text{maximize } G(X)=\sum_r w_rn_r^{\alpha}\frac{X_r^{1-\alpha}}{1-\alpha} \quad\text{subject to } \sum_{r:j\in r}X_r\le C_j,\ X\ge0. \tag{8.4}maximize G(X)=r∑​wr​nrα​1−αXr1−α​​subject to r:j∈r∑​Xr​≤Cj​, X≥0.(8.4)

The family interpolates between the fairness notions of Chapter 7: α→0\alpha\to0α→0 with w≡1w\equiv1w≡1 maximizes throughput, α=1\alpha=1α=1 is weighted proportional fairness, α=2\alpha=2α=2 with wr=1/Tr2w_r=1/T_r^2wr​=1/Tr2​ is TCP fairness, and α→∞\alpha\to\inftyα→∞ with w≡1w\equiv1w≡1 approaches max-min fairness.

Formalization targets

Goal — the drift inequality behind Theorem 8.2

Suppose the load respects every capacity, ∑r:j∈rρr<Cj\sum_{r:j\in r}\rho_r<C_j∑r:j∈r​ρr​<Cj​ for all jjj. Then there is an ϵ>0\epsilon>0ϵ>0, depending only on the loads and capacities, such that for every flow count nnn and the α\alphaα-fair aggregate rates X=X(n)X=X(n)X=X(n),

∑rwrρr−αnrα(ρr−Xr)  ≤  −ϵ∑rwrnrαρr1−α.\sum_r w_r\rho_r^{-\alpha}n_r^{\alpha}\bigl(\rho_r-X_r\bigr) \;\le\;-\epsilon\sum_r w_rn_r^{\alpha}\rho_r^{1-\alpha}.r∑​wr​ρr−α​nrα​(ρr​−Xr​)≤−ϵr∑​wr​nrα​ρr1−α​.

The left-hand side is the drift of the Lyapunov function L(n)=∑r(wr/μr)ρr−αnrα+1/(α+1)L(n)=\sum_r(w_r/\mu_r)\rho_r^{-\alpha}n_r^{\alpha+1}/(\alpha+1)L(n)=∑r​(wr​/μr​)ρr−α​nrα+1​/(α+1), by the identity (8.3); the right-hand side is the book's displayed bound. The single ϵ\epsilonϵ is uniform in nnn, which is what a Foster–Lyapunov argument needs, and it is the whole deterministic content of Theorem 8.2's sufficiency half.

Supporting levels

The derivative wrnrαXr−αw_rn_r^{\alpha}X_r^{-\alpha}wr​nrα​Xr−α​ of the objective, in the same form for every α∈(0,∞)\alpha\in(0,\infty)α∈(0,∞) including α=1\alpha=1α=1 (Exercise 8.3); strict concavity of the objective; the characterization of the optimum by xr=(wr/∑j∈rpj)1/αx_r=(w_r/\sum_{j\in r}p_j)^{1/\alpha}xr​=(wr​/∑j∈r​pj​)1/α with primal and dual feasibility and complementary slackness (Exercise 8.4); the tangent-plane inequality (8.5) that concavity gives at the optimum; the drift identity (8.3); and that α=1\alpha=1α=1 recovers weighted proportional fairness, connecting this chapter to Proposition 7.4 of mission VII.

Significance

The result itself. Theorem 8.2 says the stability region of an α\alphaα-fair network is the largest it could possibly be — the same region a single isolated resource would have — and that it does not shrink as α\alphaα varies. That is a strong statement about a large design space, and it is not automatic: section 8.4 of the book exhibits rate allocation schemes for which it fails, so the natural condition (8.2) is a property of α\alphaα-fairness and not of rate allocation in general. Since the family covers the fairness notions actually implemented in transport protocols, the theorem is what licenses treating "is the load below capacity?" as the only capacity-planning question at flow level.

Formalizing it. Nothing here is open; the theorem is due to Bonald and Massoulié (2001), with the fluid-limit machinery from Gromoll and Williams and from Massoulié. What the mission produces is a machine-checked α\alphaα-fair allocation — objective, derivative, concavity, KKT conditions — and the exact drift inequality, on top of the congestion-control layer published in mission VII of this series, whose networkFeasible and linkFlow it reuses. Mathlib has no network utility maximization and no fairness criteria.

Difficulty

The proof is short but the step that makes it work is easy to miss. The drift is ∑rwrnrαρr−α(ρr−Xr)\sum_r w_rn_r^{\alpha}\rho_r^{-\alpha}(\rho_r-X_r)∑r​wr​nrα​ρr−α​(ρr​−Xr​), and there is no reason for this to be negative term by term — some routes are over-served and some under-served. What makes the sum negative is that ρ\rhoρ is itself a feasible point of the same optimization problem (8.4) that XXX solves, and GGG is concave, so the tangent plane at ρ\rhoρ lies above GGG:

G′(U)⋅(U−X)≤G(U)−G(X)≤0for every feasible U.G'(U)\cdot(U-X)\le G(U)-G(X)\le0 \quad\text{for every feasible } U .G′(U)⋅(U−X)≤G(U)−G(X)≤0for every feasible U.

Since G′(U)r=wrnrαUr−αG'(U)_r=w_rn_r^{\alpha}U_r^{-\alpha}G′(U)r​=wr​nrα​Ur−α​, taking U=ρU=\rhoU=ρ gives the drift ≤0\le0≤0 immediately. Strict negativity comes from taking U=(1+ϵ)ρU=(1+\epsilon)\rhoU=(1+ϵ)ρ instead, which is still feasible because (8.2) is a strict inequality, and then dividing through by (1+ϵ)α(1+\epsilon)^{\alpha}(1+ϵ)α. The whole argument is one application of concavity at a cleverly chosen point, and the choice of that point is the content.

The scaling that makes it uniform in nnn is the other thing to notice: ϵ\epsilonϵ depends only on how much slack (8.2) leaves, not on nnn, because nnn enters G′G'G′ only through the common factor nrαn_r^{\alpha}nrα​ that appears on both sides.

Formalization scope

Resources and routes are indexed by finite types, the incidence matrix is real-valued with entries 000 or 111, and the feasible set is mission VII's networkFeasible, so Chapters 7 and 8 agree on what a feasible flow vector is. The objective is stated in the aggregate variables Xr=nrxrX_r=n_rx_rXr​=nr​xr​ of problem (8.4) rather than the per-flow rates of (8.1): they are equivalent, but (8.4) is the form the drift argument uses and the form in which the feasible set does not depend on nnn.

The objective is defined with an explicit case split at α=1\alpha=1α=1, exactly as the book defines it, and the derivative milestone asserts that the resulting derivative has the same form wrnrαXr−αw_rn_r^{\alpha}X_r^{-\alpha}wr​nrα​Xr−α​ in both cases — which is the point of Exercise 8.3. Powers are real exponents, so positivity of the flow counts, weights, loads and rates is hypothesised wherever a power appears.

What is formalized and what is quoted. Theorem 8.2 is a statement about positive recurrence of a Markov process, proved by a Foster–Lyapunov criterion whose remaining hypotheses the book leaves to Exercises 8.6 and D.2. There is no theory of continuous-time Markov chains on a countable state space in Mathlib to state positive recurrence against, so this mission formalizes the deterministic drift inequality that carries the argument and quotes the probabilistic wrapper. The inequality is exactly the one the book displays, including the ϵ\epsilonϵ, and the necessity half — that the process is unstable when (8.2) fails — is a coupling argument and is quoted too.

The goal is not vacuous: the hypotheses are satisfiable, and for a single resource of capacity CCC the α\alphaα-fair optimum is Xr=Cwr1/αnr/∑sws1/αnsX_r=Cw_r^{1/\alpha}n_r/\sum_sw_s^{1/\alpha}n_sXr​=Cwr1/α​nr​/∑s​ws1/α​ns​, for which the inequality holds with ϵ=C/∑rρr−1\epsilon=C/\sum_r\rho_r-1ϵ=C/∑r​ρr​−1 and strictly positive slack.

Contributions welcome beyond the listed items: the single-resource equilibrium distribution of Exercise 8.1 and the geometric law of the total number of flows; the bounded-drift estimate of Exercise 8.6; the necessity half of Theorem 8.2; the limiting cases α→0\alpha\to0α→0 and α→∞\alpha\to\inftyα→∞; and the instability examples of section 8.4.

Selected references

  • Frank Kelly and Elena Yudovina, Stochastic Networks, Cambridge University Press, 2014, Chapter 8 (pp. 186–199); problem (8.1), Theorem 8.2, equations (8.2)–(8.5). DOI 10.1017/cbo9781139565363
  • T. Bonald and L. Massoulié, Impact of fairness on Internet performance, ACM SIGMETRICS Performance Evaluation Review 29 (2001), 82–91. DOI 10.1145/384268.378433
  • J. Mo and J. Walrand, Fair end-to-end window-based congestion control, IEEE/ACM Transactions on Networking 8 (2000), 556–567. DOI 10.1109/90.879343
  • L. Massoulié, Structural properties of proportional fairness: stability and insensitivity, Annals of Applied Probability 17 (2007), 809–839. DOI 10.1214/105051607000000014
  • H. C. Gromoll and R. J. Williams, Fluid limits for networks with bandwidth sharing and general document size distributions, Annals of Applied Probability 19 (2009), 243–280. DOI 10.1214/08-AAP541
10 thms2 active usersReviewed
🏆Completed
Operations ResearchProbability·Captain: naimengye

Stochastic Networks V: Random Access and the Critical Rate of Backoff SchemesTextbook

Motivation

When many stations share one broadcast channel, something has to decide who transmits. A token passed around the stations works when there are few of them and none is silent for long, but it scales badly and breaks if the token is lost. The alternative is to let stations transmit whenever they like and use randomness to recover from the resulting collisions. That is the design of ALOHA, built in the 1970s to connect terminals across the Hawaiian islands, and of Ethernet, and of essentially every contention-based access protocol since.

Chapter 5 of Frank Kelly and Elena Yudovina's Stochastic Networks (Cambridge University Press, 2014) asks what such protocols can achieve, and the answers are largely negative. ALOHA with a fixed retransmission probability jams: with probability one there is a finite random time after which every slot contains a collision and no packet ever succeeds again, for every positive arrival rate. Ethernet's binary exponential backoff does better, but only just: it has a positive critical arrival rate, above which only finitely many packets are ever transmitted, and it is still not positive recurrent at rates where it does transmit infinitely many. The chapter's general statement is the one this mission targets: any backoff slower than exponential jams at every positive arrival rate.

Setting

Time is slotted, and a transmission attempt occupies exactly one slot. New packets arrive in a Poisson stream of rate ν\nuν, so the number arriving in a slot is Poisson with mean ν\nuν. A slot in which exactly one station transmits carries its packet successfully; a slot in which two or more transmit is a collision and carries nothing.

In an acknowledgement-based scheme a station learns nothing about the channel except whether its own transmissions succeeded. A packet arriving in slot ttt attempts transmission in slots t+x0,t+x1,…t+x_0, t+x_1, \dotst+x0​,t+x1​,… with 1=x0<x1<⋯1 = x_0 < x_1 < \cdots1=x0​<x1​<⋯, the sequence chosen independently for each packet, and

h(x)=P(x∈X),h(1)=1h(x) = \mathbb{P}(x \in X), \qquad h(1) = 1h(x)=P(x∈X),h(1)=1

is the retransmission function. For ALOHA, h(x)=fh(x) = fh(x)=f for every x>1x > 1x>1; for Ethernet's binary exponential backoff, ∑r≤th(r)∼log⁡2t\sum_{r \le t} h(r) \sim \log_2 t∑r≤t​h(r)∼log2​t.

Now imagine the channel externally jammed from time 000, so that every retransmission actually occurs. The attempts in slot ttt are then Poisson with mean ν∑r=1th(r)\nu\sum_{r=1}^{t}h(r)ν∑r=1t​h(r), and the probability that fewer than two attempts are made in slot ttt is

Pt=(1+ν∑r=1th(r))exp⁡(−ν∑r=1th(r)).P_t=\Bigl(1+\nu\sum_{r=1}^{t}h(r)\Bigr)\exp\Bigl(-\nu\sum_{r=1}^{t}h(r)\Bigr).Pt​=(1+νr=1∑t​h(r))exp(−νr=1∑t​h(r)).

The expected number of such slots is H(ν)=∑t≥1PtH(\nu)=\sum_{t\ge1}P_tH(ν)=∑t≥1​Pt​, which is decreasing in ν\nuν, and the critical rate is

νc=inf⁡{ν:H(ν)<∞}.\nu_c=\inf\{\nu : H(\nu)<\infty\}.νc​=inf{ν:H(ν)<∞}.

Theorem 5.11 of the book says νc\nu_cνc​ deserves its name: below it infinitely many packets are transmitted with probability one, above it only finitely many.

Formalization targets

Goal — condition (5.7): slower-than-exponential backoff has νc=0\nu_c=0νc​=0

1log⁡t∑x=1th(x)⟶∞⟹H(ν)=∑t≥1Pt<∞  for every ν>0.\frac{1}{\log t}\sum_{x=1}^{t}h(x)\longrightarrow\infty \quad\Longrightarrow\quad H(\nu)=\sum_{t\ge1}P_t<\infty \ \text{ for every } \nu>0 .logt1​x=1∑t​h(x)⟶∞⟹H(ν)=t≥1∑​Pt​<∞  for every ν>0.

Since H(ν)<∞H(\nu)<\inftyH(ν)<∞ for every positive ν\nuν, the critical rate is νc=0\nu_c=0νc​=0, and by Theorem 5.11 the expected number of successful transmissions is finite at every positive arrival rate. The goal fixes no constant and no rate: it says only that the dividing line between "jams always" and "has a positive capacity" sits at logarithmic growth of ∑x≤th(x)\sum_{x\le t}h(x)∑x≤t​h(x), which is exponential growth of the backoff.

Supporting levels

The ALOHA drift calculation of section 5.1 and its consequence that the drift is positive once the backlog is large enough; the summability ∑np(n)<∞\sum_n p(n)<\infty∑n​p(n)<∞ that combines with Borel–Cantelli to give Proposition 5.3; the monotonicity of PtP_tPt​ in ν\nuν; the opposite extreme, that a scheme with ∑xh(x)<∞\sum_x h(x)<\infty∑x​h(x)<∞ — one that gives up on a packet after finitely many attempts — has νc=∞\nu_c=\inftyνc​=∞; that ALOHA's own retransmission function satisfies condition (5.7); and the bound of Remark 5.14, that a positive recurrent acknowledgement-based scheme needs ν≤e−ν\nu\le e^{-\nu}ν≤e−ν and hence ν<0.5672\nu<0.5672ν<0.5672, which is strictly below Ethernet's νc=log⁡2\nu_c=\log 2νc​=log2.

Significance

The result itself. Condition (5.7) is the chapter's structural statement about random access, and it is a sharp one. Any retransmission rule under which a packet keeps trying at a rate that does not decay fast enough — a fixed probability, a polynomially growing backoff, anything short of exponential — has critical rate zero: the channel jams at every positive load. Exponential backoff is not a tuning choice, it is the minimum that makes the protocol work at all, and the log⁡b\log blogb formula for a backoff by factor bbb (Exercise 5.7) then says how much capacity each choice of bbb buys. The gap recorded in Remark 5.14 is the other half of the picture: even above the threshold, "infinitely many packets get through" is much weaker than "the backlog is stable", and between 0.5670.5670.567 and log⁡2≈0.693\log 2 \approx 0.693log2≈0.693 Ethernet does the first and provably not the second.

Formalizing it. None of this is open; the analysis is due to Kelly and MacPhee (1987) and Aldous (1987). What the mission contributes is a machine-checked account of the analytic core: the definitions of PtP_tPt​, H(ν)H(\nu)H(ν) and νc\nu_cνc​, the two extremes of the classification, and the ALOHA calculations. Mathlib has no protocol analysis and nothing about random access channels.

Difficulty

The obstacle is a modelling one and it is worth stating plainly rather than discovering halfway through. The chapter's headline results — Proposition 5.3 that ALOHA jams almost surely, Theorem 5.11 that νc\nu_cνc​ is the critical rate, Theorem 5.15 that geometric Ethernet is transient — are statements about sample paths of a Markov chain built on a Poisson arrival stream, and their proofs are coupling arguments comparing a system started empty with one started with a backlog. Nothing in Mathlib supports that construction, and building it is a research-scale project rather than a chapter. This mission therefore formalizes the analytic half and quotes the probabilistic half, which is the same division the book itself makes when it computes νc\nu_cνc​ for a scheme: Theorem 5.11 is proved once, and every subsequent statement about a protocol is a convergence question about ∑tPt\sum_t P_t∑t​Pt​.

Within that analytic half the difficulty is real but ordinary. The summand PtP_tPt​ is a product of a factor growing with ∑r≤th(r)\sum_{r\le t}h(r)∑r≤t​h(r) and one decaying exponentially in it, so the growth hypothesis has to be turned into a summable bound without assuming any regularity of hhh beyond non-negativity — in particular ∑r≤th(r)\sum_{r\le t}h(r)∑r≤t​h(r) need not be eventually monotone in any useful quantitative sense, only divergent faster than log⁡t\log tlogt.

Formalization scope

The retransmission function is any non-negative real sequence; the normalization h(1)=1h(1)=1h(1)=1 is not imposed, since none of the statements need it and imposing it would exclude the comparison schemes. PtP_tPt​ and the partial sums are real-valued, and "H(ν)<∞H(\nu)<\inftyH(ν)<∞" is stated as summability of the sequence rather than as a bound on an extended-real sum, so convergence is asserted rather than assumed. The goal is stated for each fixed ν>0\nu>0ν>0 separately, which is what makes νc=0\nu_c=0νc​=0; it is not stated as a claim about the infimum, because the infimum of the set {ν:H(ν)<∞}\{\nu : H(\nu)<\infty\}{ν:H(ν)<∞} adds nothing once the set is known to be all of (0,∞)(0,\infty)(0,∞).

The growth hypothesis is the book's condition (5.7) verbatim: (log⁡t)−1∑x≤th(x)→∞\bigl(\log t\bigr)^{-1}\sum_{x\le t}h(x)\to\infty(logt)−1∑x≤t​h(x)→∞. Note that at t=0t=0t=0 and t=1t=1t=1 the quotient involves log⁡t≤0\log t \le 0logt≤0 and is not meaningful; divergence to infinity is an eventual statement, so this costs nothing, but it is why the hypothesis is a limit rather than a pointwise bound.

The mission is not vacuous in either direction: the ALOHA milestone exhibits a retransmission function satisfying the hypothesis, and the ∑xh(x)<∞\sum_x h(x)<\infty∑x​h(x)<∞ milestone exhibits one that fails it as strongly as possible, with H(ν)=∞H(\nu)=\inftyH(ν)=∞ for every ν\nuν.

Contributions welcome beyond the listed items: Ethernet's ∑r≤th(r)∼log⁡2t\sum_{r\le t}h(r)\sim\log_2 t∑r≤t​h(r)∼log2​t and the resulting νc=log⁡2\nu_c=\log 2νc​=log2; the generalization νc=log⁡b\nu_c=\log bνc​=logb of Exercise 5.7; the scheme h(x)=1/(xlog⁡x)h(x)=1/(x\log x)h(x)=1/(xlogx) with νc=∞\nu_c=\inftyνc​=∞; the continuous-time halving νc=12log⁡b\nu_c=\frac12\log bνc​=21​logb of Kelly and MacPhee; and, for anyone willing to build the probabilistic layer, Proposition 5.3 and Theorem 5.11 themselves.

Selected references

  • Frank Kelly and Elena Yudovina, Stochastic Networks, Cambridge University Press, 2014, Chapter 5 (pp. 108–132); Definition 5.1, Proposition 5.3, Theorems 5.11 and 5.15, condition (5.7), Examples 5.8, 5.12 and 5.13, Remark 5.14. DOI 10.1017/cbo9781139565363
  • N. Abramson, The ALOHA system — another alternative for computer communications, AFIPS Conference Proceedings 37 (1970), 281–285. DOI 10.1145/1478462.1478502
  • F. P. Kelly and I. M. MacPhee, The number of packets transmitted by collision detect random access schemes, Annals of Probability 15 (1987), 1557–1568. DOI 10.1214/aop/1176991992
  • D. J. Aldous, Ultimate instability of exponential back-off protocol for acknowledgement-based transmission control of random access communication channels, IEEE Transactions on Information Theory 33 (1987), 219–223. DOI 10.1109/TIT.1987.1057295
  • R. M. Metcalfe and D. R. Boggs, Ethernet: distributed packet switching for local computer networks, Communications of the ACM 19 (1976), 395–404. DOI 10.1145/360248.360253
8 thms2 active usersReviewed
🏆Completed
Markov ChainOperations Research·Captain: naimengye

Stochastic Networks II: Migration Processes and Product FormTextbook

Motivation

A queueing network is a collection of service stations through which customers — jobs, packets, telephone calls, patients — move one at a time. The state of such a network is a vector of occupancy counts, one per station, and the number of states grows exponentially in the number of stations, so solving the equilibrium equations directly is hopeless for any network worth modelling. The product form is what rescues the subject: for a large and identifiable class of networks the equilibrium distribution factorizes into one term per station, as if the stations were independent, and a network of JJJ stations costs JJJ one-dimensional calculations instead of one exponentially large one.

Chapter 2 of Frank Kelly and Elena Yudovina's Stochastic Networks (Cambridge University Press, 2014) establishes this for migration processes, the Markov model in which individuals move between colonies one at a time at a rate that factorizes as λjkφj(nj)\lambda_{jk}\varphi_j(n_j)λjk​φj​(nj​): a part depending only on the two colonies and a part depending only on the occupancy of the source. The class covers single-server and sss-server queues, infinite-server queues, and networks of them, open or closed.

Setting

There are JJJ colonies, and a state is a vector n=(n1,…,nJ)n = (n_1,\dots,n_J)n=(n1​,…,nJ​) of non-negative integers, njn_jnj​ being the number of individuals in colony jjj. Three operators move one individual:

Tjkn  moves one from j to k,Tj→n  removes one from j,T→kn  adds one to k.T^{jk}n \ \text{ moves one from } j \text{ to } k, \qquad T^{j\to}n \ \text{ removes one from } j, \qquad T^{\to k}n \ \text{ adds one to } k .Tjkn  moves one from j to k,Tj→n  removes one from j,T→kn  adds one to k.

An open migration process is the Markov process on Z+J\mathbb{Z}_+^JZ+J​ with transition rates

q(n,Tjkn)=λjkφj(nj),q(n,Tj→n)=μjφj(nj),q(n,T→kn)=νk,q(n, T^{jk}n)=\lambda_{jk}\varphi_j(n_j), \qquad q(n, T^{j\to}n)=\mu_j\varphi_j(n_j), \qquad q(n, T^{\to k}n)=\nu_k ,q(n,Tjkn)=λjk​φj​(nj​),q(n,Tj→n)=μj​φj​(nj​),q(n,T→kn)=νk​,

where φj(0)=0\varphi_j(0)=0φj​(0)=0: nothing leaves an empty colony. Immigration into colony kkk is Poisson of rate νk\nu_kνk​. Taking μ≡0\mu\equiv 0μ≡0 and ν≡0\nu\equiv 0ν≡0 and restricting to states of a fixed total ∑jnj=N\sum_j n_j = N∑j​nj​=N gives a closed migration process. Setting φj(n)=min⁡(n,s)\varphi_j(n)=\min(n,s)φj​(n)=min(n,s) models an sss-server queue at colony jjj; φj(n)=n\varphi_j(n)=nφj​(n)=n models individuals moving independently.

The traffic equations define (αj)(\alpha_j)(αj​) from the rates. In the open case they are

αj(μj+∑kλjk)  =  νj+∑kαkλkj,j=1,…,J,\alpha_j\Bigl(\mu_j+\sum_k \lambda_{jk}\Bigr) \;=\; \nu_j+\sum_k \alpha_k\lambda_{kj}, \qquad j = 1,\dots,J,αj​(μj​+k∑​λjk​)=νj​+k∑​αk​λkj​,j=1,…,J,

and in the closed case αj∑kλjk=∑kαkλkj\alpha_j\sum_k \lambda_{jk}=\sum_k \alpha_k\lambda_{kj}αj​∑k​λjk​=∑k​αk​λkj​ with αj>0\alpha_j>0αj​>0 and ∑jαj=1\sum_j\alpha_j=1∑j​αj​=1. Finally set

gj=∑n=0∞αj n∏r=1nφj(r).g_j=\sum_{n=0}^{\infty}\frac{\alpha_j^{\,n}}{\prod_{r=1}^{n}\varphi_j(r)} .gj​=n=0∑∞​∏r=1n​φj​(r)αjn​​.

Formalization targets

Goal — Theorem 2.8, the product form of an open migration process

If g1,…,gJ<∞g_1,\dots,g_J<\inftyg1​,…,gJ​<∞ then

π(n)=∏j=1Jπj(nj),πj(m)=gj−1 αj m∏r=1mφj(r)\pi(n)=\prod_{j=1}^{J}\pi_j(n_j), \qquad \pi_j(m)=g_j^{-1}\,\frac{\alpha_j^{\,m}}{\prod_{r=1}^{m}\varphi_j(r)}π(n)=j=1∏J​πj​(nj​),πj​(m)=gj−1​∏r=1m​φj​(r)αjm​​

is an equilibrium distribution: it satisfies the equilibrium equations for the open migration rates, and it sums to one over Z+J\mathbb{Z}_+^JZ+J​. Both halves are asserted, because the first alone is satisfied by every positive multiple of π\piπ and the second is what makes the convergence hypothesis gj<∞g_j<\inftygj​<∞ do work.

Supporting levels

The closed-network product form of Theorem 2.4; the two families of partial balance equations (2.3) and (2.4) that the proof reduces to; Theorem 2.9, that the time reversal of a stationary open migration process is again an open migration process with rates λjk′=αkλkj/αj\lambda'_{jk}=\alpha_k\lambda_{kj}/\alpha_jλjk′​=αk​λkj​/αj​, μj′=νj/αj\mu'_j=\nu_j/\alpha_jμj′​=νj​/αj​ and νk′=αkμk\nu'_k=\alpha_k\mu_kνk′​=αk​μk​; the single M/M/1 queue that the chapter starts from; the cycle identity (2.6) behind Little's law; and the traffic equations of Kendall's family-size process, an open migration process with infinitely many colonies.

Significance

The result itself. Theorem 2.8 says that at a fixed time the occupancies n1,…,nJn_1,\dots,n_Jn1​,…,nJ​ of an open migration network are independent, each distributed as if its colony were fed by a Poisson stream of rate αjλj\alpha_j\lambda_jαj​λj​ — even though the actual arrival stream into a colony is in general not Poisson, and the occupancies are emphatically not independent as processes. That gap between the one-time-marginal and the process is the reason the theorem is useful and the reason it is easy to misapply. Everything downstream in the book rests on it: the loss networks of Chapter 3 are the truncation of a product-form process to a capacity set, and the flow-level models of Chapter 8 ask when a product form survives a bandwidth-sharing policy. Theorem 2.9 supplies the reversibility argument from which Burke's theorem and the Poisson character of the exit streams follow.

Formalizing it. The mathematics is classical — Jackson (1957), Whittle (1968), Kelly (1979) — and none of it is open. What the mission produces is a machine-checked model of a queueing network: the migration operators, the rate matrix, the traffic equations and the product form, in a form later missions in this series import rather than restate. Mathlib has no queueing theory and no theory of continuous-time Markov chains on a countable state space, so this is the first such development. It builds on the DetailedBalance / FullBalance layer published in mission I.

Difficulty

An open migration process is not reversible — the detailed balance equations fail, as Figure 2.5 of the book shows with an arrival stream of geometrically sized bursts — so the method of Chapter 1 does not apply and the equilibrium equations must be met head on. The content of the proof is that they split: a separate balance holds for each colony jjj (rate of individuals leaving colony jjj equals rate arriving into it) and one more across the boundary with the outside world, and each of those is equivalent to a traffic equation. Finding that split is the step, and it is why the partial balance equations are milestones in their own right.

The formal obstacle is different and worth naming. The equilibrium equation at a state nnn sums over the states that can jump into nnn, and the naive transcription ∑j,kπ(Tjkn)q(Tjkn,n)\sum_{j,k}\pi(T^{jk}n)q(T^{jk}n,n)∑j,k​π(Tjkn)q(Tjkn,n) silently assumes TjknT^{jk}nTjkn is a state, which fails when nj=0n_j=0nj​=0. Over Z+J\mathbb{Z}_+^JZ+J​ such a term must be dropped, and a formalization that keeps it — with nj−1n_j-1nj​−1 read as truncated subtraction — states something false.

Formalization scope

The state space is Fin J → ℕ, a function from a finite index type of colonies to occupancy counts, with J finite; no irreducibility is assumed, since none of the statements below need it. Rates are real-valued and the whole rate matrix is a single function of two states, assembled as a sum of indicator terms over the possible transitions, so the equilibrium equations can be stated as the FullBalance predicate of mission I, with unconditional sums over the countable state space. This is what avoids the trap above: a sum over actual states never includes a would-be-negative one, and any spurious coincidence of operators at a boundary carries a φj(0)=0\varphi_j(0)=0φj​(0)=0 factor and contributes nothing.

Conventions the development commits to: λjj=0\lambda_{jj}=0λjj​=0, so a transfer is always between distinct colonies; φj(0)=0\varphi_j(0)=0φj​(0)=0 and φj(r)>0\varphi_j(r)>0φj​(r)>0 for r≥1r\ge 1r≥1; αj>0\alpha_j>0αj​>0; and gjg_jgj​ is asserted via HasSum, which states convergence and the value at once, rather than as an extended real that might be infinite. Occupancy vectors use truncated natural subtraction, so the partial balance and reversed-rate statements carry an explicit nj≥1n_j\ge 1nj​≥1 where the book's state space carries it implicitly; the goal itself does not need such a guard.

A trivializing formalization is ruled out by the second conjunct of the goal: the equilibrium equations alone are a homogeneous linear condition satisfied by π≡0\pi\equiv 0π≡0, whereas the requirement that π\piπ sum to 111 forces the constants gjg_jgj​ to be exactly the ones stated.

Contributions welcome beyond the listed items: Burke's theorem (2.1) and the Poisson character of the exit streams, Corollary 2.10, the closed-form of the telephone banking example (Exercise 2.6), the Chinese restaurant process of Exercise 2.13, and Bartlett's theorem (2.17) on linear migration processes over a general space.

Selected references

  • Frank Kelly and Elena Yudovina, Stochastic Networks, Cambridge University Press, 2014, Chapter 2 (pp. 22–48); Theorems 2.4, 2.8, 2.9, 2.13, equations (2.1)–(2.6). DOI 10.1017/cbo9781139565363
  • James R. Jackson, Networks of waiting lines, Operations Research 5 (1957), 518–521. DOI 10.1287/opre.5.4.518
  • P. Whittle, Equilibrium distributions for an open migration process, Journal of Applied Probability 5 (1968), 567–571. DOI 10.2307/3211921
  • Frank Kelly, Reversibility and Stochastic Networks, Cambridge University Press, 2011 (reissue of the 1979 edition), Chapters 2 and 3.
  • David G. Kendall, Some problems in mathematical genealogy, in Perspectives in Probability and Statistics (J. Gani, ed.), Academic Press, 1975, 325–345.
  • John D. C. Little, A proof for the queuing formula: L=λWL = \lambda WL=λW, Operations Research 9 (1961), 383–387. DOI 10.1287/opre.9.3.383
10 thms2 active usersReviewed
🏆Completed
Markov ChainOperations Research·Captain: naimengye

Stochastic Networks I: Erlang's Formula for a Single LinkTextbook

Motivation

In the early twentieth century Agner Krarup Erlang worked for the Copenhagen Telephone Company and faced a sizing question that every shared-resource operator still faces: how many parallel circuits must a telephone link carry so that an arriving call is almost never turned away? The answer he published — the Erlang loss formula — is still the standard dimensioning tool for circuit-switched links, call centres, hospital beds, rental fleets, and any system in which a customer who finds every server occupied leaves rather than waits.

The formula is the first capstone of Frank Kelly and Elena Yudovina's Stochastic Networks (Cambridge University Press, 2014), where it closes Chapter 1 and supplies the building block for the loss networks of Chapter 3. It is also the cleanest possible demonstration of the book's method: write down the transition rates of a Markov process, guess that the process is reversible, solve the detailed balance equations, and read the answer off the normalizing constant. This mission formalizes that chapter: the reversibility apparatus, the birth-and-death chain of the loss link, and Erlang's formula itself.

Setting

A link carries CCC parallel circuits. Calls arrive as a Poisson process of rate λ\lambdaλ and each call, while it lasts, occupies one circuit for an exponentially distributed holding time of parameter μ\muμ; holding times are independent of one another and of the arrival times. A call that arrives to find all CCC circuits busy is lost — it does not queue.

Let X(t)∈{0,1,…,C}X(t)\in\{0,1,\dots,C\}X(t)∈{0,1,…,C} be the number of busy circuits. Then XXX is a Markov process 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),

and q(j,k)=0q(j,k)=0q(j,k)=0 otherwise. A collection of numbers π=(π(j))\pi=(\pi(j))π=(π(j)) is in detailed balance with rates qqq when

π(j) q(j,k)=π(k) q(k,j)for all j,k,\pi(j)\,q(j,k)=\pi(k)\,q(k,j)\qquad\text{for all }j,k,π(j)q(j,k)=π(k)q(k,j)for all j,k,

and satisfies the equilibrium (full balance) equations when

π(j)∑kq(j,k)=∑kπ(k) q(k,j)for all j.\pi(j)\sum_k q(j,k)=\sum_k \pi(k)\,q(k,j)\qquad\text{for all }j .π(j)k∑​q(j,k)=k∑​π(k)q(k,j)for all j.

Detailed balance is the statement that, in equilibrium, transitions from jjj to kkk occur as frequently as transitions from kkk to jjj. Writing ν=λ/μ\nu=\lambda/\muν=λ/μ for the traffic intensity, Erlang's formula is

E(ν,C)=νC/C!∑j=0Cνj/j!.E(\nu,C)=\frac{\nu^{C}/C!}{\sum_{j=0}^{C}\nu^{j}/j!}.E(ν,C)=∑j=0C​νj/j!νC/C!​.

Formalization targets

Goal — Erlang's formula

π in detailed balance with q, ∑j=0Cπ(j)=1⟹π(C)=E ⁣(λμ,C).\pi \text{ in detailed balance with } q, \ \sum_{j=0}^{C}\pi(j)=1 \quad\Longrightarrow\quad \pi(C)=E\!\left(\tfrac{\lambda}{\mu},C\right).π in detailed balance with q, j=0∑C​π(j)=1⟹π(C)=E(μλ​,C).

The goal fixes no numerical constant: it says that whatever probability vector solves the detailed balance equations of the loss link assigns exactly E(ν,C)E(\nu,C)E(ν,C) to the blocking state. The hypothesis is detailed balance rather than full balance, which is what the book's derivation actually uses and is the stronger assumption to discharge.

Supporting levels

π(j)=νjj! π(0),∑j=0Cj π(j)=ν(1−E(ν,C)),ddνE(ν,C)=−(1−E(ν,C))(E(ν,C)−E(ν,C−1)),\pi(j)=\frac{\nu^{j}}{j!}\,\pi(0), \qquad \sum_{j=0}^{C} j\,\pi(j)=\nu\bigl(1-E(\nu,C)\bigr), \qquad \frac{d}{d\nu}E(\nu,C)=-\bigl(1-E(\nu,C)\bigr)\bigl(E(\nu,C)-E(\nu,C-1)\bigr),π(j)=j!νj​π(0),j=0∑C​jπ(j)=ν(1−E(ν,C)),dνd​E(ν,C)=−(1−E(ν,C))(E(ν,C)−E(ν,C−1)),

together with the reversibility results that justify the method: detailed balance implies full balance, the reversed process of Proposition 1.1 has rates q′(j,k)=π(k)q(k,j)/π(j)q'(j,k)=\pi(k)q(k,j)/\pi(j)q′(j,k)=π(k)q(k,j)/π(j) and retains π\piπ as an equilibrium distribution, and q′=qq'=qq′=q holds exactly when π\piπ and qqq are in detailed balance.

Significance

The result itself. E(ν,C)E(\nu,C)E(ν,C) is the blocking probability of the link, so it converts a traffic measurement ν\nuν and a target grade of service into a circuit count. It is insensitive: the same formula holds for any holding-time distribution with mean 1/μ1/\mu1/μ, which is why it survives as an engineering tool far outside the exponential model that produces it here. Chapter 3 of the book builds loss networks on top of it, and the Erlang fixed point that approximates a whole network is a system of coupled copies of this one formula. The derivative identity is the ingredient that makes E(ν,C)E(\nu,C)E(ν,C) tractable in optimization: it shows EEE is increasing in ν\nuν, and the recursion it encodes is how the formula is evaluated numerically without overflow.

Formalizing it. Nothing here is open mathematics; the value of the mission is a machine-checked statement of the loss model and a reusable reversibility layer. Mathlib has no theory of detailed balance or of reversible Markov processes over a countable state space, so this mission contributes the first: the predicates DetailedBalance and FullBalance, the reversed rate matrix, and the three structural facts relating them. Those are shared by every later mission in this series — the migration processes of Chapter 2 and the loss networks of Chapter 3 are all proved reversible or quasi-reversible by exactly these means.

Difficulty

The obvious route to π(C)\pi(C)π(C) is to solve the equilibrium equations directly, and for a birth-and-death chain that is a three-term recursion whose general solution needs two boundary conditions. Detailed balance replaces it with a two-term recursion and one boundary condition, and the whole content of the reversibility section is that the substitution is legitimate. The remaining work is bookkeeping that Lean makes less forgiving than the page does: the detailed balance equations must be indexed so that the j=0j=0j=0 and j=Cj=Cj=C boundaries are not silently assumed away, the normalizing sum must be shown positive before it can be inverted, and the induction that produces νj/j!\nu^{j}/j!νj/j! has to carry the Fin (C+1) index through Nat.factorial. For the derivative identity, the naive differentiation of a quotient gives (∑j≤C−1νj/j!)\left(\sum_{j\le C-1}\nu^{j}/j!\right)(∑j≤C−1​νj/j!) in the numerator, and recognizing it as (1−E(ν,C))\bigl(1-E(\nu,C)\bigr)(1−E(ν,C)) times the denominator is the step that produces the stated form.

Formalization scope

The state space is Fin (C + 1), so the link with CCC circuits has C+1C+1C+1 states and finiteness is built in; π\piπ is a plain function Fin (C + 1) → ℝ constrained by hypotheses rather than a PMF, so that the normalization ∑jπ(j)=1\sum_j \pi(j) = 1∑j​π(j)=1 appears explicitly wherever it is used. FullBalance is written with unconditional sums (tsum) over an arbitrary state space, so the same predicate serves the countable chains of later chapters; over a Fintype it is the finite sum. Rates are real-valued and q j j = 0 by construction, matching the book's convention that a Markov process must change state when it jumps.

The rates carry λ,μ>0\lambda,\mu>0λ,μ>0 as hypotheses. This rules out the degenerate reading in which μ=0\mu = 0μ=0 makes every downward rate vanish: with μ=0\mu=0μ=0 the detailed balance equations force π(j)λ=0\pi(j)\lambda = 0π(j)λ=0 for j<Cj<Cj<C, so the only normalized solution is the point mass at CCC, and π(C)=1\pi(C)=1π(C)=1 while Lean evaluates E(λ/0,C)=E(0,C)=0E(\lambda/0,C)=E(0,C)=0E(λ/0,C)=E(0,C)=0 for C≥1C\ge1C≥1; the goal would be false. Erlang's formula is stated for the last state Fin.last C, not for an unconstrained index, so it cannot be satisfied by a degenerate reindexing.

Contributions welcome beyond the listed items: the insensitivity of E(ν,C)E(\nu,C)E(ν,C) to the holding time distribution, the recursion E(ν,C)=νE(ν,C−1)/(C+νE(ν,C−1))E(\nu,C)=\nu E(\nu,C-1)/(C+\nu E(\nu,C-1))E(ν,C)=νE(ν,C−1)/(C+νE(ν,C−1)), the finite-source variant πM(j)∝(Mj)(η/μ)j\pi_M(j)\propto\binom{M}{j}(\eta/\mu)^{j}πM​(j)∝(jM​)(η/μ)j and the PASTA statement that an arriving call in that model sees πM−1\pi_{M-1}πM−1​, and the parking-space identity ∑C≥0E(ν,C)\sum_{C\ge 0}E(\nu,C)∑C≥0​E(ν,C) of Exercise 1.9.

Selected references

  • Frank Kelly and Elena Yudovina, Stochastic Networks, Cambridge University Press, 2014, Chapter 1 (pp. 13–21), equations (1.2), (1.4), (1.5), Proposition 1.1, Exercises 1.7 and 1.8. DOI 10.1017/cbo9781139565363
  • A. K. Erlang, Solution of some problems in the theory of probabilities of significance in automatic telephone exchanges, Elektrotkeknikeren 13 (1917), 5–13.
  • Frank Kelly, Reversibility and Stochastic Networks, Cambridge University Press, 2011 (reissue of the 1979 edition), Chapter 1.
  • J. R. Norris, Markov Chains, Cambridge University Press, 1998. DOI 10.1017/CBO9780511810633
9 thms2 active usersReviewed
🏆Completed
Markov ChainOperations Research·Captain: tianyipeng

Markov Entanglement: Index Policies for Restless Bandits are Asymptotically SeparableResearch Paper

Restless multi-armed bandits are the standard model for allocating a scarce resource across many independently-evolving agents: N arms, each a small Markov chain, and a budget that lets you activate only a fixed fraction of them at each step. The joint problem is PSPACE-hard, so practice runs on index policies — score each arm by a priority index computed from its own local state, then activate the top ones until the budget runs out — and evaluates them by value decomposition: approximate the joint Q-function by a sum of per-arm local Q-functions, each computed from a single arm's chain. The decomposition is used everywhere from Whittle-index heuristics to modern multi-agent RL, and it is used without an error bound.

Chen and Peng (arXiv:2506.02385) supply one. Their companion mission established the general principle: the value decomposition error of a multi-agent chain is controlled by its measure of Markov entanglement, the distance from the chain's transition matrix to the nearest separable one. This mission carries that principle to the restless-bandit setting and proves that index policies are asymptotically separable — their entanglement decays like 1/sqrt(N), so the decomposition error is sublinear in N while the joint Q-function itself is of order N. The relative error vanishes as the system grows, which is exactly why the practice works.

The argument runs through the mean-field limit. Because the arms are homogeneous, the only thing that matters about a joint state is its configuration: the fraction of arms in each local state. Under an index policy the configuration evolves by a map that does not depend on N at all, and under two standard technical conditions — a uniform global attractor property and non-degeneracy — that map has a unique attracting fixed point m*. The chain of reasoning is: policy entanglement is bounded by how far the realised policy sits from the mean-field limiting policy (Proposition 1); that distance is bounded by the configuration's deviation from m* (Lemma 2/8); and the deviation concentrates at rate 1/sqrt(N) by a concentration-plus-local-stability argument adapted from Gast, Gaujal and Yan. The concentration and stability inputs (Lemmas 9, 10, 11) are results of Gast et al. and are formalized here as well, so the mission stands on its own.

The mission also formalizes the mean-field map on the whole simplex and checks it against the N-agent characterisation, which is what makes the piecewise-affine and stability analysis expressible at all.

12 thms2 active usersReviewed
🏆Completed
Statistics·Captain: Shuze Chen

Vector Space Methods III: Recursive EstimationTextbook

Motivation

The final sections of Chapter 4 of Luenberger's Optimization by Vector Space Methods (Wiley, 1969) derive the discrete-time Kalman filter (§4.7 Theorem 1, attributed to Kalman 1960) purely from Hilbert space geometry: the optimal estimate of a linearly evolving random state is an orthogonal projection onto the span of past measurements, and the projection updates recursively as measurements arrive. This derivation — no Gaussian assumptions, no density calculations — is a canonical application of the projection theorem formalized in Mission I and the estimation theory of Mission II.

Setting

Following §4.2 and §4.7 of the source, all random variables have zero mean and finite second moments, and are treated as elements of a Hilbert space of random variables: an abstract real inner product space HHH in which the inner product of two random variables is their correlation, ⟨a,b⟩=E[ab]\langle a, b\rangle = E[ab]⟨a,b⟩=E[ab]. Random nnn-vectors are families Fin n→H\mathrm{Fin}\ n \to HFin n→H; two random variables are uncorrelated iff they are orthogonal in HHH; the covariance matrix of a zero-mean random vector xxx is the Gram matrix ⟨xi,xj⟩\langle x_i, x_j\rangle⟨xi​,xj​⟩. A white process uuu satisfies E[u(k)u(l)⊤]=Q(k) δklE[u(k)u(l)^\top] = Q(k)\,\delta_{kl}E[u(k)u(l)⊤]=Q(k)δkl​.

The dynamic model (§4.7) consists of a state process and measurements

x(k+1)=Φ(k) x(k)+u(k),v(k)=M(k) x(k)+w(k),k=0,1,2,…x(k+1) = \Phi(k)\,x(k) + u(k), \qquad v(k) = M(k)\,x(k) + w(k), \qquad k = 0, 1, 2, \dotsx(k+1)=Φ(k)x(k)+u(k),v(k)=M(k)x(k)+w(k),k=0,1,2,…

with known matrices Φ(k)∈Rn×n\Phi(k) \in \mathbb{R}^{n\times n}Φ(k)∈Rn×n, M(k)∈Rm×nM(k) \in \mathbb{R}^{m\times n}M(k)∈Rm×n, white noises u,wu, wu,w with covariances Q(k)Q(k)Q(k), R(k)R(k)R(k) (R(k)R(k)R(k) positive definite), mutually uncorrelated and uncorrelated with the initial state x(0)x(0)x(0). The estimate x^(k+1∣k)\hat x(k+1 \mid k)x^(k+1∣k) is the projection of each component of x(k+1)x(k+1)x(k+1) onto the subspace spanned by the components of v(0),…,v(k)v(0), \dots, v(k)v(0),…,v(k).

Formalization targets

The goal is §4.7 Theorem 1: the estimates generated by the recursion

x^(k+1∣k)=Φ(k)P(k)M⊤(k)[M(k)P(k)M⊤(k)+R(k)]−1(v(k)−M(k)x^(k∣k−1))+Φ(k) x^(k∣k−1)\hat x(k+1 \mid k) = \Phi(k) P(k) M^\top(k)\big[M(k)P(k)M^\top(k) + R(k)\big]^{-1}\big(v(k) - M(k)\hat x(k \mid k-1)\big) + \Phi(k)\, \hat x(k \mid k-1)x^(k+1∣k)=Φ(k)P(k)M⊤(k)[M(k)P(k)M⊤(k)+R(k)]−1(v(k)−M(k)x^(k∣k−1))+Φ(k)x^(k∣k−1) P(k+1)=Φ(k)P(k){I−M⊤(k)[M(k)P(k)M⊤(k)+R(k)]−1M(k)P(k)}Φ⊤(k)+Q(k),P(k+1) = \Phi(k) P(k)\big\{I - M^\top(k)[M(k)P(k)M^\top(k) + R(k)]^{-1} M(k) P(k)\big\}\Phi^\top(k) + Q(k),P(k+1)=Φ(k)P(k){I−M⊤(k)[M(k)P(k)M⊤(k)+R(k)]−1M(k)P(k)}Φ⊤(k)+Q(k),

started from x^(0∣−1)=0\hat x(0 \mid -1) = 0x^(0∣−1)=0 and P(0)=cov⁡x(0)P(0) = \operatorname{cov} x(0)P(0)=covx(0), are the linear minimum-variance estimates: each x^(k∣k−1)\hat x(k \mid k-1)x^(k∣k−1) lies in the span of past measurement components, its error is orthogonal to all past measurements, and its error covariance is P(k)P(k)P(k).

Milestones: orthogonality of the innovation v(k)−M(k)x^(k∣k−1)v(k) - M(k)\hat x(k\mid k-1)v(k)−M(k)x^(k∣k−1) to the past-data subspace, and the single-step updating formula (§4.6 Example 1) — given a prior projection with error covariance RRR and new data y=Wβ+εy = W\beta + \varepsilony=Wβ+ε, the updated projection is β^+RW⊤(WRW⊤+Q)−1(y−Wβ^)\hat\beta + RW^\top(WRW^\top + Q)^{-1}(y - W\hat\beta)β^​+RW⊤(WRW⊤+Q)−1(y−Wβ^​) with error covariance R−RW⊤(WRW⊤+Q)−1WRR - RW^\top(WRW^\top+Q)^{-1}WRR−RW⊤(WRW⊤+Q)−1WR.

Significance

The Kalman filter is among the most used algorithms in engineering — navigation, tracking, control, time-series analysis — and this mission gives it a machine-checked correctness statement at the natural level of generality: linear minimum-variance optimality over arbitrary zero-mean second-order processes, with no Gaussian hypothesis. Mathlib currently has no Kalman filter and no linear filtering theory. The abstract Hilbert-space formulation also makes the development directly reusable: the update milestone is a general two-stage projection lemma independent of the dynamic model.

Difficulty

The recursion couples two invariants that must be established simultaneously by induction: the geometric one (the error is orthogonal to the growing measurement subspace, and the estimate lies in it) and the algebraic one (the error Gram matrix equals P(k)P(k)P(k)). Whiteness enters precisely through the index inequalities — u(k)u(k)u(k) and w(k)w(k)w(k) are orthogonal to everything generated by x(0),u(0..k−1),w(0..k−1)x(0), u(0..k{-}1), w(0..k{-}1)x(0),u(0..k−1),w(0..k−1) — and an off-by-one in these ranges silently breaks the induction. Invertibility of M(k)P(k)M⊤(k)+R(k)M(k)P(k)M^\top(k) + R(k)M(k)P(k)M⊤(k)+R(k) must be derived, not assumed: P(k)P(k)P(k) is positive semidefinite as a Gram matrix and R(k)R(k)R(k) is positive definite. The naive approach of expanding all projections over a concrete probability space adds measure-theoretic overhead the abstract formulation avoids entirely.

Formalization scope

The Hilbert space of random variables is an abstract H : Type with [NormedAddCommGroup H] [InnerProductSpace ℝ H]; zero means are implicit in this representation (§4.7 assumes all variables zero-mean), so expectations never appear — only inner products. Matrix-vector actions on random vectors are written componentwise as ∑ j, A i j • x j. Processes are indexed by ℕ, with x̂(0 | -1) rendered as xh 0 = 0 and covariances as explicit Gram identities. Whiteness and uncorrelatedness are hypotheses on inner products with if k = l then _ else 0. The span of past data at time kkk is Submodule.span ℝ {a | ∃ l < k, ∃ j, a = v l j}. The recursion defining xh and P is supplied as hypotheses, so the goal asserts exactly the optimality and covariance claims of the source theorem. Statements deliberately avoid Mathlib's orthogonalProjection; the projection property is asserted by membership plus orthogonality, which characterizes it uniquely.

Selected references

  • David G. Luenberger, Optimization by Vector Space Methods, John Wiley & Sons, 1969. §4.6–4.7, pp. 90–97. ISBN 0-471-55359-X.
  • R. E. Kalman, A new approach to linear filtering and prediction problems, J. Basic Eng. 82 (1960), 35–45. https://doi.org/10.1115/1.3662552
4 thms2 active usersReviewed
🏆Completed
Markov ChainProbability·Captain: Shuze Chen

Markov Chains and Mixing Times XIII: Coupling from the PastTextbook

Motivation

Every sampling guarantee in this series so far is approximate: run the chain for tmix(ε)t_{\mathrm{mix}}(\varepsilon)tmix​(ε) steps and the output is within ε\varepsilonε of stationarity. In 1996 Propp and Wilson showed that, astonishingly, one can often sample exactly from the stationary distribution of a chain — with no error at all and no knowledge of the mixing time — by running the chain not forward from the present but from the past. Their algorithm, coupling from the past (CFTP), drives all states simultaneously with the same sequence of random update maps drawn from times −1,−2,−3,…-1,-2,-3,\dots−1,−2,−3,…; as soon as the composed map from some time −t-t−t collapses the entire state space to a single value, that value is an exact sample from π\piπ. Chapter 22 of Levin–Peres–Wilmer, Markov Chains and Mixing Times (AMS, 2009; the chapter is by Propp and Wilson themselves) presents the algorithm, the monotone shortcut that makes it practical for huge state spaces, and the proof of exactness. This mission — the final one of the series — formalizes that correctness proof.

Setting

Throughout, PPP is a chain on a finite state space VVV with stationary distribution π\piπ. A random mapping representation of PPP is a probability distribution ν\nuν on update functions f:V→Vf:V\to Vf:V→V that reproduces the transition probabilities in one step:

ν{f:f(x)=y}  =  P(x,y)for all x,y.\nu\{f: f(x)=y\}\;=\;P(x,y)\qquad\text{for all }x,y.ν{f:f(x)=y}=P(x,y)for all x,y.

Sampling f∼νf\sim\nuf∼ν and applying it to the current state is exactly one PPP-step — simultaneously from every possible current state.

CFTP draws i.i.d. maps f−1,f−2,⋯∼νf_{-1},f_{-2},\dots\sim\nuf−1​,f−2​,⋯∼ν indexed by past times and composes them forward from the past up to time zero:

F−t0  =  f−1∘f−2∘⋯∘f−t.F^0_{-t}\;=\;f_{-1}\circ f_{-2}\circ\cdots\circ f_{-t}.F−t0​=f−1​∘f−2​∘⋯∘f−t​.

Note the order: extending the horizon deeper into the past prepends new randomness inside the composition, while the maps near time 000 stay fixed — this is the crucial asymmetry between running from the past and running into the future. The composition has coalesced when F−t0F^0_{-t}F−t0​ is a constant map — all starting states have been funneled to one common value — and the algorithm outputs that value. In the monotone variant, VVV carries a partial order with a bottom state 0^\hat00^ and a top state 1^\hat11^ and every update map is monotone; then it suffices to track the two extreme trajectories.

Formalization targets

Goal

Correctness of coupling from the past (Propp–Wilson; §22.2–22.3), the capstone of the series: if ν\nuν is a random mapping representation of PPP, π\piπ is stationary for PPP, and coalescence is almost sure, then for every state yyy the probability that the CFTP composition has coalesced to the value yyy within ttt steps from the past tends, as t→∞t\to\inftyt→∞, to exactly π(y)\pi(y)π(y) — the output of the algorithm is an exact sample from the stationary distribution, with no mixing-time error term.

Milestones

  • Proposition 1.5 / §22.3 — every finite Markov chain has a random mapping representation: a suitable ν\nuν always exists.
  • Coalescence (§22.3) — if some finite composition of update maps collapses the state space with positive probability, then coalescence is almost sure: the probability that F−t0F^0_{-t}F−t0​ is not yet constant tends to 000 as t→∞t\to\inftyt→∞.
  • Monotone CFTP (§22.2) — if the state space has a bottom 0^\hat00^ and a top 1^\hat11^ and every update map is monotone, then the composition is constant as soon as it merely identifies 0^\hat00^ and 1^\hat11^: checking two trajectories certifies coalescence of all of them.

Significance

The results. CFTP is one of the most striking algorithmic ideas probability has produced: a Las Vegas algorithm whose output distribution is exactly π\piπ, side-stepping every mixing-time estimate of the previous twelve missions. The monotone shortcut is what made it explode in practice — for the Ising model of Mission IX the 2n2^n2n trajectories collapse to two, and Propp–Wilson famously drew exact Ising samples on large grids at the critical temperature. CFTP remains the foundation of exact-simulation methods across statistical physics, spatial statistics, and randomized algorithms.

Formalizing it. The correctness argument is short but famously slippery — the standard pitfall (running the coupling into the future yields a biased sample) is precisely a statement about the order of composition, which a formal proof pins down mercilessly. Nothing about exact sampling exists in any proof-assistant library. Formalized CFTP correctness is a fitting keystone: it consumes the random-map representation (Chapter 1), stationarity (Mission I), and the almost-sure-coalescence analysis, and certifies the algorithm practitioners actually run.

Difficulty

The whole content lies in managing the composition order and the limiting argument without measure theory. The probability space at horizon ttt is the finite product of ttt copies of ν\nuν (tuples of update maps, weighted by products); the key observation — for fixed ttt, the law of F−t0F^0_{-t}F−t0​ applied to any fixed start equals the law of ttt forward steps — is a finite re-indexing argument. Exactness then follows from a sandwich: on the event of coalescence by time ttt, the output equals F−t0(x)F^0_{-t}(x)F−t0​(x) for every xxx; choosing the start according to π\piπ shows the output law differs from π\piπ by at most the non-coalescence probability, and the hypothesis drives that to zero. Formalizing this needs care at exactly the point where informal proofs wave: the event "coalesced by −t-t−t" is increasing in ttt because the maps near zero are shared between horizons — the tuple encoding must make this monotonicity provable. The coalescence milestone is a geometric-trials argument (independent blocks each collapse with probability bounded below), and the monotone milestone is an induction showing monotonicity of compositions plus the squeeze between the extreme trajectories. All randomness is finite products of a finite distribution; limits are limits of explicit real sequences.

Formalization scope

Update-map distributions are functions (V→V)→R(V\to V)\to\mathbb R(V→V)→R with the distribution predicate of Mission I; the random-map representation condition is a finite-sum identity. The composition F−t0F^0_{-t}F−t0​ is encoded by a tuple F:Fin t→(V→V)F:\mathrm{Fin}\,t\to(V\to V)F:Fint→(V→V) with F(i)F(i)F(i) the map used at time −(i+1)-(i{+}1)−(i+1), folded so that the last entry applies first — the from-the-past order. Coalescence probabilities and output probabilities are finite sums over tuples of products of ν\nuν-weights; "coalescence is almost sure" is the statement that the non-coalescence probability tends to 000, and the goal's conclusion is a limit of real sequences (Filter.Tendsto), not a measure-theoretic almost-sure statement. The monotone milestone is stated abstractly for any finite partial order with OrderBot and OrderTop and any tuple of monotone maps — reusable beyond CFTP. No measure theory, filtrations, or i.i.d. infrastructure is required anywhere.

Selected references

  • D. A. Levin, Y. Peres, E. L. Wilmer, Markov Chains and Mixing Times, American Mathematical Society, 2009 (Chapter 22, by J. G. Propp and D. B. Wilson). https://documents.epfl.ch/groups/i/ip/ipg/www/2013-2014/Random_Walks/markovmixing.pdf
  • J. G. Propp, D. B. Wilson, Exact sampling with coupled Markov chains and applications to statistical mechanics, Random Structures Algorithms 9 (1996). https://doi.org/10.1002/(SICI)1098-2418(199608/09)9:1/2<223::AID-RSA14>3.0.CO;2-O
  • D. B. Wilson, How to couple from the past using a read-once source of randomness, Random Structures Algorithms 16 (2000). https://doi.org/10.1002/(SICI)1098-2418(200003)16:2<85::AID-RSA1>3.0.CO;2-H
5 thms2 active usersReviewed
🏆Completed
Markov ChainProbability·Captain: Shuze Chen

Markov Chains and Mixing Times II: The Convergence TheoremTextbook

Motivation

The first mission of this series established that an irreducible finite Markov chain has a unique stationary distribution π\piπ. The present mission, covering Chapters 3–4 of Levin–Peres–Wilmer, Markov Chains and Mixing Times (AMS, 2009), answers the two questions that make that fact useful. First, the inverse problem of sampling: given a target distribution π\piπ — uniform over proper colorings, a Gibbs measure, a posterior — how does one build a chain whose stationary distribution is π\piπ? The Metropolis and Glauber constructions of Chapter 3 are the universal answers, and they are the engine of Markov chain Monte Carlo across statistical physics, Bayesian statistics, and approximate counting. Second, the convergence question: in what sense, and how fast, does an irreducible aperiodic chain approach π\piπ? Chapter 4 introduces the total variation distance, proves the Convergence Theorem — geometric convergence to stationarity — and defines the mixing time, the parameter the entire remainder of the book estimates.

Setting

All chains live on a finite state space VVV and are presented by row-stochastic matrices, with the definitions of Mission I. The total variation distance between distributions μ\muμ and ν\nuν is

∥μ−ν∥TV=max⁡A⊆V ∣μ(A)−ν(A)∣,\|\mu-\nu\|_{\mathrm{TV}} = \max_{A\subseteq V}\,|\mu(A)-\nu(A)|,∥μ−ν∥TV​=A⊆Vmax​∣μ(A)−ν(A)∣,

the maximal discrepancy over events. A coupling of μ\muμ and ν\nuν is a distribution on V×VV\times VV×V whose marginals are μ\muμ and ν\nuν. For a chain PPP with stationary π\piπ one sets

d(t)=max⁡x∥Pt(x,⋅)−π∥TV,dˉ(t)=max⁡x,y∥Pt(x,⋅)−Pt(y,⋅)∥TV,d(t)=\max_x \|P^t(x,\cdot)-\pi\|_{\mathrm{TV}},\qquad \bar d(t)=\max_{x,y}\|P^t(x,\cdot)-P^t(y,\cdot)\|_{\mathrm{TV}},d(t)=xmax​∥Pt(x,⋅)−π∥TV​,dˉ(t)=x,ymax​∥Pt(x,⋅)−Pt(y,⋅)∥TV​,

and the mixing time is tmix(ε)=min⁡{t:d(t)≤ε}t_{\mathrm{mix}}(\varepsilon)=\min\{t : d(t)\le\varepsilon\}tmix​(ε)=min{t:d(t)≤ε}, with tmix=tmix(1/4)t_{\mathrm{mix}}=t_{\mathrm{mix}}(1/4)tmix​=tmix​(1/4).

The Metropolis chain for a target π\piπ and a symmetric proposal chain Ψ\PsiΨ accepts a proposed move x→yx\to yx→y with probability 1∧π(y)/π(x)1\wedge \pi(y)/\pi(x)1∧π(y)/π(x); a general (not necessarily symmetric) base chain is handled by the ratio (π(y)Ψ(y,x))/(π(x)Ψ(x,y))∧1\bigl(\pi(y)\Psi(y,x)\bigr)/\bigl(\pi(x)\Psi(x,y)\bigr)\wedge 1(π(y)Ψ(y,x))/(π(x)Ψ(x,y))∧1. The Glauber dynamics for a distribution π\piπ on configurations VsitesV^{\text{sites}}Vsites picks a uniform site and re-samples its value from π\piπ conditioned on the rest.

Formalization targets

Goal

P irreducible and aperiodic  ⟹  ∃ α∈(0,1), C>0:d(t)≤Cαt.\text{$P$ irreducible and aperiodic}\;\Longrightarrow\;\exists\,\alpha\in(0,1),\ C>0:\quad d(t)\le C\alpha^{t}.P irreducible and aperiodic⟹∃α∈(0,1), C>0:d(t)≤Cαt.

This is Theorem 4.9, the Convergence Theorem. It asserts only the geometric shape of convergence, leaving all quantitative rates to later missions, which is why it is the goal.

Milestones

The milestones are the chapter's working parts: stationarity and reversibility of the Metropolis chain for symmetric and general base chains (§3.2, Exercise 3.1), stationarity and reversibility of the Glauber dynamics (§3.3, Exercise 3.2); the three characterizations of total variation distance — the half-ℓ1\ell^1ℓ1 formula (Proposition 4.2 with Remark 4.3), the supremum over [−1,1][-1,1][−1,1]-bounded test functions (Proposition 4.5), and the coupling characterization with an optimal coupling attaining it (Proposition 4.7 with Remark 4.8); the comparison d≤dˉ≤2dd\le\bar d\le 2dd≤dˉ≤2d (Lemma 4.11) and submultiplicativity dˉ(s+t)≤dˉ(s)dˉ(t)\bar d(s+t)\le\bar d(s)\bar d(t)dˉ(s+t)≤dˉ(s)dˉ(t) (Lemma 4.12); the standard mixing-time consequences d(ℓ tmix(ε))≤(2ε)ℓd(\ell\, t_{\mathrm{mix}}(\varepsilon))\le(2\varepsilon)^\elld(ℓtmix​(ε))≤(2ε)ℓ and tmix(ε)≤⌈log⁡2ε−1⌉ tmixt_{\mathrm{mix}}(\varepsilon)\le\lceil\log_2\varepsilon^{-1}\rceil\, t_{\mathrm{mix}}tmix​(ε)≤⌈log2​ε−1⌉tmix​ (§4.5); and the equality of distance to stationarity for a group walk and its inverse walk (Lemma 4.13 and Corollary 4.14).

Significance

The results. The Convergence Theorem is the qualitative foundation on which quantitative mixing theory stands: it guarantees that tmix(ε)t_{\mathrm{mix}}(\varepsilon)tmix​(ε) is finite, so every bound in Missions III–XIII is a bound on a well-defined quantity. The TV characterizations are used constantly — the coupling characterization is the engine of Mission III, the half-ℓ1\ell^1ℓ1 formula of every explicit computation. The Metropolis and Glauber stationarity results justify the chains analyzed in Missions III (colorings, hardcore), VIII (path coupling) and IX (Ising). Submultiplicativity of dˉ\bar ddˉ is what makes tmixt_{\mathrm{mix}}tmix​ a meaningful single number.

Formalizing them. None of this exists in Mathlib: there is no total variation distance for finitely supported distributions, no coupling theory, no mixing time, no MCMC correctness statement. The definition layer published here (TV distance, ddd, dˉ\bar ddˉ, tmixt_{\mathrm{mix}}tmix​, couplings, Metropolis, Glauber) is imported by every subsequent mission of the series.

Difficulty

The tempting proof of Theorem 4.9 via spectral decomposition fails twice: it needs reversibility, which the theorem does not assume, and spectral machinery that arrives only in Mission VII. The book's proof is the Doeblin decomposition: by Proposition 1.7 some power satisfies Pr(x,y)≥δπ(y)P^r(x,y)\ge\delta\pi(y)Pr(x,y)≥δπ(y), so Pr=(1−θ)Π+θQP^r=(1-\theta)\Pi+\theta QPr=(1−θ)Π+θQ with Π\PiΠ the rank-one matrix of rows π\piπ, and induction gives Prk=(1−θk)Π+θkQkP^{rk}=(1-\theta^k)\Pi+\theta^kQ^kPrk=(1−θk)Π+θkQk. The formal work is matrix algebra with careful bookkeeping of the remainder chain QQQ, plus the monotonicity of ddd needed to interpolate between multiples of rrr. For Proposition 4.7 the delicate half is constructing the optimal coupling: mass μ∧ν\mu\wedge\nuμ∧ν on the diagonal and the normalized product of the positive parts off it, with the degenerate case μ=ν\mu=\nuμ=ν handled separately. The Glauber stationarity statement must be phrased with care because configurations outside the support of π\piπ have junk rows; the formalization asserts stochasticity only at supported configurations, and detailed balance globally.

Formalization scope

Total variation distance is defined as the supremum over events, ⨆A ∣μ(A)−ν(A)∣\bigsqcup_{A}\,|\mu(A)-\nu(A)|⨆A​∣μ(A)−ν(A)∣ over Finset V, exactly as in (4.1); the half-ℓ1\ell^1ℓ1 formula is a milestone, not the definition. The mixing time is sInf of the set {t:d(t)≤ε}\{t : d(t)\le\varepsilon\}{t:d(t)≤ε} in N\mathbb NN (junk value 000 if empty — impossible under the goal theorem). Couplings are distributions on the product with prescribed marginals; no probability-space machinery is used. The mixing-time inequalities are stated with the integer-rounding slack made explicit (e.g. ⌈log⁡2ε−1⌉\lceil\log_2\varepsilon^{-1}\rceil⌈log2​ε−1⌉ via Nat.ceil of a real logarithm) so that no statement is true only "up to rounding". The Metropolis definitions use total real division, so the hypotheses require π>0\pi>0π>0 pointwise; this matches the book, which divides by π(x)\pi(x)π(x) throughout.

Welcome contributions beyond the milestones: simp lemmas for tvDist, monotonicity of ddd and dˉ\bar ddˉ in ttt, and triangle-inequality infrastructure — all reused by Missions III–XIII.

Selected references

  • D. A. Levin, Y. Peres, E. L. Wilmer, Markov Chains and Mixing Times, American Mathematical Society, 2009. https://documents.epfl.ch/groups/i/ip/ipg/www/2013-2014/Random_Walks/markovmixing.pdf
  • N. Metropolis, A. Rosenbluth, M. Rosenbluth, A. Teller, E. Teller, Equation of state calculations by fast computing machines, J. Chem. Phys. 21 (1953). https://doi.org/10.1063/1.1699114
  • W. Doeblin, Exposé de la théorie des chaînes simples constantes de Markov à un nombre fini d'états, Rev. Math. Union Interbalkan. 2 (1938).
14 thms2 active usersReviewed
🏆Completed
Operations Research·Captain: wenxinzhang

Single-Server Queueing Convergence via Forward CouplingTextbook

Formalize sample-path stability for a continuous-time, unit-rate, infinite-buffer single-server queue. Starting from cumulative arriving service work, define the reflected transient workload, the workload constructed from the infinite past, long-run offered load, and two-time stationarity. Prove that subcritical load forces finite-time coupling and consequently that every finite initial workload converges in its two-time finite-dimensional distributions to the stationary workload law.

5 thms2 active usersReviewed
🏆Completed
Active InferenceBehaviorDynamical Systems+4·Captain: ActiveInference

Free Energy Principle I: the variational free-energy boundResearch Paper

Motivation

The free energy principle (FEP) proposes that a self-organizing system — a brain, an organism, an agent — persists by minimizing one quantity: the variational free energy of its sensory states under an internal generative model. Introduced by Karl Friston as a principle of brain function [Friston 2006] and stated in its unified form [Friston 2010], the principle makes a precise mathematical claim at its core: whatever internal state estimate the system holds, the free energy of incoming data is never below the data's surprisal (negative log marginal likelihood), and the excess is exactly the Kullback–Leibler divergence between the system's recognition density and the Bayesian posterior implied by the model. Active inference extends the same functional from perception to action and planning [Friston et al. 2017], and the same bound is known in machine learning as the evidence lower bound (ELBO) of variational inference [Parr et al. 2022].

Timeline of the mathematical content this mission formalizes:

  • 2006 — Friston, A free energy principle for the brain (J. Physiol. Paris 100): the bound stated for perception as variational inference on a generative model.
  • 2010 — Friston, The free-energy principle: a unified brain theory? (Nat. Rev. Neurosci. 11, 127–138): free energy as an upper bound on surprisal, presented as the core of a unified account.
  • 2017 — Friston, FitzGerald, Rigoli, Schwartenbeck, Pezzulo, Active inference: a process theory (Neural Comput. 29(1), 1–49): the same functional drives policy selection through expected free energy.
  • 2022 — Parr, Pezzulo, Friston, Active Inference (MIT Press): textbook treatment; the posterior-form identity F=DKL(Q ∥ P(s∣o))−log⁡P(o)F = D_{\mathrm{KL}}(Q\,\|\,P(s|o)) - \log P(o)F=DKL​(Q∥P(s∣o))−logP(o) as the central equation.
  • 2026 — fep_formal (Active Inference Institute): a machine-checked Lean 4 catalogue of 155 Free Energy Principle topics, compiled with zero proof holes against a pinned Mathlib. This mission transcribes the catalogue's core-free-energy chain — topic fep-002 and the foundation module active_inference — onto the platform, turning the first link of the FEP development into solvable community infrastructure.

Setting

Everything is finite, and laws are normalized real mass functions.

A finite law on a finite type α\alphaα is a function p:α→Rp : \alpha \to \mathbb{R}p:α→R with p(x)≥0p(x) \ge 0p(x)≥0 for every xxx and ∑xp(x)=1\sum_x p(x) = 1∑x​p(x)=1. A finite kernel from α\alphaα to β\betaβ assigns to each x∈αx \in \alphax∈α a normalized row over β\betaβ. The mission's definitions Def_fep_finite_laws and Def_fep_finite_information package these carriers with entropy, cross-entropy, and the KL divergence

DKL(p ∥ q)  =  ∑xq(x)⋅klFun ⁣(p(x)q(x)),klFun(x)=xlog⁡x+1−x,D_{\mathrm{KL}}(p\,\|\,q) \;=\; \sum_{x} q(x)\cdot \mathrm{klFun}\!\left(\frac{p(x)}{q(x)}\right), \qquad \mathrm{klFun}(x) = x\log x + 1 - x,DKL​(p∥q)=x∑​q(x)⋅klFun(q(x)p(x)​),klFun(x)=xlogx+1−x,

a totalized real-valued divergence that is finite even at zero-mass atoms (the convention 0⋅log⁡0=00 \cdot \log 0 = 00⋅log0=0 via Real.negMulLog) and nonnegative on normalized laws.

A finite generative model for active inference (definition Def_fep_generative_model) over finite types Policy,State,Outcome\mathsf{Policy}, \mathsf{State}, \mathsf{Outcome}Policy,State,Outcome consists of: an initial state law P(s)P(s)P(s); a policy-conditioned transition kernel; a state-to-outcome likelihood kernel; a preference law over outcomes; and a policy prior. Under a policy π\piπ the model predicts the state law P(s∣π)P(s \mid \pi)P(s∣π) and the outcome law P(o∣π)P(o \mid \pi)P(o∣π). A recognition density is any finite law QQQ over states — the system's internal estimate. At an outcome ooo with positive predicted mass, the Bayesian posterior P(⋅∣o,π)P(\cdot \mid o, \pi)P(⋅∣o,π) is the exact finite Bayes rule. The outcome surprisal is −log⁡P(o∣π)-\log P(o \mid \pi)−logP(o∣π), and the posterior-form variational free energy of a recognition density QQQ is

F[Q,o,π]  =  DKL(Q ∥ P(⋅∣o,π))  −  log⁡P(o∣π).F[Q, o, \pi] \;=\; D_{\mathrm{KL}}\big(Q \,\|\, P(\cdot \mid o, \pi)\big) \;-\; \log P(o \mid \pi).F[Q,o,π]=DKL​(Q∥P(⋅∣o,π))−logP(o∣π).

Formalization targets

Goal: the variational free-energy bound

For every generative model, every policy π\piπ, every outcome ooo with P(o∣π)>0P(o\mid\pi) > 0P(o∣π)>0, and every recognition density QQQ:

−log⁡P(o∣π)  ≤  F[Q,o,π].-\log P(o \mid \pi) \;\le\; F[Q, o, \pi].−logP(o∣π)≤F[Q,o,π].

The recognition density QQQ is universally quantified — the bound holds for whatever state estimate the system happens to carry.

Exactness, uniqueness, and the ELBO form

Three companions pin down the equality case, ordered weakest to strongest alongside the milestone list:

  • Exactness — the Bayesian posterior attains the bound:
F[P(⋅∣o,π), o, π]=−log⁡P(o∣π).F\big[P(\cdot \mid o, \pi),\, o,\, \pi\big] = -\log P(o \mid \pi).F[P(⋅∣o,π),o,π]=−logP(o∣π).
  • Uniqueness — equality characterizes the posterior, with no full-support assumption:
F[Q,o,π]=−log⁡P(o∣π)  ⟺  Q=P(⋅∣o,π).F[Q, o, \pi] = -\log P(o \mid \pi) \iff Q = P(\cdot \mid o, \pi).F[Q,o,π]=−logP(o∣π)⟺Q=P(⋅∣o,π).
  • ELBO form — negating both sides:
−F[Q,o,π]  ≤  log⁡P(o∣π).-F[Q, o, \pi] \;\le\; \log P(o \mid \pi).−F[Q,o,π]≤logP(o∣π).

Measure-theoretic core

Independently of the finite model, in Mathlib's nonnegative extended reals R≥0∪{∞}\mathbb{R}_{\ge0} \cup \{\infty\}R≥0​∪{∞}, with qqq, ppp measures on any measurable space and s∈R≥0∪{∞}s \in \mathbb{R}_{\ge0} \cup \{\infty\}s∈R≥0​∪{∞}:

s  ≤  s+DKL(q ∥ p),s \;\le\; s + D_{\mathrm{KL}}(q \,\|\, p),s≤s+DKL​(q∥p),

the unconditional shape of the bound (topic fep-002 of the source catalogue), with the divergence taken as ∞\infty∞ when the log-likelihood ratio is not integrable.

Significance

The result itself. This inequality is the load-bearing step of the FEP: it converts "minimize free energy" into "move recognition toward the posterior," and it is the exact statement whose continuous, dynamic, and policy-selecting extensions (expected free energy, Markov blankets, non-equilibrium thermodynamics) form the rest of the FEP literature. Without it, the principle's variational step has no mathematical content.

Formalizing it. The mathematics here is classical — Gibbs' inequality — and the source development already proves every row with no proof holes. What the mission adds is faithful, reusable infrastructure: the definitions are published as platform nodes in the shared namespace FreeEnergyPrinciple, so later missions in this programme (expected free energy and policy selection, Markov blankets, Gaussian and continuous-time variants, already proved in the source repository) can import them instead of re-deriving the substrate. Status honesty: all eight items below are formalized and machine-checked locally against the platform environment; each is an open problem on the platform only in the sense that no proof has yet been submitted to it.

Difficulty

The bound itself is a one-line consequence of KL nonnegativity — the naive idea "prove it by simp on the KL sum" is essentially right, and the source proofs are correspondingly short. The actual difficulty is boundary precision, where plausible renderings go silently wrong:

  • The positivity premise P(o∣π)>0P(o \mid \pi) > 0P(o∣π)>0 is not decoration: the Bayesian posterior is defined only where the evidence has positive mass, and hiding that in a totalized division would change the statement.
  • The uniqueness characterization is not a formality: at zero-mass reference atoms the logarithmic cross-entropy identity degenerates, and the proof needs the normalization lemma DKL(p ∥ q)=0↔p=qD_{\mathrm{KL}}(p\,\|\,q) = 0 \leftrightarrow p = qDKL​(p∥q)=0↔p=q, which forces the recognition law's mass to zero wherever the posterior's is zero. A solver who proves the bound but states equality with a full-support hypothesis has proved something different from the source.
  • The measure-theoretic core is deliberately unconditional; adding finiteness side conditions to it would weaken the source's point that R≥0∪{∞}\mathbb{R}_{\ge0} \cup \{\infty\}R≥0​∪{∞} absorbs the degenerate cases.

A vacuous formalization — quantifying over a single distinguished recognition law, or taking "posterior" as an arbitrary variable — would trivialize the goal; the targets below rule this out by fixing the exact finite Bayes rule and universally quantifying QQQ.

Formalization scope

Committed conventions of this mission's Lean development:

  • All model carriers are finite types (Fintype); laws are R\mathbb{R}R-valued normalized mass functions; kernels are normalized rows. No measure-theoretic machinery below the finite substrate except for the measure-theoretic core milestone.
  • KL is the totalized real-valued finite divergence DKL(p ∥ q)=∑xq(x)⋅klFun(p(x)/q(x))D_{\mathrm{KL}}(p\,\|\,q) = \sum_x q(x)\cdot \mathrm{klFun}(p(x)/q(x))DKL​(p∥q)=∑x​q(x)⋅klFun(p(x)/q(x)); entropy uses Real.negMulLog, so 0⋅log⁡0=00 \cdot \log 0 = 00⋅log0=0 exactly, not by exception-handling.
  • The posterior is the exact finite Bayes rule FiniteKernel.posterior, taken at the explicit hypothesis 0<P(o∣π)0 < P(o \mid \pi)0<P(o∣π).
  • One mission-wide namespace FreeEnergyPrinciple; definitions live in the published definition files Def_fep_finite_laws, Def_fep_finite_information, Def_fep_generative_model, and every theorem item imports them. A Free Energy Principle II mission (expected free energy) is expected to reuse the same namespace and definitions.
  • The measure-theoretic core uses Mathlib's InformationTheory.klDiv in ℝ≥0∞ with no finiteness hypotheses.
  • Contributions welcome: alternative measure-theoretic renderings of the core bound, the Gaussian instantiation of the same identity, and ports of the source repository's subsequent rows (Bayesian model reduction, expected free energy) onto these definitions.

Selected references

  • K. Friston, A free energy principle for the brain, Journal of Physiology (Paris) 100 (2006) 70–87. https://doi.org/10.1016/j.jphysparis.2006.10.001
  • K. Friston, The free-energy principle: a unified brain theory?, Nature Reviews Neuroscience 11 (2010) 127–138. https://doi.org/10.1038/nrn2787
  • K. Friston, T. FitzGerald, F. Rigoli, P. Schwartenbeck, G. Pezzulo, Active inference: a process theory, Neural Computation 29 (2017) 1–49. https://doi.org/10.1162/neco_a_00912
  • T. Parr, G. Pezzulo, K. J. Friston, Active Inference: The Free Energy Principle in Mind, Brain, and Behavior, MIT Press (2022). https://mitpress.mit.edu/9780262045354/active-inference/
  • D. A. Friedman, fep_formal: Towards Lean 4 Formalization of the Free Energy Principle (v1.2.0), Active Inference Institute (2026), the formal source of truth for this mission. https://github.com/ActiveInferenceInstitute/fep_formal
  • D. A. Friedman, Towards Lean 4 Formalization of the Free Energy Principle: AI-Driven Theorem Sketching and Verification for Active Inference and Bayesian Mechanics, Active Inference Journal (2026). https://doi.org/10.5281/zenodo.19699233
8 thms1 active userReviewed
PreviousPage 3 of 3Next

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 paper
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me