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

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

Tactic: apply Measurable.const_mul
    apply Measurable.sub
    · exact (h𝓕 I).comp <| measurable_fst.comp measurable_fst

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

Relevant lemmas:
measurable_fst : ∀ {α : Type u_1} {β : Type u_2} {x : MeasurableSpace α} {x_1 : MeasurableSpace β}, Measurable Prod.fst
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
Measurable.const_mul : ∀ {M : Type u_2} {α : Type u_3} [inst : MeasurableSpace M] [inst_4 : Mul M]
  {m : MeasurableSpace α} {f : α → M} [inst_5 : MeasurableMul M], Measurable f → ∀ (c : M), Measurable fun x => c * f x