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

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

Tactic: apply Measurable.sub
    ·
  apply (h𝓕 I).comp
  apply measurable_fst.comp
  exact measurable_pi_apply i
    ·
  apply (h𝓕 I).comp
  apply measurable_snd.comp
  exact measurable_pi_apply i

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_4 : Sub G] {m : MeasurableSpace α}
  {f g : α → G} [inst_5 : MeasurableSub₂ G], Measurable f → Measurable g → Measurable fun a => f a - g a