theorem extracted_formal_statement_250.{u_1, w, u} {Ω : Type u} [inst : MeasurableSpace Ω] {Z : Type w} {n : ℕ}
  {ι : Type u_1} {f : ι → Z → ℝ} [inst_1 : Countable ι] {X : Ω → Z} (hf : ∀ (i : ι), Measurable (f i ∘ X))
  (ω : Fin n → Ω) (i : ι) (k : Fin n) (a : k ∈ Finset.univ)
  (h_original_goal : Measurable fun a => f i (X (ω k)) - f i (X (a k))) : Measurable fun a => f i (X (ω k)) := sorry

State before:
case hf.hf.hf
Ω : Type u
inst✝¹ : MeasurableSpace Ω
Z : Type w
n : ℕ
ι : Type u_1
f : ι → Z → ℝ
inst✝ : Countable ι
X : Ω → Z
hf : ∀ (i : ι), Measurable (f i ∘ X)
ω : Fin n → Ω
i : ι
k : Fin n
a✝ : k ∈ Finset.univ
⊢ Measurable fun a => f i (X (ω k)) - f i (X (a k))

Tactic: apply Measurable.sub

State after:
[case hf.hf.hf.hf
 Ω : Type u
 inst✝¹ : MeasurableSpace Ω
 Z : Type w
 n : ℕ
 ι : Type u_1
 f : ι → Z → ℝ
 inst✝ : Countable ι
 X : Ω → Z
 hf : ∀ (i : ι), Measurable (f i ∘ X)
 ω : Fin n → Ω
 i : ι
 k : Fin n
 a✝ : k ∈ Finset.univ
 ⊢ Measurable fun a => f i (X (ω k)),
 case hf.hf.hf.hg
 Ω : Type u
 inst✝¹ : MeasurableSpace Ω
 Z : Type w
 n : ℕ
 ι : Type u_1
 f : ι → Z → ℝ
 inst✝ : Countable ι
 X : Ω → Z
 hf : ∀ (i : ι), Measurable (f i ∘ X)
 ω : Fin n → Ω
 i : ι
 k : Fin n
 a✝ : k ∈ Finset.univ
 ⊢ Measurable fun a => f i (X (a k))]

Relevant lemmas:
Measurable.sub : ∀ {G : Type u_2} {α : Type u_3} [inst : MeasurableSpace G] [inst_2 : Sub G] {m : MeasurableSpace α}
  {f g : α → G} [inst_3 : MeasurableSub₂ G], Measurable f → Measurable g → Measurable fun a => f a - g a