LeanPool.RlTheoryInLean.Data.Matrix.Stochastic #
@[reducible, inline]
The finite-dimensional L¹ space of real-valued functions on S.
Equations
- StochasticMatrix.l1Space S = WithLp 1 (S → ℝ)
Instances For
theorem
StochasticMatrix.StochasticVec.le_one
{S : Type u}
[Fintype S]
(x : S → ℝ)
[StochasticVec x]
(s : S)
:
@[reducible, inline]
The probability simplex, represented inside finite-dimensional L¹.
Equations
Instances For
instance
StochasticMatrix.instStochasticVecOfLpForallRealValL1SpaceMemSetSimplex
{S : Type u}
[Fintype S]
(x : ↑(Simplex S))
:
StochasticVec (↑x).ofLp
instance
StochasticMatrix.instCompleteSpaceElemL1SpaceSimplex
{S : Type u}
[Fintype S]
:
CompleteSpace ↑(Simplex S)
theorem
StochasticMatrix.l1_norm_eq_one
{S : Type u}
[Fintype S]
(x : l1Space S)
[StochasticVec x.ofLp]
:
theorem
StochasticMatrix.sum_svec_mul_smat_eq_one
{S : Type u}
[Fintype S]
(μ : S → ℝ)
[StochasticVec μ]
(P : Matrix S S ℝ)
[RowStochastic P]
:
instance
StochasticMatrix.svec_mul_smat_is_svec
{S : Type u}
[Fintype S]
(μ : S → ℝ)
[StochasticVec μ]
(P : Matrix S S ℝ)
[RowStochastic P]
:
StochasticVec (Matrix.vecMul μ P)
instance
StochasticMatrix.smat_mul_smat_is_smat
{S : Type u}
[Fintype S]
(P Q : Matrix S S ℝ)
[RowStochastic P]
[RowStochastic Q]
:
RowStochastic (P * Q)
instance
StochasticMatrix.smat_pow_is_smat
{S : Type u}
[Fintype S]
[DecidableEq S]
(P : Matrix S S ℝ)
[RowStochastic P]
(n : ℕ)
:
RowStochastic (P ^ n)
theorem
StochasticMatrix.chapman_kolmogorov_eq_ge
{S : Type u}
[Fintype S]
[DecidableEq S]
(P : Matrix S S ℝ)
[RowStochastic P]
(m n : ℕ)
(i j k : S)
:
class
StochasticMatrix.Irreducible
{S : Type u}
[Fintype S]
[DecidableEq S]
(P : Matrix S S ℝ)
[RowStochastic P]
:
Irreducibility of a finite stochastic matrix.
Instances
theorem
StochasticMatrix.return_times_add_mem
{S : Type u}
[Fintype S]
[DecidableEq S]
(P : Matrix S S ℝ)
[RowStochastic P]
(i : S)
{a b : ℕ}
(ha : a ∈ returnTimes P i)
(hb : b ∈ returnTimes P i)
:
Return times are closed under addition (used via AddSubmonoid.closure)
class
StochasticMatrix.Aperiodic
{S : Type u}
[Fintype S]
[DecidableEq S]
(P : Matrix S S ℝ)
[RowStochastic P]
:
A stochastic matrix is aperiodic if for each state, the GCD of return times is 1
Instances
theorem
StochasticMatrix.eventually_positive
{S : Type u}
[Fintype S]
[DecidableEq S]
[Nonempty S]
(P : Matrix S S ℝ)
[RowStochastic P]
[Irreducible P]
[Aperiodic P]
:
theorem
StochasticMatrix.smat_minorizable_with_large_pow
{S : Type u}
[Fintype S]
[DecidableEq S]
[Nonempty S]
(P : Matrix S S ℝ)
[RowStochastic P]
[Irreducible P]
[Aperiodic P]
:
∃ (N : ℕ), 1 ≤ N ∧ DoeblinMinorization (P ^ N)
theorem
StochasticMatrix.smat_nonexpansive_in_l1
{S : Type u}
[Fintype S]
(Q : Matrix S S ℝ)
[RowStochastic Q]
(x y : S → ℝ)
:
theorem
StochasticMatrix.smat_pow_nonexpansive_in_l1
{S : Type u}
[Fintype S]
[DecidableEq S]
(Q : Matrix S S ℝ)
[RowStochastic Q]
(n : ℕ)
(x y : S → ℝ)
:
The affine action of a stochastic matrix on the probability simplex.
Equations
- StochasticMatrix.smatAsOperator P μ = ⟨WithLp.toLp 1 (Matrix.vecMul (↑μ).ofLp P), ⋯⟩
Instances For
theorem
StochasticMatrix.smat_as_operator_iter
{S : Type u}
[Fintype S]
[DecidableEq S]
(P : Matrix S S ℝ)
[RowStochastic P]
(n : ℕ)
:
(smatAsOperator P)^[n] = fun (μ : ↑(Simplex S)) => ⟨WithLp.toLp 1 (Matrix.vecMul (↑μ).ofLp (P ^ n)), ⋯⟩
theorem
StochasticMatrix.smat_contraction_in_simplex
{S : Type u}
[Fintype S]
(P : Matrix S S ℝ)
[RowStochastic P]
[DoeblinMinorization P]
:
∃ (K : NNReal), 0 < K ∧ ContractingWith K (smatAsOperator P)
A stationary distribution for a matrix.
Instances
theorem
StochasticMatrix.multi_step_stationary
{S : Type u}
[Fintype S]
[DecidableEq S]
(μ : S → ℝ)
[StochasticVec μ]
(P : Matrix S S ℝ)
[RowStochastic P]
(n : ℕ)
[Stationary μ P]
:
Stationary μ (P ^ n)
theorem
StochasticMatrix.pos_of_stationary
{S : Type u}
[Fintype S]
[DecidableEq S]
(μ : S → ℝ)
[StochasticVec μ]
(P : Matrix S S ℝ)
[RowStochastic P]
[Irreducible P]
[Stationary μ P]
(s : S)
:
noncomputable def
StochasticMatrix.cesaroAverage
{S : Type u}
[Fintype S]
[DecidableEq S]
(x₀ : S → ℝ)
(P : Matrix S S ℝ)
(n : ℕ)
:
S → ℝ
The Cesaro average of the first n + 1 iterates of a stochastic vector.
Equations
- StochasticMatrix.cesaroAverage x₀ P n = (↑n + 1)⁻¹ • ∑ k ∈ Finset.range (n + 1), Matrix.vecMul x₀ (P ^ k)
Instances For
theorem
StochasticMatrix.cesaro_average_is_svec
{S : Type u}
[Fintype S]
[DecidableEq S]
(x₀ : S → ℝ)
[StochasticVec x₀]
(P : Matrix S S ℝ)
[RowStochastic P]
(n : ℕ)
:
StochasticVec (cesaroAverage x₀ P n)
theorem
StochasticMatrix.cesaro_average_almost_invariant
{S : Type u}
[Fintype S]
[DecidableEq S]
(x₀ : S → ℝ)
[StochasticVec x₀]
(P : Matrix S S ℝ)
[RowStochastic P]
(n : ℕ)
:
@[reducible, inline]
The uniform probability distribution on a nonempty finite type.
Equations
Instances For
instance
StochasticMatrix.instStochasticVecUniformDistribution
{S : Type u}
[Fintype S]
[Nonempty S]
:
theorem
StochasticMatrix.stationary_distribution_exists
{S : Type u}
[Fintype S]
[Nonempty S]
(P : Matrix S S ℝ)
[RowStochastic P]
:
∃ (μ : S → ℝ), StochasticVec μ ∧ Stationary μ P
theorem
StochasticMatrix.stationary_distribution_uniquely_exists
{S : Type u}
[Fintype S]
[DecidableEq S]
[Nonempty S]
(P : Matrix S S ℝ)
[RowStochastic P]
[Aperiodic P]
[Irreducible P]
:
class
StochasticMatrix.GeometricMixing
{S : Type u}
[Fintype S]
[DecidableEq S]
(P : Matrix S S ℝ)
[RowStochastic P]
:
Geometric convergence to stationarity in total variation/L¹ distance.
- mixing : ∃ (C : ℝ) (ρ : ℝ) (μ : S → ℝ), 0 < C ∧ 0 < ρ ∧ ρ < 1 ∧ StochasticVec μ ∧ Stationary μ P ∧ ∀ (x : S → ℝ) [StochasticVec x] (n : ℕ), ↑‖WithLp.toLp 1 (Matrix.vecMul x (P ^ n) - μ)‖₊ ≤ C * ρ ^ n
Instances
instance
StochasticMatrix.instGeometricMixingOfAperiodicOfIrreducible
{S : Type u}
[Fintype S]
[DecidableEq S]
[Nonempty S]
(P : Matrix S S ℝ)
[RowStochastic P]
[Aperiodic P]
[Irreducible P]
: