Theorem: ProbabilityTheory.Kernel.measurable_compProdFun
File: Mathlib/Probability/Kernel/Composition.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
γ : Type u_4
mγ : MeasurableSpace γ
s : Set (β × γ)
κ : Kernel α β
inst✝¹ : IsSFiniteKernel κ
η : Kernel (α × β) γ
inst✝ : IsSFiniteKernel η
hs : MeasurableSet s
⊢ Measurable fun a => κ.compProdFun η a s
state_after: α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
γ : Type u_4
mγ : MeasurableSpace γ
s : Set (β × γ)
κ : Kernel α β
inst✝¹ : IsSFiniteKernel κ
η : Kernel (α × β) γ
inst✝ : IsSFiniteKernel η
hs : MeasurableSet s
⊢ Measurable fun a => ∑' (n : ℕ), κ.compProdFun (η.seq n) a s
tactic: simp_rw [compProdFun_tsum_right κ η _ hs]
state_before: α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
γ : Type u_4
mγ : MeasurableSpace γ
s : Set (β × γ)
κ : Kernel α β
inst✝¹ : IsSFiniteKernel κ
η : Kernel (α × β) γ
inst✝ : IsSFiniteKernel η
hs : MeasurableSet s
⊢ Measurable fun a => ∑' (n : ℕ), κ.compProdFun (η.seq n) a s
state_after: α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
γ : Type u_4
mγ : MeasurableSpace γ
s : Set (β × γ)
κ : Kernel α β
inst✝¹ : IsSFiniteKernel κ
η : Kernel (α × β) γ
inst✝ : IsSFiniteKernel η
hs : MeasurableSet s
n : ℕ
⊢ Measurable fun a => κ.compProdFun (η.seq n) a s
tactic: refine Measurable.ennreal_tsum fun n => ?_
state_before: α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
γ : Type u_4
mγ : MeasurableSpace γ
s : Set (β × γ)
κ : Kernel α β
inst✝¹ : IsSFiniteKernel κ
η : Kernel (α × β) γ
inst✝ : IsSFiniteKernel η
hs : MeasurableSet s
n : ℕ
⊢ Measurable fun a => κ.compProdFun (η.seq n) a s
state_after: α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
γ : Type u_4
mγ : MeasurableSpace γ
s : Set (β × γ)
κ : Kernel α β
inst✝¹ : IsSFiniteKernel κ
η : Kernel (α × β) γ
inst✝ : IsSFiniteKernel η
hs : MeasurableSet s
n : ℕ
⊢ Measurable fun a => ∫⁻ (b : β), ((η.seq n) (a, b)) {c | (b, c) ∈ s} ∂κ a
tactic: simp only [compProdFun]
state_before: α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
γ : Type u_4
mγ : MeasurableSpace γ
s : Set (β × γ)
κ : Kernel α β
inst✝¹ : IsSFiniteKernel κ
η : Kernel (α × β) γ
inst✝ : IsSFiniteKernel η
hs : MeasurableSet s
n : ℕ
⊢ Measurable fun a => ∫⁻ (b : β), ((η.seq n) (a, b)) {c | (b, c) ∈ s} ∂κ a
state_after: α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
γ : Type u_4
mγ : MeasurableSpace γ
s : Set (β × γ)
κ : Kernel α β
inst✝¹ : IsSFiniteKernel κ
η : Kernel (α × β) γ
inst✝ : IsSFiniteKernel η
hs : MeasurableSet s
n : ℕ
h_meas : Measurable (Function.uncurry fun a b => ((η.seq n) (a, b)) {c | (b, c) ∈ s})
⊢ Measurable fun a => ∫⁻ (b : β), ((η.seq n) (a, b)) {c | (b, c) ∈ s} ∂κ a
tactic: have h_meas : Measurable (Function.uncurry fun a b => seq η n (a, b) {c : γ | (b, c) ∈ s}) := by
    have :
      (Function.uncurry fun a b => seq η n (a, b) {c : γ | (b, c) ∈ s}) = fun p =>
        seq η n p {c : γ | (p.2, c) ∈ s} := by
      ext1 p
      rw [Function.uncurry_apply_pair]
    rw [this]
    exact measurable_kernel_prod_mk_left (measurable_fst.snd.prod_mk measurable_snd hs)
state_before: α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
γ : Type u_4
mγ : MeasurableSpace γ
s : Set (β × γ)
κ : Kernel α β
inst✝¹ : IsSFiniteKernel κ
η : Kernel (α × β) γ
inst✝ : IsSFiniteKernel η
hs : MeasurableSet s
n : ℕ
h_meas : Measurable (Function.uncurry fun a b => ((η.seq n) (a, b)) {c | (b, c) ∈ s})
⊢ Measurable fun a => ∫⁻ (b : β), ((η.seq n) (a, b)) {c | (b, c) ∈ s} ∂κ a
state_after: no goals
tactic: exact h_meas.lintegral_kernel_prod_right