Theorem: ProbabilityTheory.kernel.isSFiniteKernel_sum_of_denumerable
File: Mathlib/Probability/Kernel/Basic.lean

tactic: let e : ℕ ≃ ι × ℕ := (Denumerable.eqv (ι × ℕ)).symm
state_before: α : Type u_2
β : Type u_3
ι : Type u_1
mα : MeasurableSpace α
mβ : MeasurableSpace β
κ : { x // x ∈ kernel α β }
inst✝ : Denumerable ι
κs : ι → { x // x ∈ kernel α β }
hκs : ∀ (n : ι), IsSFiniteKernel (κs n)
⊢ IsSFiniteKernel (kernel.sum κs)

tactic: refine' ⟨⟨fun n => seq (κs (e n).1) (e n).2, inferInstance, _⟩⟩
state_before: α : Type u_2
β : Type u_3
ι : Type u_1
mα : MeasurableSpace α
mβ : MeasurableSpace β
κ : { x // x ∈ kernel α β }
inst✝ : Denumerable ι
κs : ι → { x // x ∈ kernel α β }
hκs : ∀ (n : ι), IsSFiniteKernel (κs n)
e : ℕ ≃ ι × ℕ := (Denumerable.eqv (ι × ℕ)).symm
⊢ IsSFiniteKernel (kernel.sum κs)

tactic: have hκ_eq : kernel.sum κs = kernel.sum fun n => kernel.sum (seq (κs n)) := by
  simp_rw [kernel_sum_seq]
state_before: α : Type u_2
β : Type u_3
ι : Type u_1
mα : MeasurableSpace α
mβ : MeasurableSpace β
κ : { x // x ∈ kernel α β }
inst✝ : Denumerable ι
κs : ι → { x // x ∈ kernel α β }
hκs : ∀ (n : ι), IsSFiniteKernel (κs n)
e : ℕ ≃ ι × ℕ := (Denumerable.eqv (ι × ℕ)).symm
⊢ kernel.sum κs = kernel.sum fun n => seq (κs (↑e n).fst) (↑e n).snd

tactic: ext a s
state_before: α : Type u_2
β : Type u_3
ι : Type u_1
mα : MeasurableSpace α
mβ : MeasurableSpace β
κ : { x // x ∈ kernel α β }
inst✝ : Denumerable ι
κs : ι → { x // x ∈ kernel α β }
hκs : ∀ (n : ι), IsSFiniteKernel (κs n)
e : ℕ ≃ ι × ℕ := (Denumerable.eqv (ι × ℕ)).symm
hκ_eq : kernel.sum κs = kernel.sum fun n => kernel.sum (seq (κs n))
⊢ kernel.sum κs = kernel.sum fun n => seq (κs (↑e n).fst) (↑e n).snd

tactic: intro hs
state_before: case h.h
α : Type u_2
β : Type u_3
ι : Type u_1
mα : MeasurableSpace α
mβ : MeasurableSpace β
κ : { x // x ∈ kernel α β }
inst✝ : Denumerable ι
κs : ι → { x // x ∈ kernel α β }
hκs : ∀ (n : ι), IsSFiniteKernel (κs n)
e : ℕ ≃ ι × ℕ := (Denumerable.eqv (ι × ℕ)).symm
hκ_eq : kernel.sum κs = kernel.sum fun n => kernel.sum (seq (κs n))
a : α
s : Set β
⊢ MeasurableSet s → ↑↑(↑(kernel.sum κs) a) s = ↑↑(↑(kernel.sum fun n => seq (κs (↑e n).fst) (↑e n).snd) a) s

tactic: rw [hκ_eq]
state_before: case h.h
α : Type u_2
β : Type u_3
ι : Type u_1
mα : MeasurableSpace α
mβ : MeasurableSpace β
κ : { x // x ∈ kernel α β }
inst✝ : Denumerable ι
κs : ι → { x // x ∈ kernel α β }
hκs : ∀ (n : ι), IsSFiniteKernel (κs n)
e : ℕ ≃ ι × ℕ := (Denumerable.eqv (ι × ℕ)).symm
hκ_eq : kernel.sum κs = kernel.sum fun n => kernel.sum (seq (κs n))
a : α
s : Set β
hs : MeasurableSet s
⊢ ↑↑(↑(kernel.sum κs) a) s = ↑↑(↑(kernel.sum fun n => seq (κs (↑e n).fst) (↑e n).snd) a) s

tactic: simp_rw [kernel.sum_apply' _ _ hs]
state_before: case h.h
α : Type u_2
β : Type u_3
ι : Type u_1
mα : MeasurableSpace α
mβ : MeasurableSpace β
κ : { x // x ∈ kernel α β }
inst✝ : Denumerable ι
κs : ι → { x // x ∈ kernel α β }
hκs : ∀ (n : ι), IsSFiniteKernel (κs n)
e : ℕ ≃ ι × ℕ := (Denumerable.eqv (ι × ℕ)).symm
hκ_eq : kernel.sum κs = kernel.sum fun n => kernel.sum (seq (κs n))
a : α
s : Set β
hs : MeasurableSet s
⊢ ↑↑(↑(kernel.sum fun n => kernel.sum (seq (κs n))) a) s = ↑↑(↑(kernel.sum fun n => seq (κs (↑e n).fst) (↑e n).snd) a) s

tactic: change (∑' i, ∑' m, seq (κs i) m a s) = ∑' n, (fun im : ι × ℕ => seq (κs im.fst) im.snd a s) (e n)
state_before: case h.h
α : Type u_2
β : Type u_3
ι : Type u_1
mα : MeasurableSpace α
mβ : MeasurableSpace β
κ : { x // x ∈ kernel α β }
inst✝ : Denumerable ι
κs : ι → { x // x ∈ kernel α β }
hκs : ∀ (n : ι), IsSFiniteKernel (κs n)
e : ℕ ≃ ι × ℕ := (Denumerable.eqv (ι × ℕ)).symm
hκ_eq : kernel.sum κs = kernel.sum fun n => kernel.sum (seq (κs n))
a : α
s : Set β
hs : MeasurableSet s
⊢ (∑' (n : ι) (n_1 : ℕ), ↑↑(↑(seq (κs n) n_1) a) s) =
    ∑' (n : ℕ), ↑↑(↑(seq (κs (↑(Denumerable.eqv (ι × ℕ)).symm n).fst) (↑(Denumerable.eqv (ι × ℕ)).symm n).snd) a) s

tactic: rw [e.tsum_eq (fun im : ι × ℕ => seq (κs im.fst) im.snd a s),
  tsum_prod' ENNReal.summable fun _ => ENNReal.summable]
state_before: case h.h
α : Type u_2
β : Type u_3
ι : Type u_1
mα : MeasurableSpace α
mβ : MeasurableSpace β
κ : { x // x ∈ kernel α β }
inst✝ : Denumerable ι
κs : ι → { x // x ∈ kernel α β }
hκs : ∀ (n : ι), IsSFiniteKernel (κs n)
e : ℕ ≃ ι × ℕ := (Denumerable.eqv (ι × ℕ)).symm
hκ_eq : kernel.sum κs = kernel.sum fun n => kernel.sum (seq (κs n))
a : α
s : Set β
hs : MeasurableSet s
⊢ (∑' (i : ι) (m : ℕ), ↑↑(↑(seq (κs i) m) a) s) = ∑' (n : ℕ), (fun im => ↑↑(↑(seq (κs im.fst) im.snd) a) s) (↑e n)

tactic: simp_rw [kernel_sum_seq]
state_before: α : Type u_2
β : Type u_3
ι : Type u_1
mα : MeasurableSpace α
mβ : MeasurableSpace β
κ : { x // x ∈ kernel α β }
inst✝ : Denumerable ι
κs : ι → { x // x ∈ kernel α β }
hκs : ∀ (n : ι), IsSFiniteKernel (κs n)
e : ℕ ≃ ι × ℕ := (Denumerable.eqv (ι × ℕ)).symm
⊢ kernel.sum κs = kernel.sum fun n => kernel.sum (seq (κs n))