theorem extracted_formal_statement_27.{u_1, w, u} {Ω : Type u} [inst : MeasurableSpace Ω] {Z : Type w} {n : ℕ}
  {ι : Type u_1} {f : ι → Z → ℝ} {μ : Measure Ω} [inst_1 : IsProbabilityMeasure μ] [inst_2 : Countable ι] {X : Ω → Z}
  (hf : ∀ (i : ι), Measurable (f i ∘ X)) {b : ℝ} (hb : 0 ≤ b) (hf' : ∀ (i : ι) (z : Z), |f i z| ≤ b) (ω : Fin n → Ω × Ω)
  (h_original_goal : ∑ σ, ⨆ i, ∑ k, (|f i (X (ω k).1)| + |f i (X (ω k).2)|) ≤ 2 ^ n * (↑n * (b + b))) :
  ⨆ i, ∑ k, (|f i (X (ω k).1)| + |f i (X (ω k).2)|) ≤ ↑n * (b + b) := sorry

State before:
Ω : Type u
inst✝² : MeasurableSpace Ω
Z : Type w
n : ℕ
ι : Type u_1
f : ι → Z → ℝ
μ : Measure Ω
inst✝¹ : IsProbabilityMeasure μ
inst✝ : Countable ι
X : Ω → Z
hf : ∀ (i : ι), Measurable (f i ∘ X)
b : ℝ
hb : 0 ≤ b
hf' : ∀ (i : ι) (z : Z), |f i z| ≤ b
ω : Fin n → Ω × Ω
ω₁ : Fin n → Ω := fun k => (ω k).1
ω₂ : Fin n → Ω := fun k => (ω k).2
⊢ ∑ σ, ⨆ i, ∑ k, (|f i (X (ω k).1)| + |f i (X (ω k).2)|) ≤ 2 ^ n * (↑n * (b + b))

Tactic: simp only [Finset.sum_const, Finset.card_univ, Signs.card, nsmul_eq_mul, Nat.cast_pow, Nat.cast_ofNat,
  Nat.ofNat_pos, pow_pos, mul_le_mul_left]
    by_cases h : Nonempty ι
    ·
  apply ciSup_le
  intro i
  suffices ∑ k : Fin n, (|f i (X (ω k).1)| + |f i (X (ω k).2)|) ≤ ∑ k : Fin n, (b + b) from
    by
    to_theorem
      apply
        le_trans this
          _ apply le_of_eq simp only [Finset.sum_const, Finset.card_univ, Fintype.card_fin, smul_add, nsmul_eq_mul]
    ring
  apply Finset.sum_le_sum fun k _ ↦ add_le_add (hf' i (X (ω k).1)) (hf' i (X (ω k).2))

State after:
[case neg
 Ω : Type u
 inst✝² : MeasurableSpace Ω
 Z : Type w
 n : ℕ
 ι : Type u_1
 f : ι → Z → ℝ
 μ : Measure Ω
 inst✝¹ : IsProbabilityMeasure μ
 inst✝ : Countable ι
 X : Ω → Z
 hf : ∀ (i : ι), Measurable (f i ∘ X)
 b : ℝ
 hb : 0 ≤ b
 hf' : ∀ (i : ι) (z : Z), |f i z| ≤ b
 ω : Fin n → Ω × Ω
 ω₁ : Fin n → Ω := fun k => (ω k).1
 ω₂ : Fin n → Ω := fun k => (ω k).2
 h : ¬Nonempty ι
 ⊢ ⨆ i, ∑ k, (|f i (X (ω k).1)| + |f i (X (ω k).2)|) ≤ ↑n * (b + b)]

Relevant lemmas:
error