theorem extracted_formal_statement_303.{u_1, w, u} {Ω : Type u} [inst : MeasurableSpace Ω] {Z : Type w} {n : ℕ}
  {ι : Type u_1} {f : ι → Z → ℝ} {μ : Measure Ω} [inst_1 : IsProbabilityMeasure μ] {X : Ω → Z} [inst_2 : Nonempty ι]
  [inst_3 : Countable ι] (hf : ∀ (i : ι), Measurable (f i ∘ X)) {b : ℝ} (hf' : ∀ (i : ι) (z : Z), |f i z| ≤ b) (i : ι)
  (h_original_goal : Measurable fun b => |∑ k, (f i (X (b.2 k)) - f i (X (b.1 k)))|) :
  Measurable fun x => ∑ k, (f i (X (x.2 k)) - f i (X (x.1 k))) := sorry

State before:
case refine_1.hf.hf.hf.hf
Ω : Type u
inst✝¹ : MeasurableSpace Ω
Z : Type w
n : ℕ
ι : Type u_1
f : ι → Z → ℝ
μ : Measure Ω
inst✝ : IsProbabilityMeasure μ
X : Ω → Z
inst_2 : Nonempty ι
inst_3 : Countable ι
hf : ∀ (i : ι), Measurable (f i ∘ X)
b : ℝ
hf' : ∀ (i : ι) (z : Z), |f i z| ≤ b
i : ι
⊢ Measurable fun b => |∑ k, (f i (X (b.2 k)) - f i (X (b.1 k)))|

Tactic: apply Measurable.abs

State after:
[case refine_1.hf.hf.hf.hf.hf
 Ω : Type u
 inst✝¹ : MeasurableSpace Ω
 Z : Type w
 n : ℕ
 ι : Type u_1
 f : ι → Z → ℝ
 μ : Measure Ω
 inst✝ : IsProbabilityMeasure μ
 X : Ω → Z
 inst_2 : Nonempty ι
 inst_3 : Countable ι
 hf : ∀ (i : ι), Measurable (f i ∘ X)
 b : ℝ
 hf' : ∀ (i : ι) (z : Z), |f i z| ≤ b
 i : ι
 ⊢ Measurable fun x => ∑ k, (f i (X (x.2 k)) - f i (X (x.1 k)))]

Relevant lemmas:
Measurable.abs : ∀ {α : Type u_1} {β : Type u_2} [inst : Lattice α] [inst_4 : AddGroup α] [inst_5 : MeasurableSpace α]
  [inst_6 : MeasurableSpace β] {f : β → α} [inst_7 : MeasurableNeg α] [inst_8 : MeasurableSup₂ α],
  Measurable f → Measurable fun x => |f x|