theorem extracted_formal_statement_3.{u_1, w, u} {Ω : Type u} {Z : Type w} {n : ℕ} {ι : Type u_1} {f : ι → Z → ℝ}
  [inst : Nonempty ι] {X : Ω → Z} {b : ℝ} (hf' : ∀ (i : ι) (z : Z), |f i z| ≤ b) (ω : Fin n → Ω × Ω) :
  ∑ σ, ⨆ i, |∑ k, ↑↑(σ k) * (f i (X (ω k).1) - f i (X (ω k).2))| ≤
    ∑ x, ((⨆ i, |∑ k, ↑↑(x k) * f i (X (ω k).1)|) + ⨆ i, |∑ k, ↑↑(x k) * f i (X (ω k).2)|) := sorry

State before:
case h
Ω : Type u
Z : Type w
n : ℕ
ι : Type u_1
f : ι → Z → ℝ
inst✝ : Nonempty ι
X : Ω → Z
b : ℝ
hf' : ∀ (i : ι) (z : Z), |f i z| ≤ b
ω : Fin n → Ω × Ω
⊢ ∑ σ, ⨆ i, |∑ k, ↑↑(σ k) * (f i (X (ω k).1) - f i (X (ω k).2))| ≤
    ∑ x, ((⨆ i, |∑ k, ↑↑(x k) * f i (X (ω k).1)|) + ⨆ i, |∑ k, ↑↑(x k) * f i (X (ω k).2)|)

Tactic: apply Finset.sum_le_sum
    intro σ _
    calc
  _ ≤ ⨆ i, |∑ k : Fin n, (σ k : ℝ) * f i (X (ω k).1)| + |∑ k : Fin n, (σ k : ℝ) * f i (X (ω k).2)| :=
    by
    to_theorem
      apply ciSup_mono·
        refine BddAbove.range_add ?B.hf ?B.hg
        rw [bddAbove_def]
        use n * b
        intro y hy
        simp only [Int.reduceNeg, Set.mem_range] at hy
        obtain ⟨y_1, hy'⟩ := hy
        rw [<- hy']
        · apply extracted_1_aux hf'
        · rw [bddAbove_def]
          use n * b
          intro y hy
          simp only [Int.reduceNeg, Set.mem_range] at hy
          obtain ⟨i, hi⟩ := hy
          rw [← hi]
          apply extracted_1_aux hf' intro i
    convert abs_sub _ _
    to_theorem rw [← Finset.sum_sub_distrib]congr ext k
    exact mul_sub_left_distrib ((σ k : ℝ)) (f i (X (ω k).1)) (f i (X (ω k).2))
  _ ≤ _ := by to_theorem apply ciSup_add_le_add_ciSup· apply extracted_1_aux' hf'· apply extracted_1_aux' hf'

State after:

Relevant lemmas:
error