Markov Kernels #
THIS FILE IS SYNCHRONIZED WITH MATHLIB4. Any changes to this file require a corresponding PR to mathlib4.
A kernel from a measurable space α
to another measurable space β
is a measurable map
α → measure β
, where the measurable space instance on measure β
is the one defined in
measure_theory.measure.measurable_space
. That is, a kernel κ
verifies that for all measurable
sets s
of β
, a ↦ κ a s
is measurable.
Main definitions #
Classes of kernels:
probability_theory.kernel α β
: kernels fromα
toβ
, defined as theadd_submonoid
of the measurable functions inα → measure β
.probability_theory.is_markov_kernel κ
: a kernel fromα
toβ
is said to be a Markov kernel if for alla : α
,k a
is a probability measure.probability_theory.is_finite_kernel κ
: a kernel fromα
toβ
is said to be finite if there existsC : ℝ≥0∞
such thatC < ∞
and for alla : α
,κ a univ ≤ C
. This implies in particular that all measures in the image ofκ
are finite, but is stronger since it requires an uniform bound. This stronger condition is necessary to ensure that the composition of two finite kernels is finite.probability_theory.is_s_finite_kernel κ
: a kernel is called s-finite if it is a countable sum of finite kernels.
Particular kernels:
probability_theory.kernel.deterministic (f : α → β) (hf : measurable f)
: kernela ↦ measure.dirac (f a)
.probability_theory.kernel.const α (μβ : measure β)
: constant kernela ↦ μβ
.probability_theory.kernel.restrict κ (hs : measurable_set s)
: kernel for which the image ofa : α
is(κ a).restrict s
. Integral:∫⁻ b, f b ∂(kernel.restrict κ hs a) = ∫⁻ b in s, f b ∂(κ a)
Main statements #
probability_theory.kernel.ext_fun
: if∫⁻ b, f b ∂(κ a) = ∫⁻ b, f b ∂(η a)
for all measurable functionsf
and alla
, then the two kernelsκ
andη
are equal.
A kernel from a measurable space α
to another measurable space β
is a measurable function
κ : α → measure β
. The measurable space structure on measure β
is given by
measure_theory.measure.measurable_space
. A map κ : α → measure β
is measurable iff
∀ s : set β, measurable_set s → measurable (λ a, κ a s)
.
Equations
- probability_theory.kernel α β = {carrier := measurable measure_theory.measure.measurable_space, add_mem' := _, zero_mem' := _}
Instances for ↥probability_theory.kernel
Equations
- probability_theory.kernel.has_coe_to_fun = {coe := λ (κ : ↥(probability_theory.kernel α β)), κ.val}
Coercion to a function as an additive monoid homomorphism.
Equations
- is_probability_measure : ∀ (a : α), measure_theory.is_probability_measure (⇑κ a)
A kernel is a Markov kernel if every measure in its image is a probability measure.
Instances of this typeclass
- probability_theory.kernel.is_markov_kernel_deterministic
- probability_theory.kernel.is_markov_kernel_const
- probability_theory.kernel.is_markov_kernel.piecewise
- probability_theory.kernel.is_markov_kernel.comp_prod
- probability_theory.kernel.is_markov_kernel.map
- probability_theory.kernel.is_markov_kernel.comap
- probability_theory.kernel.is_markov_kernel.prod_mk_left
- probability_theory.kernel.is_markov_kernel.swap_left
- probability_theory.kernel.is_markov_kernel.swap_right
- probability_theory.kernel.is_markov_kernel.fst
- probability_theory.kernel.is_markov_kernel.snd
- probability_theory.kernel.is_markov_kernel.comp
- probability_theory.kernel.is_markov_kernel.prod
- probability_theory.cond_kernel_real.is_markov_kernel
- probability_theory.measure_theory.measure.cond_kernel.is_markov_kernel
- probability_theory.cond_distrib.is_markov_kernel
A kernel is finite if every measure in its image is finite, with a uniform bound.
Instances of this typeclass
- probability_theory.is_markov_kernel.is_finite_kernel
- probability_theory.is_finite_kernel_zero
- probability_theory.is_finite_kernel.add
- probability_theory.kernel.is_finite_kernel_seq
- probability_theory.kernel.is_finite_kernel_const
- probability_theory.kernel.is_finite_kernel.restrict
- probability_theory.kernel.is_finite_kernel.comap_right
- probability_theory.kernel.is_finite_kernel.piecewise
- probability_theory.kernel.is_finite_kernel.comp_prod
- probability_theory.kernel.is_finite_kernel.map
- probability_theory.kernel.is_finite_kernel.comap
- probability_theory.kernel.is_finite_kernel.prod_mk_left
- probability_theory.kernel.is_finite_kernel.swap_left
- probability_theory.kernel.is_finite_kernel.swap_right
- probability_theory.kernel.is_finite_kernel.fst
- probability_theory.kernel.is_finite_kernel.snd
- probability_theory.kernel.is_finite_kernel.comp
- probability_theory.kernel.is_finite_kernel.prod
A constant C : ℝ≥0∞
such that C < ∞
(is_finite_kernel.bound_lt_top κ
) and for all
a : α
and s : set β
, κ a s ≤ C
(measure_le_bound κ a s
).
Sum of an indexed family of kernels.
Equations
- probability_theory.kernel.sum κ = ⟨λ (a : α), measure_theory.measure.sum (λ (n : ι), ⇑(κ n) a), _⟩
- tsum_finite : ∃ (κs : ℕ → ↥(probability_theory.kernel α β)), (∀ (n : ℕ), probability_theory.is_finite_kernel (κs n)) ∧ κ = probability_theory.kernel.sum κs
A kernel is s-finite if it can be written as the sum of countably many finite kernels.
Instances of this typeclass
- probability_theory.kernel.is_finite_kernel.is_s_finite_kernel
- probability_theory.kernel.is_s_finite_kernel.add
- probability_theory.kernel.is_s_finite_kernel.restrict
- probability_theory.kernel.is_s_finite_kernel.comap_right
- probability_theory.kernel.is_s_finite_kernel.piecewise
- probability_theory.kernel.is_s_finite_kernel.comp_prod
- probability_theory.kernel.is_s_finite_kernel.map
- probability_theory.kernel.is_s_finite_kernel.comap
- probability_theory.kernel.is_s_finite_kernel.prod_mk_left
- probability_theory.kernel.is_s_finite_kernel.swap_left
- probability_theory.kernel.is_s_finite_kernel.swap_right
- probability_theory.kernel.is_s_finite_kernel.fst
- probability_theory.kernel.is_s_finite_kernel.snd
- probability_theory.kernel.is_s_finite_kernel.comp
- probability_theory.kernel.is_s_finite_kernel.prod
- probability_theory.kernel.with_density.probability_theory.is_s_finite_kernel
A sequence of finite kernels such that κ = kernel.sum (seq κ)
. See is_finite_kernel_seq
and kernel_sum_seq
.
Instances for probability_theory.kernel.seq
Kernel which to a
associates the dirac measure at f a
. This is a Markov kernel.
Equations
- probability_theory.kernel.deterministic f hf = ⟨λ (a : α), measure_theory.measure.dirac (f a), _⟩
Instances for probability_theory.kernel.deterministic
Constant kernel, which always returns the same measure.
Equations
- probability_theory.kernel.const α μβ = ⟨λ (_x : α), μβ, _⟩
Instances for probability_theory.kernel.const
In a countable space with measurable singletons, every function α → measure β
defines a
kernel.
Equations
Kernel given by the restriction of the measures in the image of a kernel to a set.
Equations
- probability_theory.kernel.restrict κ hs = ⟨λ (a : α), (⇑κ a).restrict s, _⟩
Instances for probability_theory.kernel.restrict
Kernel with value (κ a).comap f
, for a measurable embedding f
. That is, for a measurable set
t : set β
, comap_right κ hf a t = κ a (f '' t)
.
Equations
- probability_theory.kernel.comap_right κ hf = ⟨λ (a : α), measure_theory.measure.comap f (⇑κ a), _⟩
Instances for probability_theory.kernel.comap_right
piecewise hs κ η
is the kernel equal to κ
on the measurable set s
and to η
on its
complement.