theorem extracted_formal_statement_56.{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 → Ω) (k : Fin n)
  (a : k ∈ Finset.univ) : Measurable fun a => f i (X (ω k)) - f i (X (a 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 → Ω
k : Fin n
a✝ : k ∈ Finset.univ
⊢ Measurable fun a => f i (X (ω k)) - f i (X (a k))

Tactic: 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