zzhisthebest/LeanBenchmark huggingface dataset:
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

theorem extracted_formal_statement_170.{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 : Nonempty ι) (h_original_goal : ⨆ i, ∑ k, (|f i (X (ω k).1)| + |f i (X (ω k).2)|) ≤ ↑n * (b + b)) (x : ι) :
  ∑ k, (|f x (X (ω k).1)| + |f x (X (ω k).2)|) ≤ ↑n * (b + b) := sorry

Tactic state before:
case pos
Ω : 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)

Tactic:
apply ciSup_le

Tactic state after:
[case pos.H
 Ω : 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 ι
 ⊢ ∀ (x : ι), ∑ k, (|f x (X (ω k).1)| + |f x (X (ω k).2)|) ≤ ↑n * (b + b)]
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

theorem extracted_formal_statement_171.{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 : Nonempty ι) (i : ι) (this : ∑ k, (|f i (X (ω k).1)| + |f i (X (ω k).2)|) ≤ ∑ k, (b + b))
  (h_original_goal : ∑ k, (|f i (X (ω k).1)| + |f i (X (ω k).2)|) ≤ ↑n * (b + b)) : ∑ k, (b + b) ≤ ↑n * (b + b) := sorry

Tactic 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
h : Nonempty ι
i : ι
this : ∑ k, (|f i (X (ω k).1)| + |f i (X (ω k).2)|) ≤ ∑ k, (b + b)
⊢ ∑ k, (|f i (X (ω k).1)| + |f i (X (ω k).2)|) ≤ ↑n * (b + b)

Tactic:
apply le_trans this _

Tactic state after:
[Ω : 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 : ι
 this : ∑ k, (|f i (X (ω k).1)| + |f i (X (ω k).2)|) ≤ ∑ k, (b + b)
 ⊢ ∑ k, (b + b) ≤ ↑n * (b + b)]
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

theorem extracted_formal_statement_172.{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 : Nonempty ι) (i : ι) (this : ∑ k, (|f i (X (ω k).1)| + |f i (X (ω k).2)|) ≤ ∑ k, (b + b))
  (h_original_goal : ∑ k, (b + b) ≤ ↑n * (b + b)) : ∑ k, (b + b) = ↑n * (b + b) := sorry

Tactic 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
h : Nonempty ι
i : ι
this : ∑ k, (|f i (X (ω k).1)| + |f i (X (ω k).2)|) ≤ ∑ k, (b + b)
⊢ ∑ k, (b + b) ≤ ↑n * (b + b)

Tactic:
apply le_of_eq

Tactic state after:
[case hab
 Ω : 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 : ι
 this : ∑ k, (|f i (X (ω k).1)| + |f i (X (ω k).2)|) ≤ ∑ k, (b + b)
 ⊢ ∑ k, (b + b) = ↑n * (b + b)]
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

theorem extracted_formal_statement_173.{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 : Nonempty ι) (i : ι) (this : ∑ k, (|f i (X (ω k).1)| + |f i (X (ω k).2)|) ≤ ∑ k, (b + b))
  (h_original_goal : ∑ k, (b + b) = ↑n * (b + b)) : ↑n * b + ↑n * b = ↑n * (b + b) := sorry

Tactic state before:
case hab
Ω : 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 : ι
this : ∑ k, (|f i (X (ω k).1)| + |f i (X (ω k).2)|) ≤ ∑ k, (b + b)
⊢ ∑ k, (b + b) = ↑n * (b + b)

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

Tactic state after:
[case hab
 Ω : 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 : ι
 this : ∑ k, (|f i (X (ω k).1)| + |f i (X (ω k).2)|) ≤ ∑ k, (b + b)
 ⊢ ↑n * b + ↑n * b = ↑n * (b + b)]
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

theorem extracted_formal_statement_174.{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 : Nonempty ι) (i : ι) : ∑ k, (|f i (X (ω k).1)| + |f i (X (ω k).2)|) ≤ ∑ k, (b + b) := sorry

Tactic state before:
case pos.H
Ω : 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)|) ≤ ∑ k, (b + b)

Tactic:
apply Finset.sum_le_sum fun k _ ↦ add_le_add (hf' i (X (ω k).1)) (hf' i (X (ω k).2))

Tactic state after:
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

theorem extracted_formal_statement_175.{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 : IsEmpty ι) (h_original_goal : ⨆ i, ∑ k, (|f i (X (ω k).1)| + |f i (X (ω k).2)|) ≤ ↑n * (b + b)) :
  0 ≤ ↑n * (b + b) := sorry

Tactic state before:
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 : IsEmpty ι
⊢ ⨆ i, ∑ k, (|f i (X (ω k).1)| + |f i (X (ω k).2)|) ≤ ↑n * (b + b)

Tactic:
simp only [iSup_of_isEmpty]

Tactic 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 : IsEmpty ι
 ⊢ 0 ≤ ↑n * (b + b)]
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

theorem extracted_formal_statement_176.{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) (h : IsEmpty ι)
  (h_original_goal : 0 ≤ ↑n * (b + b)) : 0 ≤ b + b := sorry

Tactic state before:
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 : IsEmpty ι
⊢ 0 ≤ ↑n * (b + b)

Tactic:
apply mul_nonneg (Nat.cast_nonneg n)

Tactic 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 : IsEmpty ι
 ⊢ 0 ≤ b + b]
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

theorem extracted_formal_statement_177.{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) (h : IsEmpty ι) :
  0 ≤ b + b := sorry

Tactic state before:
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 : IsEmpty ι
⊢ 0 ≤ b + b

Tactic:
exact Left.add_nonneg hb hb

Tactic state after:
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

theorem extracted_formal_statement_178.{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 (ω k).1)|) :
  Measurable fun a => ∑ σ, ⨆ i, |∑ k, ↑↑(σ k) * f i (X (a k).1)| := 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 (ω k).1)|

Tactic:
apply Measurable.mul measurable_const

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 k).1)|]
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

theorem extracted_formal_statement_179.{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 a => ∑ σ, ⨆ i, |∑ k, ↑↑(σ k) * f i (X (a k).1)|) (i : Signs n) :
  i ∈ Finset.univ → Measurable fun a => ⨆ i_1, |∑ k, ↑↑(i k) * f i_1 (X (a k).1)| := 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 k).1)|

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 k).1)|]
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

theorem extracted_formal_statement_180.{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 k).1)|) (i : ι) :
  Measurable fun b => |∑ k, ↑↑(σ k) * f i (X (b k).1)| := 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 k).1)|

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 k).1)|]
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

theorem extracted_formal_statement_181.{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 k).1)|) :
  Measurable fun x => ∑ k, ↑↑(σ k) * f i (X (x k).1) := 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 k).1)|

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 k).1)]
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

theorem extracted_formal_statement_182.{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 k).1)) : Measurable fun a => f i (X (a k).1) := 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 k).1)

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 k).1)]
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

theorem extracted_formal_statement_183.{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 k).1) := 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 k).1)

Tactic:
apply (hf i).comp (measurable_pi_apply k).fst

Tactic state after:
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

theorem extracted_formal_statement_184.{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)
  (h_original_goal :
    Integrable (fun ω => (↑(Fintype.card (Signs n)))⁻¹ * ∑ σ, ⨆ i, |∑ k, ↑↑(σ k) * f i (X (ω k).1)|)
      (Measure.pi fun x => μ.prod μ)) :
  MemLp (fun ω => (↑(Fintype.card (Signs n)))⁻¹ * ∑ σ, ⨆ i, |∑ k, ↑↑(σ k) * f i (X (ω k).1)|) 1
    (Measure.pi fun x => μ.prod μ) := sorry

Tactic 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
⊢ Integrable (fun ω => (↑(Fintype.card (Signs n)))⁻¹ * ∑ σ, ⨆ i, |∑ k, ↑↑(σ k) * f i (X (ω k).1)|)
    (Measure.pi fun x => μ.prod μ)

Tactic:
rw [← memLp_one_iff_integrable]

Tactic state after:
[Ω : 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
 ⊢ MemLp (fun ω => (↑(Fintype.card (Signs n)))⁻¹ * ∑ σ, ⨆ i, |∑ k, ↑↑(σ k) * f i (X (ω k).1)|) 1
     (Measure.pi fun x => μ.prod μ)]
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

theorem extracted_formal_statement_185.{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)
  (h_original_goal :
    MemLp (fun ω => (↑(Fintype.card (Signs n)))⁻¹ * ∑ σ, ⨆ i, |∑ k, ↑↑(σ k) * f i (X (ω k).1)|) 1
      (Measure.pi fun x => μ.prod μ)) :
  ∀ᵐ (x : Fin n → Ω × Ω) ∂Measure.pi fun x => μ.prod μ,
    ‖(↑(Fintype.card (Signs n)))⁻¹ * ∑ σ, ⨆ i, |∑ k, ↑↑(σ k) * f i (X (x k).1)|‖ ≤ ↑n * b := sorry

Tactic 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
⊢ MemLp (fun ω => (↑(Fintype.card (Signs n)))⁻¹ * ∑ σ, ⨆ i, |∑ k, ↑↑(σ k) * f i (X (ω k).1)|) 1
    (Measure.pi fun x => μ.prod μ)

Tactic:
apply MemLp.of_bound (measurable_aux4 hf).aestronglyMeasurable (n * b)

Tactic state after:
[Ω : 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
 ⊢ ∀ᵐ (x : Fin n → Ω × Ω) ∂Measure.pi fun x => μ.prod μ,
     ‖(↑(Fintype.card (Signs n)))⁻¹ * ∑ σ, ⨆ i, |∑ k, ↑↑(σ k) * f i (X (x k).1)|‖ ≤ ↑n * b]
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

theorem extracted_formal_statement_186.{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 : ‖(↑(Fintype.card (Signs n)))⁻¹ * ∑ σ, ⨆ i, |∑ k, ↑↑(σ k) * f i (X (ω k).1)|‖ ≤ ↑n * b) :
  (2 ^ n)⁻¹ * |∑ σ, ⨆ i, |∑ k, ↑↑(σ k) * f i (X (ω k).1)|| ≤ ↑n * b := sorry

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

Tactic:
simp only [Signs.card, Nat.cast_pow, Nat.cast_ofNat, Int.reduceNeg, norm_mul, norm_inv, norm_pow,
  norm_ofNat, norm_eq_abs]

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


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

theorem extracted_formal_statement_187.{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 : (2 ^ n)⁻¹ * |∑ σ, ⨆ i, |∑ k, ↑↑(σ k) * f i (X (ω k).1)|| ≤ ↑n * b) :
  |∑ σ, ⨆ i, |∑ k, ↑↑(σ k) * f i (X (ω k).1)|| ≤ ↑n * b * 2 ^ n := sorry

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

Tactic:
rw [inv_mul_le_iff₀' (by simp)]

Tactic state after:
[case h
 Ω : 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 → Ω × Ω
 ⊢ |∑ σ, ⨆ i, |∑ k, ↑↑(σ k) * f i (X (ω k).1)|| ≤ ↑n * b * 2 ^ n]