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

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 => 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: 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
⊢ 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: 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 => 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: 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 : ℕ
⊢ 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: exact h_meas.lintegral_kernel_prod_right
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: 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]
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 (Function.uncurry fun a b => ((seq η n) (a, b)) {c | (b, c) ∈ 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 : ℕ
this : (Function.uncurry fun a b => ((seq η n) (a, b)) {c | (b, c) ∈ s}) = fun p => ((seq η n) p) {c | (p.2, c) ∈ s}
⊢ Measurable (Function.uncurry fun a b => ((seq η n) (a, b)) {c | (b, c) ∈ s})

tactic: rw [this]
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 : ℕ
this : (Function.uncurry fun a b => ((seq η n) (a, b)) {c | (b, c) ∈ s}) = fun p => ((seq η n) p) {c | (p.2, c) ∈ s}
⊢ Measurable (Function.uncurry fun a b => ((seq η n) (a, b)) {c | (b, c) ∈ 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 : ℕ
this : (Function.uncurry fun a b => ((seq η n) (a, b)) {c | (b, c) ∈ s}) = fun p => ((seq η n) p) {c | (p.2, c) ∈ s}
⊢ Measurable fun p => ((seq η n) p) {c | (p.2, c) ∈ s}

tactic: 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 : ℕ
this : (Function.uncurry fun a b => ((seq η n) (a, b)) {c | (b, c) ∈ s}) = fun p => ((seq η n) p) {c | (p.2, c) ∈ s}
⊢ Measurable fun p => ((seq η n) p) {c | (p.2, c) ∈ s}
state_after: no goals

tactic: ext1 p
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 : ℕ
⊢ (Function.uncurry fun a b => ((seq η n) (a, b)) {c | (b, c) ∈ s}) = fun p => ((seq η n) p) {c | (p.2, c) ∈ s}
state_after: case h
α : 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 : ℕ
p : α × β
⊢ Function.uncurry (fun a b => ((seq η n) (a, b)) {c | (b, c) ∈ s}) p = ((seq η n) p) {c | (p.2, c) ∈ s}

tactic: rw [Function.uncurry_apply_pair]
state_before: case h
α : 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 : ℕ
p : α × β
⊢ Function.uncurry (fun a b => ((seq η n) (a, b)) {c | (b, c) ∈ s}) p = ((seq η n) p) {c | (p.2, c) ∈ s}
state_after: no goals