theorem extracted_formal_statement_78.{w, v, u} {Z : Type w} {ι : Type v} {f : ι → Z → ℝ} {Ω : Type u}
  [inst : MeasurableSpace Ω] {X : Ω → Z} {μ : Measure Ω} [inst_1 : IsProbabilityMeasure μ] [inst_2 : Countable ι]
  [inst_3 : Nonempty ι] (h𝓕 : ∀ (I : ι), Measurable (f I ∘ X)) {b : ℝ} (h𝓕' : ∀ (I : ι) (z : Z), |f I z| ≤ b) {n : ℕ}
  {c : ι → ℝ} {C : ℝ} (hC : ∀ (I : ι), |c I| ≤ C) (I : ι)
  (h_original_goal : Measurable fun a => ∑ i, (f I (X (a.2 i).1) - f I (X (a.2 i).2))) : Measurable Prod.snd := sorry

State before:
case left.hf.hf.hf
Z : Type w
ι : Type v
f : ι → Z → ℝ
Ω : Type u
inst✝³ : MeasurableSpace Ω
X : Ω → Z
μ : Measure Ω
inst✝² : IsProbabilityMeasure μ
inst✝¹ : Countable ι
inst✝ : Nonempty ι
h𝓕 : ∀ (I : ι), Measurable (f I ∘ X)
b : ℝ
h𝓕' : ∀ (I : ι) (z : Z), |f I z| ≤ b
n : ℕ
c : ι → ℝ
C : ℝ
hC : ∀ (I : ι), |c I| ≤ C
I : ι
⊢ Measurable fun a => ∑ i, (f I (X (a.2 i).1) - f I (X (a.2 i).2))

Tactic: apply (measurable_sum_part h𝓕).comp

State after:
[case left.hf.hf.hf
 Z : Type w
 ι : Type v
 f : ι → Z → ℝ
 Ω : Type u
 inst✝³ : MeasurableSpace Ω
 X : Ω → Z
 μ : Measure Ω
 inst✝² : IsProbabilityMeasure μ
 inst✝¹ : Countable ι
 inst✝ : Nonempty ι
 h𝓕 : ∀ (I : ι), Measurable (f I ∘ X)
 b : ℝ
 h𝓕' : ∀ (I : ι) (z : Z), |f I z| ≤ b
 n : ℕ
 c : ι → ℝ
 C : ℝ
 hC : ∀ (I : ι), |c I| ≤ C
 I : ι
 ⊢ Measurable Prod.snd]

Relevant lemmas:
measurable_sum_part : ∀ {Z : Type w} {ι : Type v} {f : ι → Z → ℝ} {Ω : Type u} [inst : MeasurableSpace Ω] {X : Ω → Z}
  [inst_4 : Countable ι],
  (∀ (I : ι), Measurable (f I ∘ X)) → ∀ {n : ℕ} {I : ι}, Measurable fun ω => ∑ i, (f I (X (ω i).1) - f I (X (ω i).2))