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.Composition.CompProd

46 declarations. Mathlib docs · Source

Composition-product of kernels

We define the composition-product κ ⊗ₖ η of two s-finite kernels κ : Kernel α β and η : Kernel (α × β) γ, a kernel from α to β × γ.

A note on names: The composition-product Kernel α β → Kernel (α × β) γ → Kernel α (β × γ) is named composition in [kallenberg2021] and product on the wikipedia article on transition kernels. Most papers studying categories of kernels call composition the map we call composition. We adopt that convention because it fits better with the use of the name comp elsewhere in mathlib.

Main definitions

  • compProd (κ : Kernel α β) (η : Kernel (α × β) γ) : Kernel α (β × γ): composition-product of 2 s-finite kernels. We define a notation κ ⊗ₖ η = compProd κ η. ∫⁻ bc, f bc ∂((κ ⊗ₖ η) a) = ∫⁻ b, ∫⁻ c, f (b, c) ∂(η (a, b)) ∂(κ a)

Main statements

  • lintegral_compProd: Lebesgue integral of a function against a composition-product of kernels.
  • Instances stating that IsMarkovKernel, IsZeroOrMarkovKernel, IsFiniteKernel and IsSFiniteKernel are stable by composition-product.

Notation

  • κ ⊗ₖ η = ProbabilityTheory.Kernel.compProd κ η

Composition-Product of kernels

We define a kernel composition-product compProd : Kernel α β → Kernel (α × β) γ → Kernel α (β × γ).

ae filter of the composition-product

Lebesgue integral

def ProbabilityTheory.Kernel.compProd E1 #

{α : Type u_1} →
  {β : Type u_2} →
    {γ : Type u_3} →
      {mα : MeasurableSpace α} →
        {mβ : MeasurableSpace β} →
          {mγ : MeasurableSpace γ} →
            ProbabilityTheory.Kernel α β → ProbabilityTheory.Kernel (α × β) γ → ProbabilityTheory.Kernel α (β × γ)

Composition-Product of kernels. For s-finite kernels, it satisfies ∫⁻ bc, f bc ∂(compProd κ η a) = ∫⁻ b, ∫⁻ c, f (b, c) ∂(η (a, b)) ∂(κ a) (see ProbabilityTheory.Kernel.lintegral_compProd). If either of the kernels is not s-finite, compProd is given the junk value 0.

def ProbabilityTheory.«term_⊗ₖ_» E1 #

Lean.TrailingParserDescr

Composition-Product of kernels. For s-finite kernels, it satisfies ∫⁻ bc, f bc ∂(compProd κ η a) = ∫⁻ b, ∫⁻ c, f (b, c) ∂(η (a, b)) ∂(κ a) (see ProbabilityTheory.Kernel.lintegral_compProd). If either of the kernels is not s-finite, compProd is given the junk value 0.

theorem ProbabilityTheory.Kernel.compProd_of_not_isSFiniteKernel_left E0 #

∀ {α : Type u_1} {β : Type u_2} {γ : Type u_3} {mα : MeasurableSpace α} {mβ : MeasurableSpace β}
  {mγ : MeasurableSpace γ} (κ : ProbabilityTheory.Kernel α β) (η : ProbabilityTheory.Kernel (α × β) γ),
  ¬ProbabilityTheory.IsSFiniteKernel κ → κ.compProd η = 0

theorem ProbabilityTheory.Kernel.compProd_of_not_isSFiniteKernel_right E0 #

∀ {α : Type u_1} {β : Type u_2} {γ : Type u_3} {mα : MeasurableSpace α} {mβ : MeasurableSpace β}
  {mγ : MeasurableSpace γ} (κ : ProbabilityTheory.Kernel α β) (η : ProbabilityTheory.Kernel (α × β) γ),
  ¬ProbabilityTheory.IsSFiniteKernel η → κ.compProd η = 0

theorem ProbabilityTheory.Kernel.compProd_apply E0 #

∀ {α : Type u_1} {β : Type u_2} {γ : Type u_3} {mα : MeasurableSpace α} {mβ : MeasurableSpace β}
  {mγ : MeasurableSpace γ} {s : Set (β × γ)},
  MeasurableSet s →
    ∀ (κ : ProbabilityTheory.Kernel α β) [ProbabilityTheory.IsSFiniteKernel κ] (η : ProbabilityTheory.Kernel (α × β) γ)
      [ProbabilityTheory.IsSFiniteKernel η] (a : α),
      ((κ.compProd η) a) s = ∫⁻ (b : β), (η (a, b)) (Prod.mk b ⁻¹' s) ∂κ a

theorem ProbabilityTheory.Kernel.le_compProd_apply E0 #

∀ {α : Type u_1} {β : Type u_2} {γ : Type u_3} {mα : MeasurableSpace α} {mβ : MeasurableSpace β}
  {mγ : MeasurableSpace γ} (κ : ProbabilityTheory.Kernel α β) [ProbabilityTheory.IsSFiniteKernel κ]
  (η : ProbabilityTheory.Kernel (α × β) γ) [ProbabilityTheory.IsSFiniteKernel η] (a : α) (s : Set (β × γ)),
  ∫⁻ (b : β), (η (a, b)) {c | (b, c) ∈ s} ∂κ a ≤ ((κ.compProd η) a) s

theorem ProbabilityTheory.Kernel.compProd_apply_univ E0 #

∀ {α : Type u_1} {β : Type u_2} {γ : Type u_3} {mα : MeasurableSpace α} {mβ : MeasurableSpace β}
  {mγ : MeasurableSpace γ} {κ : ProbabilityTheory.Kernel α β} {η : ProbabilityTheory.Kernel (α × β) γ}
  [ProbabilityTheory.IsSFiniteKernel κ] [ProbabilityTheory.IsMarkovKernel η] {a : α},
  ((κ.compProd η) a) Set.univ = (κ a) Set.univ

theorem ProbabilityTheory.Kernel.compProd_apply_prod E1 #

∀ {α : Type u_1} {β : Type u_2} {γ : Type u_3} {mα : MeasurableSpace α} {mβ : MeasurableSpace β}
  {mγ : MeasurableSpace γ} {κ : ProbabilityTheory.Kernel α β} {η : ProbabilityTheory.Kernel (α × β) γ}
  [ProbabilityTheory.IsSFiniteKernel κ] [ProbabilityTheory.IsSFiniteKernel η] {a : α} {s : Set β} {t : Set γ},
  MeasurableSet s → MeasurableSet t → ((κ.compProd η) a) (s ×ˢ t) = ∫⁻ (b : β) in s, (η (a, b)) t ∂κ a

theorem ProbabilityTheory.Kernel.compProd_congr E1 #

∀ {α : Type u_1} {β : Type u_2} {γ : Type u_3} {mα : MeasurableSpace α} {mβ : MeasurableSpace β}
  {mγ : MeasurableSpace γ} {κ : ProbabilityTheory.Kernel α β} {η η' : ProbabilityTheory.Kernel (α × β) γ}
  [ProbabilityTheory.IsSFiniteKernel η] [ProbabilityTheory.IsSFiniteKernel η'],
  (∀ (a : α), ∀ᵐ (b : β) ∂κ a, η (a, b) = η' (a, b)) → κ.compProd η = κ.compProd η'

theorem ProbabilityTheory.Kernel.compProd_zero_left E0 #

∀ {α : Type u_1} {β : Type u_2} {γ : Type u_3} {mα : MeasurableSpace α} {mβ : MeasurableSpace β}
  {mγ : MeasurableSpace γ} (κ : ProbabilityTheory.Kernel (α × β) γ), ProbabilityTheory.Kernel.compProd 0 κ = 0

theorem ProbabilityTheory.Kernel.compProd_zero_right E0 #

∀ {α : Type u_1} {β : Type u_2} {mα : MeasurableSpace α} {mβ : MeasurableSpace β} (κ : ProbabilityTheory.Kernel α β)
  (γ : Type u_4) {mγ : MeasurableSpace γ}, κ.compProd 0 = 0

theorem ProbabilityTheory.Kernel.compProd_eq_zero_iff E0 #

∀ {α : Type u_1} {β : Type u_2} {γ : Type u_3} {mα : MeasurableSpace α} {mβ : MeasurableSpace β}
  {mγ : MeasurableSpace γ} {κ : ProbabilityTheory.Kernel α β} {η : ProbabilityTheory.Kernel (α × β) γ}
  [ProbabilityTheory.IsSFiniteKernel κ] [ProbabilityTheory.IsSFiniteKernel η],
  κ.compProd η = 0 ↔ ∀ (a : α), ∀ᵐ (b : β) ∂κ a, η (a, b) = 0

theorem ProbabilityTheory.Kernel.compProd_preimage_fst E1 #

∀ {α : Type u_1} {β : Type u_2} {γ : Type u_3} {mα : MeasurableSpace α} {mβ : MeasurableSpace β}
  {mγ : MeasurableSpace γ} {s : Set β},
  MeasurableSet s →
    ∀ (κ : ProbabilityTheory.Kernel α β) (η : ProbabilityTheory.Kernel (α × β) γ) [ProbabilityTheory.IsSFiniteKernel κ]
      [ProbabilityTheory.IsMarkovKernel η] (x : α), ((κ.compProd η) x) (Prod.fst ⁻¹' s) = (κ x) s

theorem ProbabilityTheory.Kernel.compProd_deterministic_apply E0 #

∀ {α : Type u_1} {β : Type u_2} {γ : Type u_3} {mα : MeasurableSpace α} {mβ : MeasurableSpace β}
  {mγ : MeasurableSpace γ} [MeasurableSingletonClass γ] {f : α × β → γ} (hf : Measurable f) {s : Set (β × γ)},
  MeasurableSet s →
    ∀ (κ : ProbabilityTheory.Kernel α β) [ProbabilityTheory.IsSFiniteKernel κ] (x : α),
      ((κ.compProd (ProbabilityTheory.Kernel.deterministic f hf)) x) s = (κ x) {b | (b, f (x, b)) ∈ s}

theorem ProbabilityTheory.Kernel.ae_kernel_lt_top E1 #

∀ {α : Type u_1} {β : Type u_2} {γ : Type u_3} {mα : MeasurableSpace α} {mβ : MeasurableSpace β}
  {mγ : MeasurableSpace γ} {s : Set (β × γ)} {κ : ProbabilityTheory.Kernel α β} [ProbabilityTheory.IsSFiniteKernel κ]
  {η : ProbabilityTheory.Kernel (α × β) γ} [ProbabilityTheory.IsSFiniteKernel η] (a : α),
  ((κ.compProd η) a) s ≠ ⊤ → ∀ᵐ (b : β) ∂κ a, (η (a, b)) (Prod.mk b ⁻¹' s) < ⊤

theorem ProbabilityTheory.Kernel.compProd_null E1 #

∀ {α : Type u_1} {β : Type u_2} {γ : Type u_3} {mα : MeasurableSpace α} {mβ : MeasurableSpace β}
  {mγ : MeasurableSpace γ} {s : Set (β × γ)} {κ : ProbabilityTheory.Kernel α β} [ProbabilityTheory.IsSFiniteKernel κ]
  {η : ProbabilityTheory.Kernel (α × β) γ} [ProbabilityTheory.IsSFiniteKernel η] (a : α),
  MeasurableSet s → (((κ.compProd η) a) s = 0 ↔ (fun b ↦ (η (a, b)) (Prod.mk b ⁻¹' s)) =ᵐ[κ a] 0)

theorem ProbabilityTheory.Kernel.ae_null_of_compProd_null E1 #

∀ {α : Type u_1} {β : Type u_2} {γ : Type u_3} {mα : MeasurableSpace α} {mβ : MeasurableSpace β}
  {mγ : MeasurableSpace γ} {s : Set (β × γ)} {κ : ProbabilityTheory.Kernel α β} [ProbabilityTheory.IsSFiniteKernel κ]
  {η : ProbabilityTheory.Kernel (α × β) γ} [ProbabilityTheory.IsSFiniteKernel η] {a : α},
  ((κ.compProd η) a) s = 0 → (fun b ↦ (η (a, b)) (Prod.mk b ⁻¹' s)) =ᵐ[κ a] 0

theorem ProbabilityTheory.Kernel.ae_ae_of_ae_compProd E1 #

∀ {α : Type u_1} {β : Type u_2} {γ : Type u_3} {mα : MeasurableSpace α} {mβ : MeasurableSpace β}
  {mγ : MeasurableSpace γ} {κ : ProbabilityTheory.Kernel α β} [ProbabilityTheory.IsSFiniteKernel κ]
  {η : ProbabilityTheory.Kernel (α × β) γ} [ProbabilityTheory.IsSFiniteKernel η] {a : α} {p : β × γ → Prop},
  (∀ᵐ (bc : β × γ) ∂(κ.compProd η) a, p bc) → ∀ᵐ (b : β) ∂κ a, ∀ᵐ (c : γ) ∂η (a, b), p (b, c)

theorem ProbabilityTheory.Kernel.ae_compProd_of_ae_ae E1 #

∀ {α : Type u_1} {β : Type u_2} {γ : Type u_3} {mα : MeasurableSpace α} {mβ : MeasurableSpace β}
  {mγ : MeasurableSpace γ} {a : α} {κ : ProbabilityTheory.Kernel α β} {η : ProbabilityTheory.Kernel (α × β) γ}
  {p : β × γ → Prop},
  MeasurableSet {x | p x} → (∀ᵐ (b : β) ∂κ a, ∀ᵐ (c : γ) ∂η (a, b), p (b, c)) → ∀ᵐ (bc : β × γ) ∂(κ.compProd η) a, p bc

theorem ProbabilityTheory.Kernel.ae_compProd_iff E0 #

∀ {α : Type u_1} {β : Type u_2} {γ : Type u_3} {mα : MeasurableSpace α} {mβ : MeasurableSpace β}
  {mγ : MeasurableSpace γ} {κ : ProbabilityTheory.Kernel α β} [ProbabilityTheory.IsSFiniteKernel κ]
  {η : ProbabilityTheory.Kernel (α × β) γ} [ProbabilityTheory.IsSFiniteKernel η] {a : α} {p : β × γ → Prop},
  MeasurableSet {x | p x} →
    ((∀ᵐ (bc : β × γ) ∂(κ.compProd η) a, p bc) ↔ ∀ᵐ (b : β) ∂κ a, ∀ᵐ (c : γ) ∂η (a, b), p (b, c))

theorem ProbabilityTheory.Kernel.compProd_restrict E1 #

∀ {α : Type u_1} {β : Type u_2} {γ : Type u_3} {mα : MeasurableSpace α} {mβ : MeasurableSpace β}
  {mγ : MeasurableSpace γ} {κ : ProbabilityTheory.Kernel α β} [ProbabilityTheory.IsSFiniteKernel κ]
  {η : ProbabilityTheory.Kernel (α × β) γ} [ProbabilityTheory.IsSFiniteKernel η] {s : Set β} {t : Set γ}
  (hs : MeasurableSet s) (ht : MeasurableSet t), (κ.restrict hs).compProd (η.restrict ht) = (κ.compProd η).restrict ⋯

theorem ProbabilityTheory.Kernel.compProd_restrict_left E1 #

∀ {α : Type u_1} {β : Type u_2} {γ : Type u_3} {mα : MeasurableSpace α} {mβ : MeasurableSpace β}
  {mγ : MeasurableSpace γ} {κ : ProbabilityTheory.Kernel α β} [ProbabilityTheory.IsSFiniteKernel κ]
  {η : ProbabilityTheory.Kernel (α × β) γ} [ProbabilityTheory.IsSFiniteKernel η] {s : Set β} (hs : MeasurableSet s),
  (κ.restrict hs).compProd η = (κ.compProd η).restrict ⋯

theorem ProbabilityTheory.Kernel.compProd_restrict_right E1 #

∀ {α : Type u_1} {β : Type u_2} {γ : Type u_3} {mα : MeasurableSpace α} {mβ : MeasurableSpace β}
  {mγ : MeasurableSpace γ} {κ : ProbabilityTheory.Kernel α β} [ProbabilityTheory.IsSFiniteKernel κ]
  {η : ProbabilityTheory.Kernel (α × β) γ} [ProbabilityTheory.IsSFiniteKernel η] {t : Set γ} (ht : MeasurableSet t),
  κ.compProd (η.restrict ht) = (κ.compProd η).restrict ⋯

theorem ProbabilityTheory.Kernel.lintegral_compProd' E1 #

∀ {α : Type u_1} {β : Type u_2} {γ : Type u_3} {mα : MeasurableSpace α} {mβ : MeasurableSpace β}
  {mγ : MeasurableSpace γ} (κ : ProbabilityTheory.Kernel α β) [ProbabilityTheory.IsSFiniteKernel κ]
  (η : ProbabilityTheory.Kernel (α × β) γ) [ProbabilityTheory.IsSFiniteKernel η] (a : α) {f : β → γ → ENNReal},
  Measurable (Function.uncurry f) →
    ∫⁻ (bc : β × γ), f bc.1 bc.2 ∂(κ.compProd η) a = ∫⁻ (b : β), ∫⁻ (c : γ), f b c ∂η (a, b) ∂κ a

Lebesgue integral against the composition-product of two kernels.

theorem ProbabilityTheory.Kernel.lintegral_compProd E3 #

∀ {α : Type u_1} {β : Type u_2} {γ : Type u_3} {mα : MeasurableSpace α} {mβ : MeasurableSpace β}
  {mγ : MeasurableSpace γ} (κ : ProbabilityTheory.Kernel α β) [ProbabilityTheory.IsSFiniteKernel κ]
  (η : ProbabilityTheory.Kernel (α × β) γ) [ProbabilityTheory.IsSFiniteKernel η] (a : α) {f : β × γ → ENNReal},
  Measurable f → ∫⁻ (bc : β × γ), f bc ∂(κ.compProd η) a = ∫⁻ (b : β), ∫⁻ (c : γ), f (b, c) ∂η (a, b) ∂κ a

Lebesgue integral against the composition-product of two kernels.

theorem ProbabilityTheory.Kernel.lintegral_compProd₀ E1 #

∀ {α : Type u_1} {β : Type u_2} {γ : Type u_3} {mα : MeasurableSpace α} {mβ : MeasurableSpace β}
  {mγ : MeasurableSpace γ} (κ : ProbabilityTheory.Kernel α β) [ProbabilityTheory.IsSFiniteKernel κ]
  (η : ProbabilityTheory.Kernel (α × β) γ) [ProbabilityTheory.IsSFiniteKernel η] (a : α) {f : β × γ → ENNReal},
  AEMeasurable f ((κ.compProd η) a) →
    ∫⁻ (z : β × γ), f z ∂(κ.compProd η) a = ∫⁻ (x : β), ∫⁻ (y : γ), f (x, y) ∂η (a, x) ∂κ a

Lebesgue integral against the composition-product of two kernels.

theorem ProbabilityTheory.Kernel.setLIntegral_compProd E1 #

∀ {α : Type u_1} {β : Type u_2} {γ : Type u_3} {mα : MeasurableSpace α} {mβ : MeasurableSpace β}
  {mγ : MeasurableSpace γ} (κ : ProbabilityTheory.Kernel α β) [ProbabilityTheory.IsSFiniteKernel κ]
  (η : ProbabilityTheory.Kernel (α × β) γ) [ProbabilityTheory.IsSFiniteKernel η] (a : α) {f : β × γ → ENNReal},
  Measurable f →
    ∀ {s : Set β} {t : Set γ},
      MeasurableSet s →
        MeasurableSet t →
          ∫⁻ (z : β × γ) in s ×ˢ t, f z ∂(κ.compProd η) a = ∫⁻ (x : β) in s, ∫⁻ (y : γ) in t, f (x, y) ∂η (a, x) ∂κ a

theorem ProbabilityTheory.Kernel.setLIntegral_compProd_univ_right E1 #

∀ {α : Type u_1} {β : Type u_2} {γ : Type u_3} {mα : MeasurableSpace α} {mβ : MeasurableSpace β}
  {mγ : MeasurableSpace γ} (κ : ProbabilityTheory.Kernel α β) [ProbabilityTheory.IsSFiniteKernel κ]
  (η : ProbabilityTheory.Kernel (α × β) γ) [ProbabilityTheory.IsSFiniteKernel η] (a : α) {f : β × γ → ENNReal},
  Measurable f →
    ∀ {s : Set β},
      MeasurableSet s →
        ∫⁻ (z : β × γ) in s ×ˢ Set.univ, f z ∂(κ.compProd η) a = ∫⁻ (x : β) in s, ∫⁻ (y : γ), f (x, y) ∂η (a, x) ∂κ a

theorem ProbabilityTheory.Kernel.setLIntegral_compProd_univ_left E1 #

∀ {α : Type u_1} {β : Type u_2} {γ : Type u_3} {mα : MeasurableSpace α} {mβ : MeasurableSpace β}
  {mγ : MeasurableSpace γ} (κ : ProbabilityTheory.Kernel α β) [ProbabilityTheory.IsSFiniteKernel κ]
  (η : ProbabilityTheory.Kernel (α × β) γ) [ProbabilityTheory.IsSFiniteKernel η] (a : α) {f : β × γ → ENNReal},
  Measurable f →
    ∀ {t : Set γ},
      MeasurableSet t →
        ∫⁻ (z : β × γ) in Set.univ ×ˢ t, f z ∂(κ.compProd η) a = ∫⁻ (x : β), ∫⁻ (y : γ) in t, f (x, y) ∂η (a, x) ∂κ a

theorem ProbabilityTheory.Kernel.compProd_eq_sum_compProd_left E1 #

∀ {α : Type u_1} {β : Type u_2} {γ : Type u_3} {mα : MeasurableSpace α} {mβ : MeasurableSpace β}
  {mγ : MeasurableSpace γ} (κ : ProbabilityTheory.Kernel α β) [inst : ProbabilityTheory.IsSFiniteKernel κ]
  (η : ProbabilityTheory.Kernel (α × β) γ), κ.compProd η = ProbabilityTheory.Kernel.sum fun n ↦ (κ.seq n).compProd η

theorem ProbabilityTheory.Kernel.compProd_eq_sum_compProd_right E1 #

∀ {α : Type u_1} {β : Type u_2} {γ : Type u_3} {mα : MeasurableSpace α} {mβ : MeasurableSpace β}
  {mγ : MeasurableSpace γ} (κ : ProbabilityTheory.Kernel α β) (η : ProbabilityTheory.Kernel (α × β) γ)
  [inst : ProbabilityTheory.IsSFiniteKernel η], κ.compProd η = ProbabilityTheory.Kernel.sum fun n ↦ κ.compProd (η.seq n)

theorem ProbabilityTheory.Kernel.compProd_eq_sum_compProd E1 #

∀ {α : Type u_1} {β : Type u_2} {γ : Type u_3} {mα : MeasurableSpace α} {mβ : MeasurableSpace β}
  {mγ : MeasurableSpace γ} (κ : ProbabilityTheory.Kernel α β) [inst : ProbabilityTheory.IsSFiniteKernel κ]
  (η : ProbabilityTheory.Kernel (α × β) γ) [inst_1 : ProbabilityTheory.IsSFiniteKernel η],
  κ.compProd η = ProbabilityTheory.Kernel.sum fun n ↦ ProbabilityTheory.Kernel.sum fun m ↦ (κ.seq n).compProd (η.seq m)

theorem ProbabilityTheory.Kernel.compProd_eq_tsum_compProd E1 #

∀ {α : Type u_1} {β : Type u_2} {γ : Type u_3} {mα : MeasurableSpace α} {mβ : MeasurableSpace β}
  {mγ : MeasurableSpace γ} {s : Set (β × γ)} (κ : ProbabilityTheory.Kernel α β)
  [inst : ProbabilityTheory.IsSFiniteKernel κ] (η : ProbabilityTheory.Kernel (α × β) γ)
  [inst_1 : ProbabilityTheory.IsSFiniteKernel η] (a : α),
  MeasurableSet s → ((κ.compProd η) a) s = ∑' (n : ℕ) (m : ℕ), (((κ.seq n).compProd (η.seq m)) a) s

instance ProbabilityTheory.Kernel.IsMarkovKernel.compProd E0 #

∀ {α : Type u_1} {β : Type u_2} {γ : Type u_3} {mα : MeasurableSpace α} {mβ : MeasurableSpace β}
  {mγ : MeasurableSpace γ} (κ : ProbabilityTheory.Kernel α β) [ProbabilityTheory.IsMarkovKernel κ]
  (η : ProbabilityTheory.Kernel (α × β) γ) [ProbabilityTheory.IsMarkovKernel η],
  ProbabilityTheory.IsMarkovKernel (κ.compProd η)

instance ProbabilityTheory.Kernel.IsZeroOrMarkovKernel.compProd E0 #

∀ {α : Type u_1} {β : Type u_2} {γ : Type u_3} {mα : MeasurableSpace α} {mβ : MeasurableSpace β}
  {mγ : MeasurableSpace γ} (κ : ProbabilityTheory.Kernel α β) [ProbabilityTheory.IsZeroOrMarkovKernel κ]
  (η : ProbabilityTheory.Kernel (α × β) γ) [ProbabilityTheory.IsZeroOrMarkovKernel η],
  ProbabilityTheory.IsZeroOrMarkovKernel (κ.compProd η)

theorem ProbabilityTheory.Kernel.compProd_apply_univ_le E1 #

∀ {α : Type u_1} {β : Type u_2} {γ : Type u_3} {mα : MeasurableSpace α} {mβ : MeasurableSpace β}
  {mγ : MeasurableSpace γ} (κ : ProbabilityTheory.Kernel α β) (η : ProbabilityTheory.Kernel (α × β) γ)
  [ProbabilityTheory.IsFiniteKernel η] (a : α), ((κ.compProd η) a) Set.univ ≤ (κ a) Set.univ * η.bound

instance ProbabilityTheory.Kernel.IsFiniteKernel.compProd E0 #

∀ {α : Type u_1} {β : Type u_2} {γ : Type u_3} {mα : MeasurableSpace α} {mβ : MeasurableSpace β}
  {mγ : MeasurableSpace γ} (κ : ProbabilityTheory.Kernel α β) [ProbabilityTheory.IsFiniteKernel κ]
  (η : ProbabilityTheory.Kernel (α × β) γ) [ProbabilityTheory.IsFiniteKernel η],
  ProbabilityTheory.IsFiniteKernel (κ.compProd η)

instance ProbabilityTheory.Kernel.IsSFiniteKernel.compProd E0 #

∀ {α : Type u_1} {β : Type u_2} {γ : Type u_3} {mα : MeasurableSpace α} {mβ : MeasurableSpace β}
  {mγ : MeasurableSpace γ} (κ : ProbabilityTheory.Kernel α β) (η : ProbabilityTheory.Kernel (α × β) γ),
  ProbabilityTheory.IsSFiniteKernel (κ.compProd η)

theorem ProbabilityTheory.Kernel.compProd_assoc E1 #

∀ {α : Type u_1} {β : Type u_2} {γ : Type u_3} {mα : MeasurableSpace α} {mβ : MeasurableSpace β}
  {mγ : MeasurableSpace γ} {δ : Type u_4} {mδ : MeasurableSpace δ} {κ : ProbabilityTheory.Kernel α β}
  {η : ProbabilityTheory.Kernel (α × β) γ} {ξ : ProbabilityTheory.Kernel (α × β × γ) δ},
  (κ.compProd (η.compProd (ξ.comap ⇑MeasurableEquiv.prodAssoc ⋯))).map ⇑MeasurableEquiv.prodAssoc.symm =
    (κ.compProd η).compProd ξ

Kernel.compProd is associative. We have to insert MeasurableEquiv.prodAssoc in two places because the products of types α × β × γ and (α × β) × γ are different.

theorem ProbabilityTheory.Kernel.compProd_add_left E1 #

∀ {α : Type u_1} {β : Type u_2} {γ : Type u_3} {mα : MeasurableSpace α} {mβ : MeasurableSpace β}
  {mγ : MeasurableSpace γ} (μ κ : ProbabilityTheory.Kernel α β) (η : ProbabilityTheory.Kernel (α × β) γ)
  [ProbabilityTheory.IsSFiniteKernel μ] [ProbabilityTheory.IsSFiniteKernel κ],
  (μ + κ).compProd η = μ.compProd η + κ.compProd η

theorem ProbabilityTheory.Kernel.compProd_add_right E1 #

∀ {α : Type u_1} {β : Type u_2} {γ : Type u_3} {mα : MeasurableSpace α} {mβ : MeasurableSpace β}
  {mγ : MeasurableSpace γ} (μ : ProbabilityTheory.Kernel α β) (κ η : ProbabilityTheory.Kernel (α × β) γ)
  [ProbabilityTheory.IsSFiniteKernel κ] [ProbabilityTheory.IsSFiniteKernel η],
  μ.compProd (κ + η) = μ.compProd κ + μ.compProd η

theorem ProbabilityTheory.Kernel.compProd_sum_left E1 #

∀ {α : Type u_1} {β : Type u_2} {γ : Type u_3} {mα : MeasurableSpace α} {mβ : MeasurableSpace β}
  {mγ : MeasurableSpace γ} {ι : Type u_4} [inst : Countable ι] {κ : ι → ProbabilityTheory.Kernel α β}
  {η : ProbabilityTheory.Kernel (α × β) γ} [∀ (i : ι), ProbabilityTheory.IsSFiniteKernel (κ i)],
  (ProbabilityTheory.Kernel.sum κ).compProd η = ProbabilityTheory.Kernel.sum fun i ↦ (κ i).compProd η

theorem ProbabilityTheory.Kernel.compProd_sum_right E1 #

∀ {α : Type u_1} {β : Type u_2} {γ : Type u_3} {mα : MeasurableSpace α} {mβ : MeasurableSpace β}
  {mγ : MeasurableSpace γ} {ι : Type u_4} [inst : Countable ι] {κ : ProbabilityTheory.Kernel α β}
  {η : ι → ProbabilityTheory.Kernel (α × β) γ} [∀ (i : ι), ProbabilityTheory.IsSFiniteKernel (η i)],
  κ.compProd (ProbabilityTheory.Kernel.sum η) = ProbabilityTheory.Kernel.sum fun i ↦ κ.compProd (η i)

theorem ProbabilityTheory.Kernel.comapRight_compProd_id_prod E1 #

∀ {α : Type u_1} {β : Type u_2} {γ : Type u_3} {mα : MeasurableSpace α} {mβ : MeasurableSpace β}
  {mγ : MeasurableSpace γ} {δ : Type u_4} {mδ : MeasurableSpace δ} (κ : ProbabilityTheory.Kernel α β)
  [ProbabilityTheory.IsSFiniteKernel κ] (η : ProbabilityTheory.Kernel (α × β) γ) [ProbabilityTheory.IsSFiniteKernel η]
  {f : δ → γ} (hf : MeasurableEmbedding f), (κ.compProd η).comapRight ⋯ = κ.compProd (η.comapRight hf)

theorem ProbabilityTheory.Kernel.fst_compProd_apply E0 #

∀ {α : Type u_1} {β : Type u_2} {γ : Type u_3} {mα : MeasurableSpace α} {mβ : MeasurableSpace β}
  {mγ : MeasurableSpace γ} (κ : ProbabilityTheory.Kernel α β) (η : ProbabilityTheory.Kernel (α × β) γ)
  [ProbabilityTheory.IsSFiniteKernel κ] [ProbabilityTheory.IsSFiniteKernel η] (x : α) {s : Set β},
  MeasurableSet s → ((κ.compProd η).fst x) s = ∫⁻ (b : β), s.indicator (fun b ↦ (η (x, b)) Set.univ) b ∂κ x

If η is a Markov kernel, use instead fst_compProd to get (κ ⊗ₖ η).fst = κ.

theorem ProbabilityTheory.Kernel.fst_compProd E0 #

∀ {α : Type u_1} {β : Type u_2} {γ : Type u_3} {mα : MeasurableSpace α} {mβ : MeasurableSpace β}
  {mγ : MeasurableSpace γ} (κ : ProbabilityTheory.Kernel α β) (η : ProbabilityTheory.Kernel (α × β) γ)
  [ProbabilityTheory.IsSFiniteKernel κ] [ProbabilityTheory.IsMarkovKernel η], (κ.compProd η).fst = κ