zzhisthebest/LeanBenchmark huggingface dataset:
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

theorem extracted_formal_statement_0.{u_2} {ι : Type u_2} [inst : Nonempty ι] {g h : ι → ℝ} (hg : BddAbove (Set.range g))
  (hh : BddAbove (Set.range h)) (h_original_goal : ⨆ i, g i + h i ≤ ⨆ i, ⨆ j, g i + h j) :
  BddAbove (Set.range fun i => ⨆ j, g i + h j) := sorry

Tactic state before:
ι : Type u_2
inst✝ : Nonempty ι
g h : ι → ℝ
hg : BddAbove (Set.range g)
hh : BddAbove (Set.range h)
⊢ ⨆ i, g i + h i ≤ ⨆ i, ⨆ j, g i + h j

Tactic:
apply ciSup_mono

Tactic state after:
[case B
 ι : Type u_2
 inst✝ : Nonempty ι
 g h : ι → ℝ
 hg : BddAbove (Set.range g)
 hh : BddAbove (Set.range h)
 ⊢ BddAbove (Set.range fun i => ⨆ j, g i + h j),
 case H
 ι : Type u_2
 inst✝ : Nonempty ι
 g h : ι → ℝ
 hg : BddAbove (Set.range g)
 hh : BddAbove (Set.range h)
 ⊢ ∀ (x : ι), g x + h x ≤ ⨆ j, g x + h j]
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

theorem extracted_formal_statement_1.{u_2} {ι : Type u_2} [inst : Nonempty ι] {g h : ι → ℝ} (hg : BddAbove (Set.range g))
  (hh : BddAbove (Set.range h)) (h_original_goal : ⨆ i, g i + h i ≤ ⨆ i, ⨆ j, g i + h j) (x : ι) :
  g x + h x ≤ ⨆ j, g x + h j := sorry

Tactic state before:
ι : Type u_2
inst✝ : Nonempty ι
g h : ι → ℝ
hg : BddAbove (Set.range g)
hh : BddAbove (Set.range h)
⊢ ⨆ i, g i + h i ≤ ⨆ i, ⨆ j, g i + h j

Tactic:
apply ciSup_mono

Tactic state after:
[case B
 ι : Type u_2
 inst✝ : Nonempty ι
 g h : ι → ℝ
 hg : BddAbove (Set.range g)
 hh : BddAbove (Set.range h)
 ⊢ BddAbove (Set.range fun i => ⨆ j, g i + h j),
 case H
 ι : Type u_2
 inst✝ : Nonempty ι
 g h : ι → ℝ
 hg : BddAbove (Set.range g)
 hh : BddAbove (Set.range h)
 ⊢ ∀ (x : ι), g x + h x ≤ ⨆ j, g x + h j]
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

theorem extracted_formal_statement_2.{u_2} {ι : Type u_2} [inst : Nonempty ι] {g h : ι → ℝ} (hg : BddAbove (Set.range g))
  (hh : BddAbove (Set.range h)) (i : ι) (h_original_goal : g i + h i ≤ ⨆ j, g i + h j) :
  g i + h i ≤ g i + ⨆ i, h i := sorry

Tactic state before:
case H
ι : Type u_2
inst✝ : Nonempty ι
g h : ι → ℝ
hg : BddAbove (Set.range g)
hh : BddAbove (Set.range h)
i : ι
⊢ g i + h i ≤ ⨆ j, g i + h j

Tactic:
rw [← add_ciSup hh]

Tactic state after:
[case H
 ι : Type u_2
 inst✝ : Nonempty ι
 g h : ι → ℝ
 hg : BddAbove (Set.range g)
 hh : BddAbove (Set.range h)
 i : ι
 ⊢ g i + h i ≤ g i + ⨆ i, h i]
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

theorem extracted_formal_statement_3.{u_2} {ι : Type u_2} [inst : Nonempty ι] {g h : ι → ℝ} (hg : BddAbove (Set.range g))
  (hh : BddAbove (Set.range h)) (i : ι) (h_original_goal : g i + h i ≤ g i + ⨆ i, h i) : h i ≤ ⨆ i, h i := sorry

Tactic state before:
case H
ι : Type u_2
inst✝ : Nonempty ι
g h : ι → ℝ
hg : BddAbove (Set.range g)
hh : BddAbove (Set.range h)
i : ι
⊢ g i + h i ≤ g i + ⨆ i, h i

Tactic:
simp only [add_le_add_iff_left]

Tactic state after:
[case H
 ι : Type u_2
 inst✝ : Nonempty ι
 g h : ι → ℝ
 hg : BddAbove (Set.range g)
 hh : BddAbove (Set.range h)
 i : ι
 ⊢ h i ≤ ⨆ i, h i]
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

theorem extracted_formal_statement_4.{u_2} {ι : Type u_2} [inst : Nonempty ι] {g h : ι → ℝ} (hg : BddAbove (Set.range g))
  (hh : BddAbove (Set.range h)) (i : ι) : h i ≤ ⨆ i, h i := sorry

Tactic state before:
case H
ι : Type u_2
inst✝ : Nonempty ι
g h : ι → ℝ
hg : BddAbove (Set.range g)
hh : BddAbove (Set.range h)
i : ι
⊢ h i ≤ ⨆ i, h i

Tactic:
exact le_ciSup hh i

Tactic state after:
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

theorem extracted_formal_statement_5.{u_2} {ι : Type u_2} [inst : Nonempty ι] {g h : ι → ℝ} (hg : BddAbove (Set.range g))
  (hh : BddAbove (Set.range h)) (h_original_goal : (⨆ i, g i) + ⨆ i, h i = ⨆ i, ⨆ j, g i + h j) :
  ⨆ i, g i + ⨆ i, h i = ⨆ i, ⨆ j, g i + h j := sorry

Tactic state before:
case h.e'_4
ι : Type u_2
inst✝ : Nonempty ι
g h : ι → ℝ
hg : BddAbove (Set.range g)
hh : BddAbove (Set.range h)
⊢ (⨆ i, g i) + ⨆ i, h i = ⨆ i, ⨆ j, g i + h j

Tactic:
rw [ciSup_add hg]

Tactic state after:
[case h.e'_4
 ι : Type u_2
 inst✝ : Nonempty ι
 g h : ι → ℝ
 hg : BddAbove (Set.range g)
 hh : BddAbove (Set.range h)
 ⊢ ⨆ i, g i + ⨆ i, h i = ⨆ i, ⨆ j, g i + h j]
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

theorem extracted_formal_statement_6.{u_2} {ι : Type u_2} [inst : Nonempty ι] {g h : ι → ℝ} (hg : BddAbove (Set.range g))
  (hh : BddAbove (Set.range h)) (i : ι) : g i + ⨆ i, h i = ⨆ j, g i + h j := sorry

Tactic state before:
case h.e'_4.e_s.h
ι : Type u_2
inst✝ : Nonempty ι
g h : ι → ℝ
hg : BddAbove (Set.range g)
hh : BddAbove (Set.range h)
i : ι
⊢ g i + ⨆ i, h i = ⨆ j, g i + h j

Tactic:
apply add_ciSup hh

Tactic state after:
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

theorem extracted_formal_statement_7.{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) (i : ι) (ω : Fin n → Ω) (σ : Signs n)
  (k : Fin n) : |↑↑(σ k) * f i (X (ω k))| = |f i (X (ω k))| := sorry

Tactic state before:
case e_f.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
i : ι
ω : Fin n → Ω
σ : Signs n
k : Fin n
⊢ |↑↑(σ k) * f i (X (ω k))| = |f i (X (ω k))|

Tactic:
simp only [Int.reduceNeg, abs_mul, Signs.apply_abs', one_mul]

Tactic state after:
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

theorem extracted_formal_statement_8.{u_1, w, u} {Ω : Type u} {Z : Type w} {n : ℕ} {ι : Type u_1} {f : ι → Z → ℝ}
  [inst : Nonempty ι] {b : ℝ} (hf' : ∀ (i : ι) (z : Z), |f i z| ≤ b) : ∑ k, b ≤ ↑n * b := sorry

Tactic state before:
Ω : Type u
Z : Type w
n : ℕ
ι : Type u_1
f : ι → Z → ℝ
inst✝ : Nonempty ι
X : Ω → Z
b : ℝ
hf' : ∀ (i : ι) (z : Z), |f i z| ≤ b
i : ι
ω : Fin n → Ω
σ : Signs n
⊢ ∑ k, b ≤ ↑n * b

Tactic:
simp

Tactic state after:
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

theorem extracted_formal_statement_9.{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 → Ω) (σ : Signs n)
  (h_original_goal : BddAbove (Set.range fun i => |∑ k, ↑↑(σ k) * f i (X (ω k))|)) :
  ∃ x, ∀ y ∈ Set.range fun i => |∑ k, ↑↑(σ k) * f i (X (ω k))|, y ≤ x := sorry

Tactic state before:
Ω : 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 → Ω
σ : Signs n
⊢ BddAbove (Set.range fun i => |∑ k, ↑↑(σ k) * f i (X (ω k))|)

Tactic:
rw [bddAbove_def]

Tactic state after:
[Ω : 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 → Ω
 σ : Signs n
 ⊢ ∃ x, ∀ y ∈ Set.range fun i => |∑ k, ↑↑(σ k) * f i (X (ω k))|, y ≤ x]
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

theorem extracted_formal_statement_10.{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 → Ω) (σ : Signs n) (y : ℝ)
  (hy : ∃ y_1, |∑ k, ↑↑(σ k) * f y_1 (X (ω k))| = y) (i : ι) (hi : |∑ k, ↑↑(σ k) * f i (X (ω k))| = y)
  (h_original_goal : y ≤ ↑n * b) : |∑ k, ↑↑(σ k) * f i (X (ω k))| ≤ ↑n * b := sorry

Tactic state before:
Ω : 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 → Ω
σ : Signs n
y : ℝ
hy : ∃ y_1, |∑ k, ↑↑(σ k) * f y_1 (X (ω k))| = y
i : ι
hi : |∑ k, ↑↑(σ k) * f i (X (ω k))| = y
⊢ y ≤ ↑n * b

Tactic:
rw [← hi]

Tactic state after:
[Ω : 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 → Ω
 σ : Signs n
 y : ℝ
 hy : ∃ y_1, |∑ k, ↑↑(σ k) * f y_1 (X (ω k))| = y
 i : ι
 hi : |∑ k, ↑↑(σ k) * f i (X (ω k))| = y
 ⊢ |∑ k, ↑↑(σ k) * f i (X (ω k))| ≤ ↑n * b]
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

theorem extracted_formal_statement_11.{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 → Ω) (σ : Signs n) (y : ℝ)
  (hy : ∃ y_1, |∑ k, ↑↑(σ k) * f y_1 (X (ω k))| = y) (i : ι) (hi : |∑ k, ↑↑(σ k) * f i (X (ω k))| = y) :
  |∑ k, ↑↑(σ k) * f i (X (ω k))| ≤ ↑n * b := sorry

Tactic state before:
Ω : 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 → Ω
σ : Signs n
y : ℝ
hy : ∃ y_1, |∑ k, ↑↑(σ k) * f y_1 (X (ω k))| = y
i : ι
hi : |∑ k, ↑↑(σ k) * f i (X (ω k))| = y
⊢ |∑ k, ↑↑(σ k) * f i (X (ω k))| ≤ ↑n * b

Tactic:
apply extracted_1_aux hf'

Tactic state after:
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

theorem extracted_formal_statement_12.{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 → Ω × Ω)
  (h_original_goal :
    (↑(Fintype.card (Signs n)))⁻¹ * ∑ σ, ⨆ i, |∑ k, ↑↑(σ k) * (f i (X (ω k).1) - f i (X (ω k).2))| ≤
      ((↑(Fintype.card (Signs n)))⁻¹ * ∑ σ, ⨆ i, |∑ k, ↑↑(σ k) * f i (X (ω k).1)|) +
        (↑(Fintype.card (Signs n)))⁻¹ * ∑ σ, ⨆ i, |∑ k, ↑↑(σ k) * f i (X (ω k).2)|) :
  (↑(Fintype.card (Signs n)))⁻¹ * ∑ σ, ⨆ i, |∑ k, ↑↑(σ k) * (f i (X (ω k).1) - f i (X (ω k).2))| ≤
    (↑(Fintype.card (Signs n)))⁻¹ *
      ((∑ σ, ⨆ i, |∑ k, ↑↑(σ k) * f i (X (ω k).1)|) + ∑ σ, ⨆ i, |∑ k, ↑↑(σ k) * f i (X (ω k).2)|) := sorry

Tactic state before:
Ω : 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 → Ω × Ω
⊢ (↑(Fintype.card (Signs n)))⁻¹ * ∑ σ, ⨆ i, |∑ k, ↑↑(σ k) * (f i (X (ω k).1) - f i (X (ω k).2))| ≤
    ((↑(Fintype.card (Signs n)))⁻¹ * ∑ σ, ⨆ i, |∑ k, ↑↑(σ k) * f i (X (ω k).1)|) +
      (↑(Fintype.card (Signs n)))⁻¹ * ∑ σ, ⨆ i, |∑ k, ↑↑(σ k) * f i (X (ω k).2)|

Tactic:
rw [← mul_add]

Tactic state after:
[Ω : 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 → Ω × Ω
 ⊢ (↑(Fintype.card (Signs n)))⁻¹ * ∑ σ, ⨆ i, |∑ k, ↑↑(σ k) * (f i (X (ω k).1) - f i (X (ω k).2))| ≤
     (↑(Fintype.card (Signs n)))⁻¹ *
       ((∑ σ, ⨆ i, |∑ k, ↑↑(σ k) * f i (X (ω k).1)|) + ∑ σ, ⨆ i, |∑ k, ↑↑(σ k) * f i (X (ω k).2)|)]
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

theorem extracted_formal_statement_13.{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 → Ω × Ω)
  (h_original_goal :
    (↑(Fintype.card (Signs n)))⁻¹ * ∑ σ, ⨆ i, |∑ k, ↑↑(σ k) * (f i (X (ω k).1) - f i (X (ω k).2))| ≤
      (↑(Fintype.card (Signs n)))⁻¹ *
        ((∑ σ, ⨆ i, |∑ k, ↑↑(σ k) * f i (X (ω k).1)|) + ∑ σ, ⨆ i, |∑ k, ↑↑(σ k) * f i (X (ω k).2)|)) :
  ∑ σ, ⨆ i, |∑ k, ↑↑(σ k) * (f i (X (ω k).1) - f i (X (ω k).2))| ≤
    (∑ σ, ⨆ i, |∑ k, ↑↑(σ k) * f i (X (ω k).1)|) + ∑ σ, ⨆ i, |∑ k, ↑↑(σ k) * f i (X (ω k).2)| := sorry

Tactic state before:
Ω : 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 → Ω × Ω
⊢ (↑(Fintype.card (Signs n)))⁻¹ * ∑ σ, ⨆ i, |∑ k, ↑↑(σ k) * (f i (X (ω k).1) - f i (X (ω k).2))| ≤
    (↑(Fintype.card (Signs n)))⁻¹ *
      ((∑ σ, ⨆ i, |∑ k, ↑↑(σ k) * f i (X (ω k).1)|) + ∑ σ, ⨆ i, |∑ k, ↑↑(σ k) * f i (X (ω k).2)|)

Tactic:
apply mul_le_mul_of_nonneg_left

Tactic state after:
[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))| ≤
     (∑ σ, ⨆ i, |∑ k, ↑↑(σ k) * f i (X (ω k).1)|) + ∑ σ, ⨆ i, |∑ k, ↑↑(σ k) * f i (X (ω k).2)|,
 case a0
 Ω : 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 → Ω × Ω
 ⊢ 0 ≤ (↑(Fintype.card (Signs n)))⁻¹]
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

theorem extracted_formal_statement_14.{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 → Ω × Ω)
  (h_original_goal :
    (↑(Fintype.card (Signs n)))⁻¹ * ∑ σ, ⨆ i, |∑ k, ↑↑(σ k) * (f i (X (ω k).1) - f i (X (ω k).2))| ≤
      (↑(Fintype.card (Signs n)))⁻¹ *
        ((∑ σ, ⨆ i, |∑ k, ↑↑(σ k) * f i (X (ω k).1)|) + ∑ σ, ⨆ i, |∑ k, ↑↑(σ k) * f i (X (ω k).2)|)) :
  0 ≤ (↑(Fintype.card (Signs n)))⁻¹ := sorry

Tactic state before:
Ω : 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 → Ω × Ω
⊢ (↑(Fintype.card (Signs n)))⁻¹ * ∑ σ, ⨆ i, |∑ k, ↑↑(σ k) * (f i (X (ω k).1) - f i (X (ω k).2))| ≤
    (↑(Fintype.card (Signs n)))⁻¹ *
      ((∑ σ, ⨆ i, |∑ k, ↑↑(σ k) * f i (X (ω k).1)|) + ∑ σ, ⨆ i, |∑ k, ↑↑(σ k) * f i (X (ω k).2)|)

Tactic:
apply mul_le_mul_of_nonneg_left

Tactic state after:
[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))| ≤
     (∑ σ, ⨆ i, |∑ k, ↑↑(σ k) * f i (X (ω k).1)|) + ∑ σ, ⨆ i, |∑ k, ↑↑(σ k) * f i (X (ω k).2)|,
 case a0
 Ω : 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 → Ω × Ω
 ⊢ 0 ≤ (↑(Fintype.card (Signs n)))⁻¹]
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

theorem extracted_formal_statement_15.{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 → Ω × Ω)
  (h_original_goal :
    ∑ σ, ⨆ i, |∑ k, ↑↑(σ k) * (f i (X (ω k).1) - f i (X (ω k).2))| ≤
      (∑ σ, ⨆ i, |∑ k, ↑↑(σ k) * f i (X (ω k).1)|) + ∑ σ, ⨆ i, |∑ k, ↑↑(σ k) * f i (X (ω k).2)|) :
  ∑ σ, ⨆ 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

Tactic 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))| ≤
    (∑ σ, ⨆ i, |∑ k, ↑↑(σ k) * f i (X (ω k).1)|) + ∑ σ, ⨆ i, |∑ k, ↑↑(σ k) * f i (X (ω k).2)|

Tactic:
rw [← Finset.sum_add_distrib]

Tactic state after:
[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)|)]
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

theorem extracted_formal_statement_16.{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 → Ω × Ω)
  (h_original_goal :
    ∑ σ, ⨆ 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)|))
  (i : Signs n) :
  i ∈ Finset.univ →
    ⨆ i_1, |∑ k, ↑↑(i k) * (f i_1 (X (ω k).1) - f i_1 (X (ω k).2))| ≤
      (⨆ i_1, |∑ k, ↑↑(i k) * f i_1 (X (ω k).1)|) + ⨆ i_1, |∑ k, ↑↑(i k) * f i_1 (X (ω k).2)| := sorry

Tactic 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

Tactic state after:
[case h.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 ∈ Finset.univ,
     ⨆ i_1, |∑ k, ↑↑(i k) * (f i_1 (X (ω k).1) - f i_1 (X (ω k).2))| ≤
       (⨆ i_1, |∑ k, ↑↑(i k) * f i_1 (X (ω k).1)|) + ⨆ i_1, |∑ k, ↑↑(i k) * f i_1 (X (ω k).2)|]
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

theorem extracted_formal_statement_17.{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 → Ω × Ω) (σ : Signs n)
  (a : σ ∈ Finset.univ)
  (h_original_goal :
    ⨆ i, |∑ k, ↑↑(σ k) * (f i (X (ω k).1) - f i (X (ω k).2))| ≤
      ⨆ i, |∑ k, ↑↑(σ k) * f i (X (ω k).1)| + |∑ k, ↑↑(σ k) * f i (X (ω k).2)|) :
  BddAbove (Set.range fun i => |∑ k, ↑↑(σ k) * f i (X (ω k).1)| + |∑ k, ↑↑(σ k) * f i (X (ω k).2)|) := sorry

Tactic state before:
Ω : 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 → Ω × Ω
σ : Signs n
a✝ : σ ∈ Finset.univ
⊢ ⨆ i, |∑ k, ↑↑(σ k) * (f i (X (ω k).1) - f i (X (ω k).2))| ≤
    ⨆ i, |∑ k, ↑↑(σ k) * f i (X (ω k).1)| + |∑ k, ↑↑(σ k) * f i (X (ω k).2)|

Tactic:
apply ciSup_mono

Tactic state after:
[case B
 Ω : 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 → Ω × Ω
 σ : Signs n
 a✝ : σ ∈ Finset.univ
 ⊢ BddAbove (Set.range fun i => |∑ k, ↑↑(σ k) * f i (X (ω k).1)| + |∑ k, ↑↑(σ k) * f i (X (ω k).2)|),
 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 → Ω × Ω
 σ : Signs n
 a✝ : σ ∈ Finset.univ
 ⊢ ∀ (x : ι),
     |∑ k, ↑↑(σ k) * (f x (X (ω k).1) - f x (X (ω k).2))| ≤
       |∑ k, ↑↑(σ k) * f x (X (ω k).1)| + |∑ k, ↑↑(σ k) * f x (X (ω k).2)|]
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

theorem extracted_formal_statement_18.{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 → Ω × Ω) (σ : Signs n)
  (a : σ ∈ Finset.univ)
  (h_original_goal :
    ⨆ i, |∑ k, ↑↑(σ k) * (f i (X (ω k).1) - f i (X (ω k).2))| ≤
      ⨆ i, |∑ k, ↑↑(σ k) * f i (X (ω k).1)| + |∑ k, ↑↑(σ k) * f i (X (ω k).2)|)
  (x : ι) :
  |∑ k, ↑↑(σ k) * (f x (X (ω k).1) - f x (X (ω k).2))| ≤
    |∑ k, ↑↑(σ k) * f x (X (ω k).1)| + |∑ k, ↑↑(σ k) * f x (X (ω k).2)| := sorry

Tactic state before:
Ω : 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 → Ω × Ω
σ : Signs n
a✝ : σ ∈ Finset.univ
⊢ ⨆ i, |∑ k, ↑↑(σ k) * (f i (X (ω k).1) - f i (X (ω k).2))| ≤
    ⨆ i, |∑ k, ↑↑(σ k) * f i (X (ω k).1)| + |∑ k, ↑↑(σ k) * f i (X (ω k).2)|

Tactic:
apply ciSup_mono

Tactic state after:
[case B
 Ω : 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 → Ω × Ω
 σ : Signs n
 a✝ : σ ∈ Finset.univ
 ⊢ BddAbove (Set.range fun i => |∑ k, ↑↑(σ k) * f i (X (ω k).1)| + |∑ k, ↑↑(σ k) * f i (X (ω k).2)|),
 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 → Ω × Ω
 σ : Signs n
 a✝ : σ ∈ Finset.univ
 ⊢ ∀ (x : ι),
     |∑ k, ↑↑(σ k) * (f x (X (ω k).1) - f x (X (ω k).2))| ≤
       |∑ k, ↑↑(σ k) * f x (X (ω k).1)| + |∑ k, ↑↑(σ k) * f x (X (ω k).2)|]
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

theorem extracted_formal_statement_19.{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 → Ω × Ω) (σ : Signs n)
  (a : σ ∈ Finset.univ) (y : ℝ) (y_1 : ι) (hy' : |∑ k, ↑↑(σ k) * f y_1 (X (ω k).1)| = y) :
  |∑ k, ↑↑(σ k) * f y_1 (X (ω k).1)| ≤ ↑n * b := sorry

Tactic state before:
case h.intro
Ω : 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 → Ω × Ω
σ : Signs n
a✝ : σ ∈ Finset.univ
y : ℝ
y_1 : ι
hy' : |∑ k, ↑↑(σ k) * f y_1 (X (ω k).1)| = y
⊢ |∑ k, ↑↑(σ k) * f y_1 (X (ω k).1)| ≤ ↑n * b

Tactic:
apply extracted_1_aux hf'

Tactic state after:
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

theorem extracted_formal_statement_20.{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 → Ω × Ω) (σ : Signs n)
  (a : σ ∈ Finset.univ) (h_original_goal : BddAbove (Set.range fun i => |∑ k, ↑↑(σ k) * f i (X (ω k).2)|)) :
  ∃ x, ∀ y ∈ Set.range fun i => |∑ k, ↑↑(σ k) * f i (X (ω k).2)|, y ≤ x := sorry

Tactic state before:
case B.hg
Ω : 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 → Ω × Ω
σ : Signs n
a✝ : σ ∈ Finset.univ
⊢ BddAbove (Set.range fun i => |∑ k, ↑↑(σ k) * f i (X (ω k).2)|)

Tactic:
rw [bddAbove_def]

Tactic state after:
[case B.hg
 Ω : 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 → Ω × Ω
 σ : Signs n
 a✝ : σ ∈ Finset.univ
 ⊢ ∃ x, ∀ y ∈ Set.range fun i => |∑ k, ↑↑(σ k) * f i (X (ω k).2)|, y ≤ x]
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

theorem extracted_formal_statement_21.{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 → Ω × Ω) (σ : Signs n)
  (a : σ ∈ Finset.univ) (y : ℝ) (i : ι) (hi : |∑ k, ↑↑(σ k) * f i (X (ω k).2)| = y) (h_original_goal : y ≤ ↑n * b) :
  |∑ k, ↑↑(σ k) * f i (X (ω k).2)| ≤ ↑n * b := sorry

Tactic state before:
case h.intro
Ω : 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 → Ω × Ω
σ : Signs n
a✝ : σ ∈ Finset.univ
y : ℝ
i : ι
hi : |∑ k, ↑↑(σ k) * f i (X (ω k).2)| = y
⊢ y ≤ ↑n * b

Tactic:
rw [← hi]

Tactic state after:
[case h.intro
 Ω : 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 → Ω × Ω
 σ : Signs n
 a✝ : σ ∈ Finset.univ
 y : ℝ
 i : ι
 hi : |∑ k, ↑↑(σ k) * f i (X (ω k).2)| = y
 ⊢ |∑ k, ↑↑(σ k) * f i (X (ω k).2)| ≤ ↑n * b]
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

theorem extracted_formal_statement_22.{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 → Ω × Ω) (σ : Signs n)
  (a : σ ∈ Finset.univ) (y : ℝ) (i : ι) (hi : |∑ k, ↑↑(σ k) * f i (X (ω k).2)| = y) :
  |∑ k, ↑↑(σ k) * f i (X (ω k).2)| ≤ ↑n * b := sorry

Tactic state before:
case h.intro
Ω : 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 → Ω × Ω
σ : Signs n
a✝ : σ ∈ Finset.univ
y : ℝ
i : ι
hi : |∑ k, ↑↑(σ k) * f i (X (ω k).2)| = y
⊢ |∑ k, ↑↑(σ k) * f i (X (ω k).2)| ≤ ↑n * b

Tactic:
apply extracted_1_aux hf'

Tactic state after: