The Mathlib Handbook

The volumes of the handbook are not written yet. This site shows the map of Mathlib that they will follow, at Mathlib 4472534b60.

The areas / V20. Probability

Mathlib.Probability.Kernel.Deterministic

14 declarations. Mathlib docs · Source

Class IsDeterministic of deterministic kernels

This file defines the class IsDeterministic of deterministic kernels, and proves some properties about them.

Main definitions

  • Kernel.IsDeterministic: a kernel is deterministic if copying then applying the kernel to the two copies is the same as first applying the kernel then copying.

Main statements

  • isDeterministic_iff_isZeroOneMeasure: a finite kernel is deterministic if and only if it is a zero-one measure for every input.
  • IsDeterministic.exists_eq_deterministic: in a standard Borel space, a deterministic Markov kernel is a Dirac kernel of some measurable function.
  • comp_parallelComp_comp_copy: if the composition of two Markov kernels η ∘ₖ κ is deterministic, the distribution over both η ∘ₖ κ and κ can be obtained by computing η ∘ₖ κ and κ independently. This corresponds to the equation of a Positive Markov category. See Example 11.25 of [fritz2020].

Implementation notes

comp_parallelComp_comp_copy is true only when considering Markov kernels. To see why, consider the counterexample with $X = Y = {\varnothing}$, kernels $\kappa(\cdot | \varnothing) = 2\delta_ {\varnothing}$ and $\eta(\cdot | \varnothing) = (1/2)\delta_{\varnothing}$: although their composition is deterministic, the equation fails.

References

  • [A synthetic approach to Markov kernels, conditional independence and theorems on sufficient statistics][fritz2020]
  • [Moss and Perrone, A category-theoretic proof of the ergodic decomposition theorem][moss2023]

class ProbabilityTheory.IsDeterministic E1 #

{α : Type u_1} →
  {β : Type u_2} → {mα : MeasurableSpace α} → {mβ : MeasurableSpace β} → ProbabilityTheory.Kernel α β → Prop

A kernel is deterministic if copying then applying the kernel to the two copies is the same as first applying the kernel then copying.

ctor ProbabilityTheory.IsDeterministic.mk E0 #

∀ {α : Type u_1} {β : Type u_2} {mα : MeasurableSpace α} {mβ : MeasurableSpace β} {κ : ProbabilityTheory.Kernel α β},
  (κ.parallelComp κ).comp (ProbabilityTheory.Kernel.copy α) = (ProbabilityTheory.Kernel.copy β).comp κ →
    ProbabilityTheory.IsDeterministic κ

theorem ProbabilityTheory.IsDeterministic.parallelComp_self_comp_copy' E1 #

∀ {α : Type u_1} {β : Type u_2} {mα : MeasurableSpace α} {mβ : MeasurableSpace β} {κ : ProbabilityTheory.Kernel α β}
  [self : ProbabilityTheory.IsDeterministic κ],
  (κ.parallelComp κ).comp (ProbabilityTheory.Kernel.copy α) = (ProbabilityTheory.Kernel.copy β).comp κ

theorem ProbabilityTheory.Kernel.parallelComp_self_comp_copy E1 #

∀ {α : Type u_1} {β : Type u_2} {mα : MeasurableSpace α} {mβ : MeasurableSpace β} {κ : ProbabilityTheory.Kernel α β}
  [ProbabilityTheory.IsDeterministic κ],
  (κ.parallelComp κ).comp (ProbabilityTheory.Kernel.copy α) = (ProbabilityTheory.Kernel.copy β).comp κ

instance ProbabilityTheory.Kernel.instIsDeterministicDeterministic E0 #

∀ {α : Type u_1} {β : Type u_2} {mα : MeasurableSpace α} {mβ : MeasurableSpace β} {f : α → β} (hf : Measurable f),
  ProbabilityTheory.IsDeterministic (ProbabilityTheory.Kernel.deterministic f hf)

instance ProbabilityTheory.Kernel.instIsDeterministicId E0 #

∀ {α : Type u_1} {mα : MeasurableSpace α}, ProbabilityTheory.IsDeterministic ProbabilityTheory.Kernel.id

instance ProbabilityTheory.Kernel.instIsDeterministicProdCopy E0 #

∀ {α : Type u_1} {mα : MeasurableSpace α}, ProbabilityTheory.IsDeterministic (ProbabilityTheory.Kernel.copy α)

instance ProbabilityTheory.Kernel.instIsDeterministicPUnitDiscard E0 #

∀ {α : Type u_1} {mα : MeasurableSpace α}, ProbabilityTheory.IsDeterministic (ProbabilityTheory.Kernel.discard α)

instance ProbabilityTheory.Kernel.instIsDeterministicProdSwap E0 #

∀ {α : Type u_1} {β : Type u_2} {mα : MeasurableSpace α} {mβ : MeasurableSpace β},
  ProbabilityTheory.IsDeterministic (ProbabilityTheory.Kernel.swap α β)

theorem ProbabilityTheory.Kernel.isDeterministic_iff_isZeroOneMeasure E3 #

∀ {α : Type u_1} {β : Type u_2} {mα : MeasurableSpace α} {mβ : MeasurableSpace β} (κ : ProbabilityTheory.Kernel α β)
  [ProbabilityTheory.IsFiniteKernel κ],
  ProbabilityTheory.IsDeterministic κ ↔ ∀ (a : α), MeasureTheory.IsZeroOneMeasure (κ a)

instance ProbabilityTheory.Kernel.instIsZeroOneMeasureCoeMeasureOfIsFiniteKernelOfIsDeterministic E0 #

∀ {α : Type u_1} {β : Type u_2} {mα : MeasurableSpace α} {mβ : MeasurableSpace β} (κ : ProbabilityTheory.Kernel α β)
  [ProbabilityTheory.IsFiniteKernel κ] [ProbabilityTheory.IsDeterministic κ] (a : α),
  MeasureTheory.IsZeroOneMeasure (κ a)

theorem ProbabilityTheory.Kernel.IsDeterministic.exists_eq_deterministic E3 #

∀ {α : Type u_1} {β : Type u_2} {mα : MeasurableSpace α} {mβ : MeasurableSpace β} [StandardBorelSpace β]
  (κ : ProbabilityTheory.Kernel α β) [ProbabilityTheory.IsMarkovKernel κ] [ProbabilityTheory.IsDeterministic κ],
  ∃ f, ∃ (hf : Measurable f), κ = ProbabilityTheory.Kernel.deterministic f hf

in a standard Borel space, a deterministic Markov kernel is a Dirac kernel of one measurable function.

theorem ProbabilityTheory.Kernel.comp_parallelComp_comp_copy E3 #

∀ {α : Type u_1} {β : Type u_2} {mα : MeasurableSpace α} {mβ : MeasurableSpace β} {γ : Type u_3}
  [inst : MeasurableSpace γ] {κ : ProbabilityTheory.Kernel α β} {η : ProbabilityTheory.Kernel β γ}
  [ProbabilityTheory.IsMarkovKernel κ] [ProbabilityTheory.IsMarkovKernel η]
  [ProbabilityTheory.IsDeterministic (η.comp κ)],
  ((η.comp κ).parallelComp κ).comp (ProbabilityTheory.Kernel.copy α) =
    ((η.parallelComp ProbabilityTheory.Kernel.id).comp (ProbabilityTheory.Kernel.copy β)).comp κ

The equation of a Positive Markov category: if the composition of two Markov kernels η ∘ₖ κ is deterministic, the distribution over both η ∘ₖ κ and κ can be obtained by computing η ∘ₖ κ and κ independently.

instance ProbabilityTheory.Kernel.instIsSFiniteKernelOfIsDeterministic E0 #

∀ {α : Type u_1} {β : Type u_2} {mα : MeasurableSpace α} {mβ : MeasurableSpace β} (κ : ProbabilityTheory.Kernel α β)
  [ProbabilityTheory.IsDeterministic κ], ProbabilityTheory.IsSFiniteKernel κ