Markov chains on discrete state spaces #
A Markov chain P : MarkovChain S is a transition kernel S → PMF S: P x is the law of the
next state from x, and P x y is the transition probability. Chains on a fixed state space form
a monoid under composition of kernels, (P * Q) x = (P x).bind Q, so P ^ t is the t-step
kernel and pow_add gives the Chapman–Kolmogorov equations.
A distribution π is stationary if π.bind P = π (π = πP, [LP17], (1.14)),
and P is reversible with respect to π if it satisfies detailed balance
π x * P x y = π y * P y x ([LP17], (1.29)). Detailed balance implies
stationarity ([LP17], Proposition 1.20).
The kernel representation reuses the library's PMF and statistical-distance APIs directly.
Mathlib's measure-theoretic ProbabilityTheory.Kernel.Invariant and
ProbabilityTheory.Kernel.IsReversible are the measurable-space analogues of IsStationary and
IsReversible; no finiteness of S is assumed here.
Main definitions #
Cslib.Probability.MarkovChain: a transition kernel on a discrete state space.Cslib.Probability.MarkovChain.IsStationary:π.bind P = π.Cslib.Probability.MarkovChain.IsReversible: detailed balance.
Main results #
Cslib.Probability.MarkovChain.pow_add_apply: Chapman–Kolmogorov.Cslib.Probability.MarkovChain.IsStationary.pow: a stationary law is stationary forP ^ t.Cslib.Probability.MarkovChain.IsStationary.mul: a stationary law is stationary forP₁ * P₂.Cslib.Probability.MarkovChain.IsReversible.isStationary: detailed balance implies stationarity.
References #
- [LP17], Chapter 1.
A Markov chain on a discrete state space S, given by its transition kernel.
- step : S → PMF S
The law of the next state from the current state.
Instances For
Composition of kernels: first P, then Q.
π is a stationary distribution of P: π = πP ([LP17], (1.14)).
P is reversible with respect to π, i.e. satisfies the detailed balance equations
([LP17], (1.29)).
A stationary distribution of P is invariant under P ^ t.
A stationary distribution of P is a stationary distribution of P ^ t.
Stationarity is preserved under chain composition (P₁ * P₂).
Detailed balance implies stationarity ([LP17], Proposition 1.20).