theorem extracted_formal_statement_18.{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)) (σ : Signs n)
  (a : σ ∈ Finset.univ) (i : ι) (k : Fin n) (a_1 : k ∈ Finset.univ) :
  Measurable fun a => f i (X (a k).1) - f i (X (a k).2) := sorry

State before:
case 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)
σ : Signs n
a✝¹ : σ ∈ Finset.univ
i : ι
k : Fin n
a✝ : k ∈ Finset.univ
⊢ Measurable fun a => f i (X (a k).1) - f i (X (a k).2)

Tactic: apply Measurable.sub
    · apply (hf i).comp (measurable_pi_apply k).fst
    · apply (hf i).comp (measurable_pi_apply k).snd

State after:

Relevant lemmas:
measurable_pi_apply : ∀ {δ : Type u_4} {X : δ → Type u_6} [inst : (a : δ) → MeasurableSpace (X a)] (a : δ),
  Measurable fun f => f a
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