theorem extracted_formal_statement_47.{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)
  (h_original_goal :
    Integrable
      (fun ω => ∫ (x : Fin n → Ω), (fun ω' => ⨆ i, |∑ k, (f i (X (ω k)) - f i (X (ω' k)))|) x ∂Measure.pi fun x => μ)
      (Measure.pi fun x => μ)) :
  ∀ᵐ (x : Fin n → Ω) ∂Measure.pi fun x => μ,
    ‖∫ (x_1 : Fin n → Ω), ⨆ i, |∑ k, (f i (X (x k)) - f i (X (x_1 k)))| ∂Measure.pi fun x => μ‖ ≤ ↑n * (b + b) := sorry

State before:
Ω : 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
⊢ Integrable
    (fun ω => ∫ (x : Fin n → Ω), (fun ω' => ⨆ i, |∑ k, (f i (X (ω k)) - f i (X (ω' k)))|) x ∂Measure.pi fun x => μ)
    (Measure.pi fun x => μ)

Tactic: simp_rw [← memLp_one_iff_integrable]
    refine MemLp.of_bound ?_ (n * (b + b)) ?_
    ·
  apply Measurable.aestronglyMeasurable
  to_theorem
    apply
      StronglyMeasurable.measurable refine StronglyMeasurable.integral_prod_left ?_ apply Measurable.stronglyMeasurable
  dsimp [Function.uncurry_def]
  to_theorem apply Measurable.iSup intro i apply Measurable.abs
  to_theorem apply Finset.univ.measurable_sum intro k _ apply Measurable.sub
  apply (hf i).comp measurable_snd.eval
  apply (hf i).comp measurable_fst.eval

State after:
[case refine_2
 Ω : 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
 ⊢ ∀ᵐ (x : Fin n → Ω) ∂Measure.pi fun x => μ,
     ‖∫ (x_1 : Fin n → Ω), ⨆ i, |∑ k, (f i (X (x k)) - f i (X (x_1 k)))| ∂Measure.pi fun x => μ‖ ≤ ↑n * (b + b)]

Relevant lemmas:
error