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

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✝¹ : IsFiniteKernel κ
η : ↥(kernel (α × β) γ)
inst✝ : IsFiniteKernel η
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✝¹ : IsFiniteKernel κ
η : ↥(kernel (α × β) γ)
inst✝ : IsFiniteKernel η
hs : MeasurableSet s
⊢ Measurable fun a => ∫⁻ (b : β), (η (a, b)) {c | (b, c) ∈ s} ∂κ a

tactic: have h_meas : Measurable (Function.uncurry fun a b => η (a, b) {c : γ | (b, c) ∈ s}) := by
  have :
    (Function.uncurry fun a b => η (a, b) {c : γ | (b, c) ∈ s}) = fun p =>
      η 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✝¹ : IsFiniteKernel κ
η : ↥(kernel (α × β) γ)
inst✝ : IsFiniteKernel η
hs : MeasurableSet s
⊢ Measurable fun a => ∫⁻ (b : β), (η (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✝¹ : IsFiniteKernel κ
η : ↥(kernel (α × β) γ)
inst✝ : IsFiniteKernel η
hs : MeasurableSet s
h_meas : Measurable (Function.uncurry fun a b => (η (a, b)) {c | (b, c) ∈ s})
⊢ Measurable fun a => ∫⁻ (b : β), (η (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✝¹ : IsFiniteKernel κ
η : ↥(kernel (α × β) γ)
inst✝ : IsFiniteKernel η
hs : MeasurableSet s
h_meas : Measurable (Function.uncurry fun a b => (η (a, b)) {c | (b, c) ∈ s})
⊢ Measurable fun a => ∫⁻ (b : β), (η (a, b)) {c | (b, c) ∈ s} ∂κ a
state_after: no goals

tactic: have :
  (Function.uncurry fun a b => η (a, b) {c : γ | (b, c) ∈ s}) = fun p =>
    η 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✝¹ : IsFiniteKernel κ
η : ↥(kernel (α × β) γ)
inst✝ : IsFiniteKernel η
hs : MeasurableSet s
⊢ Measurable (Function.uncurry fun a b => (η (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✝¹ : IsFiniteKernel κ
η : ↥(kernel (α × β) γ)
inst✝ : IsFiniteKernel η
hs : MeasurableSet s
this : (Function.uncurry fun a b => (η (a, b)) {c | (b, c) ∈ s}) = fun p => (η p) {c | (p.2, c) ∈ s}
⊢ Measurable (Function.uncurry fun a b => (η (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✝¹ : IsFiniteKernel κ
η : ↥(kernel (α × β) γ)
inst✝ : IsFiniteKernel η
hs : MeasurableSet s
this : (Function.uncurry fun a b => (η (a, b)) {c | (b, c) ∈ s}) = fun p => (η p) {c | (p.2, c) ∈ s}
⊢ Measurable (Function.uncurry fun a b => (η (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✝¹ : IsFiniteKernel κ
η : ↥(kernel (α × β) γ)
inst✝ : IsFiniteKernel η
hs : MeasurableSet s
this : (Function.uncurry fun a b => (η (a, b)) {c | (b, c) ∈ s}) = fun p => (η p) {c | (p.2, c) ∈ s}
⊢ Measurable fun p => (η 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✝¹ : IsFiniteKernel κ
η : ↥(kernel (α × β) γ)
inst✝ : IsFiniteKernel η
hs : MeasurableSet s
this : (Function.uncurry fun a b => (η (a, b)) {c | (b, c) ∈ s}) = fun p => (η p) {c | (p.2, c) ∈ s}
⊢ Measurable fun p => (η 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✝¹ : IsFiniteKernel κ
η : ↥(kernel (α × β) γ)
inst✝ : IsFiniteKernel η
hs : MeasurableSet s
⊢ (Function.uncurry fun a b => (η (a, b)) {c | (b, c) ∈ s}) = fun p => (η 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✝¹ : IsFiniteKernel κ
η : ↥(kernel (α × β) γ)
inst✝ : IsFiniteKernel η
hs : MeasurableSet s
p : α × β
⊢ Function.uncurry (fun a b => (η (a, b)) {c | (b, c) ∈ s}) p = (η 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✝¹ : IsFiniteKernel κ
η : ↥(kernel (α × β) γ)
inst✝ : IsFiniteKernel η
hs : MeasurableSet s
p : α × β
⊢ Function.uncurry (fun a b => (η (a, b)) {c | (b, c) ∈ s}) p = (η p) {c | (p.2, c) ∈ s}
state_after: no goals