Documentation

Linglib.Core.Probability.Kernel.Invariance

Invariant measures of kernels #

This file adds to mathlib's Kernel.Invariant the facts about invariant measures that a Markov chain on a finite state space needs. An invariant measure is carried along a map that intertwines two kernels, and it is invariant for every power of its kernel. One step of a Markov kernel leaves the mass of a set unchanged exactly when the flow out of the set balances the flow into it.

On a finite state space with measurable singletons, every Markov kernel has an invariant probability measure. When the kernel is irreducible with respect to the counting measure, every state reaching every state, it has exactly one, and that measure charges every state; conversely a Markov kernel whose invariant probability measures all charge every state is irreducible.

Main statements #

Implementation notes #

The existence proof is linear algebra rather than compactness: the transition matrix P fixes the constant vector, so P - 1 is singular and has a nonzero left null vector, whose absolute value is a nonnegative fixed vector. Uniqueness is the minimum-ratio argument: subtracting from one invariant law the largest multiple of another that stays nonnegative leaves an invariant measure that vanishes at a point, hence everywhere. Neither needs the Perron–Frobenius theorem. [UPSTREAM] candidate for Mathlib/Probability/Kernel/Invariance.lean.

theorem ProbabilityTheory.Kernel.Invariant.map {α : Type u_1} {β : Type u_2} {mα : MeasurableSpace α} {mβ : MeasurableSpace β} {κ : Kernel α α} {μ : MeasureTheory.Measure α} {η : Kernel β β} {f : α → β} (hf : Measurable f) (h : ∀ (a : α), η (f a) = MeasureTheory.Measure.map f (κ a)) (hμ : κ.Invariant μ) :
η.Invariant (MeasureTheory.Measure.map f μ)

An invariant measure of κ maps along f to an invariant measure of η when η moves the image of a point as κ moves the point.

theorem ProbabilityTheory.Kernel.Invariant.pow {α : Type u_1} {mα : MeasurableSpace α} {κ : Kernel α α} {μ : MeasureTheory.Measure α} (hμ : κ.Invariant μ) (n : ℕ) :
(κ ^ n).Invariant μ
theorem ProbabilityTheory.Kernel.comp_apply_eq_iff_setLIntegral_compl {α : Type u_1} {mα : MeasurableSpace α} {κ : Kernel α α} {μ : MeasureTheory.Measure α} [IsMarkovKernel κ] [MeasureTheory.IsFiniteMeasure μ] {s : Set α} (hs : MeasurableSet s) :
(μ.bind ⇑κ) s = μ s ↔ ∫⁻ (a : α) in s, (κ a) sᶜ ∂μ = ∫⁻ (a : α) in sᶜ, (κ a) s ∂μ

One step of a Markov kernel leaves the mass of a set unchanged exactly when the flow out of the set balances the flow into it.

theorem ProbabilityTheory.Kernel.Invariant.setLIntegral_compl {α : Type u_1} {mα : MeasurableSpace α} {κ : Kernel α α} {μ : MeasureTheory.Measure α} [IsMarkovKernel κ] [MeasureTheory.IsFiniteMeasure μ] (hμ : κ.Invariant μ) {s : Set α} (hs : MeasurableSet s) :
∫⁻ (a : α) in s, (κ a) sᶜ ∂μ = ∫⁻ (a : α) in sᶜ, (κ a) s ∂μ

The flow of an invariant measure out of a set balances the flow into it.

theorem ProbabilityTheory.Kernel.pow_succ_apply_singleton_ne_zero {α : Type u_1} {mα : MeasurableSpace α} {κ : Kernel α α} [MeasurableSingletonClass α] {n : ℕ} {a b c : α} (hab : ((κ ^ n) a) {b} ≠ 0) (hbc : (κ b) {c} ≠ 0) :
((κ ^ (n + 1)) a) {c} ≠ 0

A path to b in n steps followed by a step from b to c reaches c in n + 1 steps.

theorem ProbabilityTheory.Kernel.isIrreducible_count_iff {α : Type u_1} {mα : MeasurableSpace α} {κ : Kernel α α} [MeasurableSingletonClass α] :
IsIrreducible MeasureTheory.Measure.count κ ↔ ∀ (a b : α), ∃ (n : ℕ), ((κ ^ n) a) {b} ≠ 0

On a space with measurable singletons, κ is irreducible with respect to the counting measure when every point is reached from every point.

theorem ProbabilityTheory.Kernel.Invariant.measure_singleton_ne_zero {α : Type u_1} {mα : MeasurableSpace α} {κ : Kernel α α} {μ : MeasureTheory.Measure α} [MeasurableSingletonClass α] [Countable α] [IsIrreducible MeasureTheory.Measure.count κ] (hμ : κ.Invariant μ) (hμ0 : μ ≠ 0) (a : α) :
μ {a} ≠ 0

A nonzero invariant measure of an irreducible kernel charges every point.

theorem ProbabilityTheory.Kernel.invariant_iff_forall_real_singleton {α : Type u_1} {mα : MeasurableSpace α} {κ : Kernel α α} {μ : MeasureTheory.Measure α} [Fintype α] [MeasurableSingletonClass α] [IsMarkovKernel κ] [MeasureTheory.IsFiniteMeasure μ] :
κ.Invariant μ ↔ ∀ (b : α), ∑ a : α, μ.real {a} * (κ a).real {b} = μ.real {b}

On a finite type, invariance is the system of equations ∑ a, μ {a} κ a {b} = μ {b}.

theorem ProbabilityTheory.Kernel.exists_isProbabilityMeasure_invariant {α : Type u_1} {mα : MeasurableSpace α} [Fintype α] [MeasurableSingletonClass α] [Nonempty α] (κ : Kernel α α) [IsMarkovKernel κ] :
∃ (μ : MeasureTheory.Measure α), MeasureTheory.IsProbabilityMeasure μ ∧ κ.Invariant μ

A Markov kernel on a finite type has an invariant probability measure.

theorem ProbabilityTheory.Kernel.Invariant.eq_of_isIrreducible {α : Type u_1} {mα : MeasurableSpace α} {κ : Kernel α α} {μ ν : MeasureTheory.Measure α} [Fintype α] [MeasurableSingletonClass α] [IsMarkovKernel κ] [IsIrreducible MeasureTheory.Measure.count κ] [MeasureTheory.IsProbabilityMeasure μ] [MeasureTheory.IsProbabilityMeasure ν] (hμ : κ.Invariant μ) (hν : κ.Invariant ν) :
μ = ν

An irreducible Markov kernel on a finite type has at most one invariant probability measure.

theorem ProbabilityTheory.Kernel.isIrreducible_count_of_measure_singleton_ne_zero {α : Type u_1} {mα : MeasurableSpace α} {κ : Kernel α α} [Fintype α] [MeasurableSingletonClass α] [IsMarkovKernel κ] (h : ∀ (μ : MeasureTheory.Measure α), MeasureTheory.IsProbabilityMeasure μ → κ.Invariant μ → ∀ (a : α), μ {a} ≠ 0) :
IsIrreducible MeasureTheory.Measure.count κ

A Markov kernel on a finite type is irreducible when each of its invariant probability measures charges every point.