zzhisthebest/LeanBenchmark huggingface dataset:
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

theorem extracted_formal_statement_56.{u_1, w, u} {Ω : Type u} [inst : MeasurableSpace Ω] {Z : Type w} {n : ℕ}
  {ι : Type u_1} {f : ι → Z → ℝ} {X : Ω → Z} (hf : ∀ (i : ι), Measurable (f i ∘ X)) (i : ι) (ω : Fin n → Ω) (k : Fin n)
  (a : k ∈ Finset.univ) : Measurable fun a => f i (X (ω k)) - f i (X (a k)) := sorry

Tactic state before:
Ω : Type u
inst✝ : MeasurableSpace Ω
Z : Type w
n : ℕ
ι : Type u_1
f : ι → Z → ℝ
X : Ω → Z
hf : ∀ (i : ι), Measurable (f i ∘ X)
i : ι
ω : Fin n → Ω
k : Fin n
a✝ : k ∈ Finset.univ
⊢ Measurable fun a => f i (X (ω k)) - f i (X (a k))

Tactic:
apply ((hf i).comp measurable_const).sub ((hf i).comp (measurable_pi_apply k))

Tactic state after:
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

theorem extracted_formal_statement_57.{u_1, w, u} {Ω : Type u} [inst : MeasurableSpace Ω] {Z : Type w} {n : ℕ}
  {ι : Type u_1} {f : ι → Z → ℝ} [inst_1 : Countable ι] {X : Ω → Z} (hf : ∀ (i : ι), Measurable (f i ∘ X))
  (h_original_goal : Measurable fun ω => ∑ σ, ⨆ i, |∑ k, ↑↑(σ k) * f i (X (ω.1 k))|) (i : Signs n) :
  i ∈ Finset.univ → Measurable fun a => ⨆ i_1, |∑ k, ↑↑(i k) * f i_1 (X (a.1 k))| := sorry

Tactic state before:
Ω : Type u
inst✝¹ : MeasurableSpace Ω
Z : Type w
n : ℕ
ι : Type u_1
f : ι → Z → ℝ
inst✝ : Countable ι
X : Ω → Z
hf : ∀ (i : ι), Measurable (f i ∘ X)
⊢ Measurable fun ω => ∑ σ, ⨆ i, |∑ k, ↑↑(σ k) * f i (X (ω.1 k))|

Tactic:
apply Finset.univ.measurable_sum

Tactic state after:
[Ω : Type u
 inst✝¹ : MeasurableSpace Ω
 Z : Type w
 n : ℕ
 ι : Type u_1
 f : ι → Z → ℝ
 inst✝ : Countable ι
 X : Ω → Z
 hf : ∀ (i : ι), Measurable (f i ∘ X)
 ⊢ ∀ i ∈ Finset.univ, Measurable fun a => ⨆ i_1, |∑ k, ↑↑(i k) * f i_1 (X (a.1 k))|]
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

theorem extracted_formal_statement_58.{u_1, w, u} {Ω : Type u} [inst : MeasurableSpace Ω] {Z : Type w} {n : ℕ}
  {ι : Type u_1} {f : ι → Z → ℝ} [inst_1 : Countable ι] {X : Ω → Z} (hf : ∀ (i : ι), Measurable (f i ∘ X)) (σ : Signs n)
  (a : σ ∈ Finset.univ) (h_original_goal : Measurable fun a => ⨆ i, |∑ k, ↑↑(σ k) * f i (X (a.1 k))|) (i : ι) :
  Measurable fun b => |∑ k, ↑↑(σ k) * f i (X (b.1 k))| := sorry

Tactic state before:
Ω : Type u
inst✝¹ : MeasurableSpace Ω
Z : Type w
n : ℕ
ι : Type u_1
f : ι → Z → ℝ
inst✝ : Countable ι
X : Ω → Z
hf : ∀ (i : ι), Measurable (f i ∘ X)
σ : Signs n
a✝ : σ ∈ Finset.univ
⊢ Measurable fun a => ⨆ i, |∑ k, ↑↑(σ k) * f i (X (a.1 k))|

Tactic:
apply Measurable.iSup

Tactic state after:
[case hf
 Ω : Type u
 inst✝¹ : MeasurableSpace Ω
 Z : Type w
 n : ℕ
 ι : Type u_1
 f : ι → Z → ℝ
 inst✝ : Countable ι
 X : Ω → Z
 hf : ∀ (i : ι), Measurable (f i ∘ X)
 σ : Signs n
 a✝ : σ ∈ Finset.univ
 ⊢ ∀ (i : ι), Measurable fun b => |∑ k, ↑↑(σ k) * f i (X (b.1 k))|]
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

theorem extracted_formal_statement_59.{u_1, w, u} {Ω : Type u} [inst : MeasurableSpace Ω] {Z : Type w} {n : ℕ}
  {ι : Type u_1} {f : ι → Z → ℝ} [inst_1 : Countable ι] {X : Ω → Z} (hf : ∀ (i : ι), Measurable (f i ∘ X)) (σ : Signs n)
  (a : σ ∈ Finset.univ) (i : ι) (h_original_goal : Measurable fun b => |∑ k, ↑↑(σ k) * f i (X (b.1 k))|) :
  Measurable fun x => ∑ k, ↑↑(σ k) * f i (X (x.1 k)) := sorry

Tactic state before:
case hf
Ω : Type u
inst✝¹ : MeasurableSpace Ω
Z : Type w
n : ℕ
ι : Type u_1
f : ι → Z → ℝ
inst✝ : Countable ι
X : Ω → Z
hf : ∀ (i : ι), Measurable (f i ∘ X)
σ : Signs n
a✝ : σ ∈ Finset.univ
i : ι
⊢ Measurable fun b => |∑ k, ↑↑(σ k) * f i (X (b.1 k))|

Tactic:
apply Measurable.abs

Tactic state after:
[case hf.hf
 Ω : Type u
 inst✝¹ : MeasurableSpace Ω
 Z : Type w
 n : ℕ
 ι : Type u_1
 f : ι → Z → ℝ
 inst✝ : Countable ι
 X : Ω → Z
 hf : ∀ (i : ι), Measurable (f i ∘ X)
 σ : Signs n
 a✝ : σ ∈ Finset.univ
 i : ι
 ⊢ Measurable fun x => ∑ k, ↑↑(σ k) * f i (X (x.1 k))]
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

theorem extracted_formal_statement_60.{u_1, w, u} {Ω : Type u} [inst : MeasurableSpace Ω] {Z : Type w} {n : ℕ}
  {ι : Type u_1} {f : ι → Z → ℝ} [inst_1 : Countable ι] {X : Ω → Z} (hf : ∀ (i : ι), Measurable (f i ∘ X)) (σ : Signs n)
  (a : σ ∈ Finset.univ) (i : ι) (k : Fin n) (a_1 : k ∈ Finset.univ)
  (h_original_goal : Measurable fun a => ↑↑(σ k) * f i (X (a.1 k))) : Measurable fun a => f i (X (a.1 k)) := sorry

Tactic state before:
case hf.hf
Ω : Type u
inst✝¹ : MeasurableSpace Ω
Z : Type w
n : ℕ
ι : Type u_1
f : ι → Z → ℝ
inst✝ : Countable ι
X : Ω → Z
hf : ∀ (i : ι), Measurable (f i ∘ X)
σ : Signs n
a✝¹ : σ ∈ Finset.univ
i : ι
k : Fin n
a✝ : k ∈ Finset.univ
⊢ Measurable fun a => ↑↑(σ k) * f i (X (a.1 k))

Tactic:
apply measurable_const.mul

Tactic state after:
[case hf.hf
 Ω : Type u
 inst✝¹ : MeasurableSpace Ω
 Z : Type w
 n : ℕ
 ι : Type u_1
 f : ι → Z → ℝ
 inst✝ : Countable ι
 X : Ω → Z
 hf : ∀ (i : ι), Measurable (f i ∘ X)
 σ : Signs n
 a✝¹ : σ ∈ Finset.univ
 i : ι
 k : Fin n
 a✝ : k ∈ Finset.univ
 ⊢ Measurable fun a => f i (X (a.1 k))]
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

theorem extracted_formal_statement_61.{u_1, w, u} {Ω : Type u} [inst : MeasurableSpace Ω] {Z : Type w} {n : ℕ}
  {ι : Type u_1} {f : ι → Z → ℝ} [inst_1 : Countable ι] {X : Ω → Z} (hf : ∀ (i : ι), Measurable (f i ∘ X)) (σ : Signs n)
  (a : σ ∈ Finset.univ) (i : ι) (k : Fin n) (a_1 : k ∈ Finset.univ) : Measurable fun a => f i (X (a.1 k)) := sorry

Tactic state before:
case hf.hf
Ω : Type u
inst✝¹ : MeasurableSpace Ω
Z : Type w
n : ℕ
ι : Type u_1
f : ι → Z → ℝ
inst✝ : Countable ι
X : Ω → Z
hf : ∀ (i : ι), Measurable (f i ∘ X)
σ : Signs n
a✝¹ : σ ∈ Finset.univ
i : ι
k : Fin n
a✝ : k ∈ Finset.univ
⊢ Measurable fun a => f i (X (a.1 k))

Tactic:
apply (hf i).comp measurable_fst.eval

Tactic state after:
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

theorem extracted_formal_statement_62.{u_1, w, u} {Ω : Type u} [inst : MeasurableSpace Ω] {Z : Type w} {n : ℕ}
  {ι : Type u_1} {f : ι → Z → ℝ} [inst_1 : Countable ι] {X : Ω → Z} (hf : ∀ (i : ι), Measurable (f i ∘ X))
  (h_original_goal : Measurable fun ω => (↑(Fintype.card (Signs n)))⁻¹ * ∑ σ, ⨆ i, |∑ k, ↑↑(σ k) * f i (X (ω.1 k))|) :
  Measurable fun a => ∑ σ, ⨆ i, |∑ k, ↑↑(σ k) * f i (X (a.1 k))| := sorry

Tactic state before:
Ω : Type u
inst✝¹ : MeasurableSpace Ω
Z : Type w
n : ℕ
ι : Type u_1
f : ι → Z → ℝ
inst✝ : Countable ι
X : Ω → Z
hf : ∀ (i : ι), Measurable (f i ∘ X)
⊢ Measurable fun ω => (↑(Fintype.card (Signs n)))⁻¹ * ∑ σ, ⨆ i, |∑ k, ↑↑(σ k) * f i (X (ω.1 k))|

Tactic:
apply measurable_const.mul

Tactic state after:
[Ω : Type u
 inst✝¹ : MeasurableSpace Ω
 Z : Type w
 n : ℕ
 ι : Type u_1
 f : ι → Z → ℝ
 inst✝ : Countable ι
 X : Ω → Z
 hf : ∀ (i : ι), Measurable (f i ∘ X)
 ⊢ Measurable fun a => ∑ σ, ⨆ i, |∑ k, ↑↑(σ k) * f i (X (a.1 k))|]
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

theorem extracted_formal_statement_63.{u_1, w, u} {Ω : Type u} [inst : MeasurableSpace Ω] {Z : Type w} {n : ℕ}
  {ι : Type u_1} {f : ι → Z → ℝ} [inst_1 : Countable ι] {X : Ω → Z} (hf : ∀ (i : ι), Measurable (f i ∘ X)) :
  Measurable fun a => ∑ σ, ⨆ i, |∑ k, ↑↑(σ k) * f i (X (a.1 k))| := sorry

Tactic state before:
Ω : Type u
inst✝¹ : MeasurableSpace Ω
Z : Type w
n : ℕ
ι : Type u_1
f : ι → Z → ℝ
inst✝ : Countable ι
X : Ω → Z
hf : ∀ (i : ι), Measurable (f i ∘ X)
⊢ Measurable fun a => ∑ σ, ⨆ i, |∑ k, ↑↑(σ k) * f i (X (a.1 k))|

Tactic:
apply measurable_aux20 hf

Tactic state after:
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

theorem extracted_formal_statement_64.{u_1, w, u} {Ω : Type u} {Z : Type w} {n : ℕ} {ι : Type u_1} {f : ι → Z → ℝ}
  {X : Ω → Z} {b : ℝ} (hf' : ∀ (i : ι) (z : Z), |f i z| ≤ b) (i : ι) (ω : Fin n → Ω)
  (this : ∑ k, |f i (X (ω k))| ≤ ∑ k, b) (h_original_goal : ∑ k, |f i (X (ω k))| ≤ ↑n * b) : ∑ k, b ≤ ↑n * b := sorry

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

Tactic:
apply le_trans this _

Tactic state after:
[Ω : Type u
 Z : Type w
 n : ℕ
 ι : Type u_1
 f : ι → Z → ℝ
 X : Ω → Z
 b : ℝ
 hf' : ∀ (i : ι) (z : Z), |f i z| ≤ b
 i : ι
 ω : Fin n → Ω
 this : ∑ k, |f i (X (ω k))| ≤ ∑ k, b
 ⊢ ∑ k, b ≤ ↑n * b]
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

theorem extracted_formal_statement_65.{u_1, w, u} {Ω : Type u} {Z : Type w} {n : ℕ} {ι : Type u_1} {f : ι → Z → ℝ}
  {X : Ω → Z} {b : ℝ} (hf' : ∀ (i : ι) (z : Z), |f i z| ≤ b) (i : ι) (ω : Fin n → Ω)
  (this : ∑ k, |f i (X (ω k))| ≤ ∑ k, b) (h_original_goal : ∑ k, b ≤ ↑n * b) : ∑ k, b = ↑n * b := sorry

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

Tactic:
apply le_of_eq

Tactic state after:
[case hab
 Ω : Type u
 Z : Type w
 n : ℕ
 ι : Type u_1
 f : ι → Z → ℝ
 X : Ω → Z
 b : ℝ
 hf' : ∀ (i : ι) (z : Z), |f i z| ≤ b
 i : ι
 ω : Fin n → Ω
 this : ∑ k, |f i (X (ω k))| ≤ ∑ k, b
 ⊢ ∑ k, b = ↑n * b]
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

theorem extracted_formal_statement_66.{u_1, w, u} {Ω : Type u} {Z : Type w} {n : ℕ} {ι : Type u_1} {f : ι → Z → ℝ}
  {X : Ω → Z} {b : ℝ} (hf' : ∀ (i : ι) (z : Z), |f i z| ≤ b) (i : ι) (ω : Fin n → Ω)
  (this : ∑ k, |f i (X (ω k))| ≤ ∑ k, b) : ∑ k, b = ↑n * b := sorry

Tactic state before:
case hab
Ω : Type u
Z : Type w
n : ℕ
ι : Type u_1
f : ι → Z → ℝ
X : Ω → Z
b : ℝ
hf' : ∀ (i : ι) (z : Z), |f i z| ≤ b
i : ι
ω : Fin n → Ω
this : ∑ k, |f i (X (ω k))| ≤ ∑ k, b
⊢ ∑ k, b = ↑n * b

Tactic:
simp only [Finset.sum_const, Finset.card_univ, Fintype.card_fin, nsmul_eq_mul]

Tactic state after:
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

theorem extracted_formal_statement_67.{u_1, w, u} {Ω : Type u} {Z : Type w} {n : ℕ} {ι : Type u_1} {f : ι → Z → ℝ}
  {X : Ω → Z} {b : ℝ} (hf' : ∀ (i : ι) (z : Z), |f i z| ≤ b) (i : ι) (ω : Fin n → Ω) :
  ∑ k, |f i (X (ω k))| ≤ ∑ k, b := sorry

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

Tactic:
exact Finset.sum_le_sum fun k _ ↦ hf' i (X (ω k))

Tactic state after:
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

theorem extracted_formal_statement_68.{u_1, w, u} {Ω : Type u} {Z : Type w} {n : ℕ} {ι : Type u_1} {f : ι → Z → ℝ}
  (X : Ω → Z) {b : ℝ} (hf' : ∀ (i : ι) (z : Z), |f i z| ≤ b) (i : ι) (ω : Fin n → Ω) :
  ∑ σ, |f i (X (ω σ))| ≤ ↑n * b := sorry

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

Tactic:
apply sum_le_aux1 hf'

Tactic state after:
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

theorem extracted_formal_statement_69.{u_1, w, u} {Ω : Type u} {Z : Type w} {n : ℕ} {ι : Type u_1} {f : ι → Z → ℝ}
  {X : Ω → Z} {b : ℝ} (hf' : ∀ (i : ι) (z : Z), |f i z| ≤ b) (σ : Signs n) (i : ι) (ω : Fin n → Ω)
  (h_original_goal : |∑ k, ↑↑(σ k) * f i (X (ω k))| ≤ ↑n * b) :
  |∑ k, ↑↑(σ k) * f i (X (ω k))| ≤ ∑ k, |↑↑(σ k) * f i (X (ω k))| := sorry

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

Tactic:
apply le_trans _ (sum_le_aux2 X hf' σ i ω)

Tactic state after:
[Ω : Type u
 Z : Type w
 n : ℕ
 ι : Type u_1
 f : ι → Z → ℝ
 X : Ω → Z
 b : ℝ
 hf' : ∀ (i : ι) (z : Z), |f i z| ≤ b
 σ : Signs n
 i : ι
 ω : Fin n → Ω
 ⊢ |∑ k, ↑↑(σ k) * f i (X (ω k))| ≤ ∑ k, |↑↑(σ k) * f i (X (ω k))|]
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

theorem extracted_formal_statement_70.{u_1, w, u} {Ω : Type u} {Z : Type w} {n : ℕ} {ι : Type u_1} {f : ι → Z → ℝ}
  {X : Ω → Z} {b : ℝ} (hf' : ∀ (i : ι) (z : Z), |f i z| ≤ b) (σ : Signs n) (i : ι) (ω : Fin n → Ω) :
  |∑ k, ↑↑(σ k) * f i (X (ω k))| ≤ ∑ k, |↑↑(σ k) * f i (X (ω k))| := sorry

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

Tactic:
apply Finset.abs_sum_le_sum_abs

Tactic state after:
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

theorem extracted_formal_statement_71.{u_1, w, u} {Ω : Type u} {Z : Type w} {n : ℕ} {ι : Type u_1} {f : ι → Z → ℝ}
  {X : Ω → Z} {b : ℝ} (hf' : ∀ (i : ι) (z : Z), |f i z| ≤ b) (σ : Signs n) (ω : Fin 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 → ℝ
X : Ω → Z
b : ℝ
hf' : ∀ (i : ι) (z : Z), |f i z| ≤ b
σ : Signs n
ω : Fin 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 → ℝ
 X : Ω → Z
 b : ℝ
 hf' : ∀ (i : ι) (z : Z), |f i z| ≤ b
 σ : Signs n
 ω : Fin 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_72.{u_1, w, u} {Ω : Type u} {Z : Type w} {n : ℕ} {ι : Type u_1} {f : ι → Z → ℝ}
  {X : Ω → Z} {b : ℝ} (hf' : ∀ (i : ι) (z : Z), |f i z| ≤ b) (σ : Signs n) (ω : Fin 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 → ℝ
X : Ω → Z
b : ℝ
hf' : ∀ (i : ι) (z : Z), |f i z| ≤ b
σ : Signs n
ω : Fin 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 → ℝ
 X : Ω → Z
 b : ℝ
 hf' : ∀ (i : ι) (z : Z), |f i z| ≤ b
 σ : Signs n
 ω : Fin 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_73.{u_1, w, u} {Ω : Type u} {Z : Type w} {n : ℕ} {ι : Type u_1} {f : ι → Z → ℝ}
  {X : Ω → Z} {b : ℝ} (hf' : ∀ (i : ι) (z : Z), |f i z| ≤ b) (σ : Signs n) (ω : Fin 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 → ℝ
X : Ω → Z
b : ℝ
hf' : ∀ (i : ι) (z : Z), |f i z| ≤ b
σ : Signs n
ω : Fin 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 sum_le_aux2 X hf'

Tactic state after:
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

theorem extracted_formal_statement_74.{u_1, w, u} {Ω : Type u} {Z : Type w} {n : ℕ} {ι : Type u_1} {f : ι → Z → ℝ}
  {X : Ω → Z} {b : ℝ} (hf' : ∀ (i : ι) (z : Z), |f i z| ≤ b) (σ : Signs n) (ω : Fin 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 → ℝ
X : Ω → Z
b : ℝ
hf' : ∀ (i : ι) (z : Z), |f i z| ≤ b
σ : Signs n
ω : Fin 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 → ℝ
 X : Ω → Z
 b : ℝ
 hf' : ∀ (i : ι) (z : Z), |f i z| ≤ b
 σ : Signs n
 ω : Fin 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_75.{u_1, w, u} {Ω : Type u} {Z : Type w} {n : ℕ} {ι : Type u_1} {f : ι → Z → ℝ}
  {X : Ω → Z} {b : ℝ} (hf' : ∀ (i : ι) (z : Z), |f i z| ≤ b) (σ : Signs n) (ω : Fin 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 → ℝ
X : Ω → Z
b : ℝ
hf' : ∀ (i : ι) (z : Z), |f i z| ≤ b
σ : Signs n
ω : Fin 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 → ℝ
 X : Ω → Z
 b : ℝ
 hf' : ∀ (i : ι) (z : Z), |f i z| ≤ b
 σ : Signs n
 ω : Fin 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_76.{u_1, w, u} {Ω : Type u} {Z : Type w} {n : ℕ} {ι : Type u_1} {f : ι → Z → ℝ}
  {X : Ω → Z} {b : ℝ} (hf' : ∀ (i : ι) (z : Z), |f i z| ≤ b) (σ : Signs n) (ω : Fin 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 → ℝ
X : Ω → Z
b : ℝ
hf' : ∀ (i : ι) (z : Z), |f i z| ≤ b
σ : Signs n
ω : Fin 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 sum_le_aux3 hf'

Tactic state after:
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

theorem extracted_formal_statement_77.{u_1, w, u} {Ω : Type u} {Z : Type w} {n : ℕ} {ι : Type u_1} {f : ι → Z → ℝ}
  {X : Ω → Z} {b : ℝ} (hb : 0 ≤ b) (hf' : ∀ (i : ι) (z : Z), |f i z| ≤ b) (ω : Fin n → Ω) :
  |∑ σ, ⨆ i, |∑ k, ↑↑(σ k) * f i (X (ω k))|| ≤ ∑ σ, |⨆ i, |∑ k, ↑↑(σ k) * f i (X (ω k))|| := sorry

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

Tactic:
apply Finset.abs_sum_le_sum_abs

Tactic state after:
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

theorem extracted_formal_statement_78.{u_1, w, u} {Ω : Type u} {Z : Type w} {n : ℕ} {ι : Type u_1} {f : ι → Z → ℝ}
  {X : Ω → Z} {b : ℝ} (hb : 0 ≤ b) (hf' : ∀ (i : ι) (z : Z), |f i z| ≤ b) (ω : Fin n → Ω)
  (h_original_goal : ∑ σ, |⨆ i, |∑ k, ↑↑(σ k) * f i (X (ω k))|| ≤ ∑ σ, ⨆ i, |(|∑ k, ↑↑(σ k) * f i (X (ω k))|)|)
  (i : Signs n) :
  i ∈ Finset.univ → |⨆ i_1, |∑ k, ↑↑(i k) * f i_1 (X (ω k))|| ≤ ⨆ i_1, |(|∑ k, ↑↑(i k) * f i_1 (X (ω k))|)| := sorry

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

Tactic:
apply Finset.sum_le_sum

Tactic state after:
[case h
 Ω : Type u
 Z : Type w
 n : ℕ
 ι : Type u_1
 f : ι → Z → ℝ
 X : Ω → Z
 b : ℝ
 hb : 0 ≤ b
 hf' : ∀ (i : ι) (z : Z), |f i z| ≤ b
 ω : Fin n → Ω
 ⊢ ∀ i ∈ Finset.univ, |⨆ i_1, |∑ k, ↑↑(i k) * f i_1 (X (ω k))|| ≤ ⨆ i_1, |(|∑ k, ↑↑(i k) * f i_1 (X (ω k))|)|]
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

theorem extracted_formal_statement_79.{u_1, w, u} {Ω : Type u} {Z : Type w} {n : ℕ} {ι : Type u_1} {f : ι → Z → ℝ}
  {X : Ω → Z} {b : ℝ} (hb : 0 ≤ 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))|| ≤ ⨆ i, |(|∑ k, ↑↑(σ k) * f i (X (ω k))|)|) :
  |⨆ i, |∑ k, ↑↑(σ k) * f i (X (ω k))|| ≤ ⨆ i, |∑ k, ↑↑(σ k) * f i (X (ω k))| := sorry

Tactic state before:
case h
Ω : Type u
Z : Type w
n : ℕ
ι : Type u_1
f : ι → Z → ℝ
X : Ω → Z
b : ℝ
hb : 0 ≤ b
hf' : ∀ (i : ι) (z : Z), |f i z| ≤ b
ω : Fin n → Ω
σ : Signs n
a✝ : σ ∈ Finset.univ
⊢ |⨆ i, |∑ k, ↑↑(σ k) * f i (X (ω k))|| ≤ ⨆ i, |(|∑ k, ↑↑(σ k) * f i (X (ω k))|)|

Tactic:
simp only [Int.reduceNeg, abs_abs]

Tactic state after:
[case h
 Ω : Type u
 Z : Type w
 n : ℕ
 ι : Type u_1
 f : ι → Z → ℝ
 X : Ω → Z
 b : ℝ
 hb : 0 ≤ b
 hf' : ∀ (i : ι) (z : Z), |f i z| ≤ b
 ω : Fin n → Ω
 σ : Signs n
 a✝ : σ ∈ Finset.univ
 ⊢ |⨆ i, |∑ k, ↑↑(σ k) * f i (X (ω k))|| ≤ ⨆ i, |∑ k, ↑↑(σ k) * f i (X (ω k))|]
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

theorem extracted_formal_statement_80.{u_1, w, u} {Ω : Type u} {Z : Type w} {n : ℕ} {ι : Type u_1} {f : ι → Z → ℝ}
  {X : Ω → Z} {b : ℝ} (hb : 0 ≤ 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))|| ≤ ⨆ i, |∑ k, ↑↑(σ k) * f i (X (ω k))|) :
  |⨆ i, |∑ k, ↑↑(σ k) * f i (X (ω k))|| = ⨆ i, |∑ k, ↑↑(σ k) * f i (X (ω k))| := sorry

Tactic state before:
case h
Ω : Type u
Z : Type w
n : ℕ
ι : Type u_1
f : ι → Z → ℝ
X : Ω → Z
b : ℝ
hb : 0 ≤ b
hf' : ∀ (i : ι) (z : Z), |f i z| ≤ b
ω : Fin n → Ω
σ : Signs n
a✝ : σ ∈ Finset.univ
⊢ |⨆ i, |∑ k, ↑↑(σ k) * f i (X (ω k))|| ≤ ⨆ i, |∑ k, ↑↑(σ k) * f i (X (ω k))|

Tactic:
apply Eq.le

Tactic state after:
[case h.hab
 Ω : Type u
 Z : Type w
 n : ℕ
 ι : Type u_1
 f : ι → Z → ℝ
 X : Ω → Z
 b : ℝ
 hb : 0 ≤ b
 hf' : ∀ (i : ι) (z : Z), |f i z| ≤ b
 ω : Fin n → Ω
 σ : Signs n
 a✝ : σ ∈ Finset.univ
 ⊢ |⨆ i, |∑ k, ↑↑(σ k) * f i (X (ω k))|| = ⨆ i, |∑ k, ↑↑(σ k) * f i (X (ω k))|]
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

theorem extracted_formal_statement_81.{u_1, w, u} {Ω : Type u} {Z : Type w} {n : ℕ} {ι : Type u_1} {f : ι → Z → ℝ}
  {X : Ω → Z} {b : ℝ} (hb : 0 ≤ 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))|| = ⨆ i, |∑ k, ↑↑(σ k) * f i (X (ω k))|) :
  0 ≤ ⨆ i, |∑ k, ↑↑(σ k) * f i (X (ω k))| := sorry

Tactic state before:
case h.hab
Ω : Type u
Z : Type w
n : ℕ
ι : Type u_1
f : ι → Z → ℝ
X : Ω → Z
b : ℝ
hb : 0 ≤ b
hf' : ∀ (i : ι) (z : Z), |f i z| ≤ b
ω : Fin n → Ω
σ : Signs n
a✝ : σ ∈ Finset.univ
⊢ |⨆ i, |∑ k, ↑↑(σ k) * f i (X (ω k))|| = ⨆ i, |∑ k, ↑↑(σ k) * f i (X (ω k))|

Tactic:
simp only [Int.reduceNeg, abs_eq_self]

Tactic state after:
[case h.hab
 Ω : Type u
 Z : Type w
 n : ℕ
 ι : Type u_1
 f : ι → Z → ℝ
 X : Ω → Z
 b : ℝ
 hb : 0 ≤ b
 hf' : ∀ (i : ι) (z : Z), |f i z| ≤ b
 ω : Fin n → Ω
 σ : Signs n
 a✝ : σ ∈ Finset.univ
 ⊢ 0 ≤ ⨆ i, |∑ k, ↑↑(σ k) * f i (X (ω k))|]