Proposition 1.22 -- the time reversal of a chain
OpenMarkovMixing.time_reversalFor an irreducible chain with stationary distribution , the time reversal is a stochastic matrix, is stationary for , and started from the reversed chain traverses every trajectory with the same probability as the original chain traverses the reversed trajectory:
import Definitions.Def_mm_path
namespace MarkovMixing
/-- **Proposition 1.22** (LPW): for an irreducible chain with stationary
distribution `π`, the time reversal `P̂` is a stochastic matrix, `π` is
stationary for `P̂`, and started from `π` the chain run through `P̂` traverses
every trajectory with the same probability as the original chain traverses the
reversed trajectory. -/
theorem time_reversal {V : Type*} [Fintype V] [DecidableEq V]
(P : Matrix V V ℝ) (hP : IsStochastic P) (hirr : Irreducible P)
(π : V → ℝ) (hπ : IsStationary P π) :
IsStochastic (timeReversal P π) ∧ IsStationary (timeReversal P π) π ∧
∀ (t : ℕ) (ω : Fin (t + 1) → V),
π (ω 0) * pathWeight P ω =
π (ω (Fin.last t)) * pathWeight (timeReversal P π) (fun i => ω i.rev) := by
sorry
end MarkovMixing
Read-back
What the Lean code literally says, in plain math · claude-fable-5
Let be an arbitrary finite type (possibly empty) with decidable equality, let be a matrix of real numbers, and assume: (i) is stochastic in the sense that every entry satisfies and every row sums to one, ; (ii) is irreducible in the sense that for every pair there exists a natural number (the value is allowed, in which case is the identity matrix, so this condition is automatic when ) with ; and (iii) is a stationary distribution for , meaning for all , , and the row-vector identity holds, i.e. for every . Define the time-reversal matrix entrywise by
where the division is the total real division that returns when the denominator is zero (positivity of is not a hypothesis, so entries with are literally ). The theorem then asserts the conjunction of three claims: (1) is stochastic (all entries nonnegative and every row of sums to one); (2) is a stationary distribution for (again in the sense: is nonnegative, sums to one, and ); and (3) for every natural number and every function from to (an arbitrary sequence of states, with no requirement that consecutive states be reachable),
that is, the probability weight of the path under started from equals the weight of the reversed path under started from — here the path weight of a sequence under a matrix is the product of the matrix entries along its consecutive steps, which is the empty product when , making the case the trivial identity . If is empty, all three claims hold vacuously (though hypothesis (i) and (iii) are then also vacuous or degenerate: the row-sum and total-mass conditions quantify over no elements or sum over an empty set, and with empty would read , making the hypotheses unsatisfiable in that case).
Confirmed by the mission captain (proposal self-audit).