theorem extracted_formal_statement_9.{u_1, w, u} {Ω : Type u} [inst : MeasurableSpace Ω] {Z : Type w} {n : ℕ}
  {ι : Type u_1} {f : ι → Z → ℝ} {X : Ω → Z} (hf : ∀ (i : ι), Measurable (f i ∘ X)) (i : ι) (ω : Fin n → Ω) :
  Measurable fun ω' => ∑ k, (f i (X (ω k)) - f i (X (ω' k))) := sorry

State before:
Ω : Type u
inst✝ : MeasurableSpace Ω
Z : Type w
n : ℕ
ι : Type u_1
f : ι → Z → ℝ
X : Ω → Z
hf : ∀ (i : ι), Measurable (f i ∘ X)
i : ι
ω : Fin n → Ω
⊢ Measurable fun ω' => ∑ k, (f i (X (ω k)) - f i (X (ω' k)))

Tactic: apply Finset.univ.measurable_sum
    intro k _
    apply ((hf i).comp measurable_const).sub ((hf i).comp (measurable_pi_apply k))

State after:

Relevant lemmas:
measurable_const : ∀ {α : Type u_1} {β : Type u_2} {x : MeasurableSpace α} {x_1 : MeasurableSpace β} {a : α},
  Measurable fun x => a
measurable_pi_apply : ∀ {δ : Type u_4} {X : δ → Type u_6} [inst : (a : δ) → MeasurableSpace (X a)] (a : δ),
  Measurable fun f => f a