The n-th matrix power of a stochastic transition matrix P. Entry (i,j) represents
the probability of moving from state i to state j in exactly n steps.
Instances For
A stochastic matrix P is irreducible if for every pair of states i, j there is some
positive number of steps n such that P^n i j > 0; i.e., every state is reachable from every
other state in finitely many steps.
Instances For
A distribution π is stationary for the transition matrix P if π P = π, i.e.,
∑ᵢ π(i) P(i, j) = π(j) for every state j.
Instances For
The detailed balance (reversibility) equations between P and π:
π(i) P(i,j) = π(j) P(j,i) for all states i, j.
Instances For
A transition matrix P is reversible if there exists a distribution π that is
both stationary and satisfies the detailed balance equations with P.
Instances For
If π satisfies detailed balance with P, then π is stationary for P. Detailed
balance is a strictly stronger condition than stationarity.
The product of transition probabilities along a path: for a list of states
[x₀, x₁, …, x_k], returns ∏ᵢ P(xᵢ, xᵢ₊₁). Empty and singleton lists give 1.
Instances For
Kolmogorov's cycle condition on a stochastic matrix P:
(1) symm_support: P(x, y) > 0 implies P(y, x) > 0; and
(2) cycle_prod: for any loop x₀, x₁, …, xₙ = x₀ whose reverse path has positive
probability, the product of forward transition probabilities along the loop equals the
product of backward transition probabilities. This is the necessary and sufficient
condition for the existence of a reversible measure for an irreducible chain.
Instances For
Every entry of every power of a stochastic matrix is nonnegative.
For an irreducible chain P, any distribution π satisfying detailed balance
must assign strictly positive mass to every state.
Helper lemma: along a loop c : Fin (n + 1) → Fin (M + 1) with c 0 = c (Fin.last n),
the product ∏ i, f (c (i.castSucc)) equals the shifted product ∏ i, f (c (i.succ)).
This is a telescoping/cyclic rearrangement of products.
NNReal-valued version of pathProduct: the product of forward transition probabilities
along the path, packaged as a nonnegative real.
Instances For
The product of ratios P(xᵢ, xᵢ₊₁) / P(xᵢ₊₁, xᵢ) along a path. This is the quantity
that defines the "cycle weight" used to construct a reversible measure from Kolmogorov's
cycle condition.
Instances For
If the forward listPathProduct along a path is positive and the transition probabilities
have symmetric support, then the corresponding listRatioProduct is also positive.
If P.matPow n i j > 0, then there is an actual path from i to j (a list of states
starting at i and ending at j) along which the product of transition probabilities is
positive.
For an irreducible chain, between any two states i, j there exists a finite path
from i to j along which the product of transition probabilities is strictly positive.
Variant of IsIrreducible.exists_path: under symmetric support, there also exists a path
from i to j along which the listRatioProduct is positive.
Unfolding of listRatioProduct on a list of the form c 0 :: List.ofFn (c ∘ Fin.succ).
listRatioProduct along List.ofFn c is the finite product of ratios
P(c iₖ, c iₖ₊₁) / P(c iₖ₊₁, c iₖ) indexed by i : Fin n.
Under Kolmogorov's cycle condition, the ratio product along any closed loop (a path whose
first and last elements coincide and whose reverse edges all have positive probability) is
equal to 1.
The cycle weight of state j relative to a reference state i₀: defined as the
listRatioProduct along some (classically chosen) positive-probability path from i₀ to j.
For chains satisfying Kolmogorov's cycle condition this value is path-independent
(cycleWeight_path_independent) and yields the unique-up-to-scaling reversible measure.
Instances For
listRatioProduct is multiplicative when concatenating two paths that share an endpoint:
joining l1 with l2.tail (so the join point isn't duplicated) gives the product of the
ratio products of l1 and l2.
If the path product along a list l is positive, then every consecutive transition
probability P(l[i], l[i+1]) along l is positive.
If two paths l1, l2 each have positive path product and share an endpoint, then their
join l1 ++ l2.tail also has positive path product.
Path independence of cycle weight. Under Kolmogorov's cycle condition, any two
positive-probability paths from i₀ to j yield the same listRatioProduct. This is the
key step that makes cycleWeight well-defined and ultimately produces a reversible measure.
Recursion for listRatioProduct when appending a single state j at the end of a
nonempty path: the new ratio product equals the old one times the ratio for the new edge.
Extending the path by one positive-probability transition i → j multiplies the cycle
weight by P(i,j) / P(j,i). Equivalently, cycleWeight i₀ j = cycleWeight i₀ i · P(i,j)/P(j,i)
whenever P(i,j) > 0.
The cycle weights satisfy the detailed balance equations with P:
cycleWeight(i) · P(i,j) = cycleWeight(j) · P(j,i) for all states i, j.
Kolmogorov's cycle theorem. For an irreducible finite Markov chain with transition
matrix P, there exists a reversible measure (i.e., P.IsReversible) if and only if P
satisfies the Kolmogorov cycle condition:
(1) P(x,y) > 0 implies P(y,x) > 0; and
(2) for any loop x₀, x₁, …, xₙ with ∏ P(xᵢ, xᵢ₋₁) > 0, we have
∏ (P(xᵢ₋₁, xᵢ) / P(xᵢ, xᵢ₋₁)) = 1.