zzhisthebest/LeanBenchmark huggingface dataset:
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

theorem extracted_formal_statement_188.{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, ↑↑(σ k) * f i (X (ω k).1)|| ≤ ↑n * b * 2 ^ n) :
  |∑ σ, ⨆ i, |∑ k, ↑↑(σ k) * f i (X (ω k).1)|| ≤ 2 ^ n * (↑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 → Ω × Ω
⊢ |∑ σ, ⨆ i, |∑ k, ↑↑(σ k) * f i (X (ω k).1)|| ≤ ↑n * b * 2 ^ n

Tactic:
rw [mul_comm (↑n * b)]

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)|| ≤ 2 ^ n * (↑n * b)]
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

theorem extracted_formal_statement_189.{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 → Ω × Ω) : |∑ σ, ⨆ i, |∑ k, ↑↑(σ k) * f i (X (ω k).1)|| ≤ 2 ^ n * (↑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 → Ω × Ω
⊢ |∑ σ, ⨆ i, |∑ k, ↑↑(σ k) * f i (X (ω k).1)|| ≤ 2 ^ n * (↑n * b)

Tactic:
apply integrable_aux2_aux hb hf'

Tactic state after:
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

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

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


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

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

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


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

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

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


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

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

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


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

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

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


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

theorem extracted_formal_statement_195.{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).2) := 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).2)

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

Tactic state after:
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

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


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

theorem extracted_formal_statement_197.{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).2)|) 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).2)|‖ ≤ ↑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).2)|) 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).2)|‖ ≤ ↑n * b]
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

theorem extracted_formal_statement_198.{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).2)|‖ ≤ ↑n * b) :
  (2 ^ n)⁻¹ * |∑ σ, ⨆ i, |∑ k, ↑↑(σ k) * f i (X (ω k).2)|| ≤ ↑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).2)|‖ ≤ ↑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).2)|| ≤ ↑n * b]
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

theorem extracted_formal_statement_199.{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).2)|| ≤ ↑n * b) :
  |∑ σ, ⨆ i, |∑ k, ↑↑(σ k) * f i (X (ω k).2)|| ≤ ↑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).2)|| ≤ ↑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).2)|| ≤ ↑n * b * 2 ^ n]
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

theorem extracted_formal_statement_200.{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, ↑↑(σ k) * f i (X (ω k).2)|| ≤ ↑n * b * 2 ^ n) :
  |∑ σ, ⨆ i, |∑ k, ↑↑(σ k) * f i (X (ω k).2)|| ≤ 2 ^ n * (↑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 → Ω × Ω
⊢ |∑ σ, ⨆ i, |∑ k, ↑↑(σ k) * f i (X (ω k).2)|| ≤ ↑n * b * 2 ^ n

Tactic:
rw [mul_comm (↑n * b)]

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).2)|| ≤ 2 ^ n * (↑n * b)]
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

theorem extracted_formal_statement_201.{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 → Ω × Ω) : |∑ σ, ⨆ i, |∑ k, ↑↑(σ k) * f i (X (ω k).2)|| ≤ 2 ^ n * (↑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 → Ω × Ω
⊢ |∑ σ, ⨆ i, |∑ k, ↑↑(σ k) * f i (X (ω k).2)|| ≤ 2 ^ n * (↑n * b)

Tactic:
apply integrable_aux2_aux hb hf'

Tactic state after:
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

theorem extracted_formal_statement_202.{u_1, w, u} {Ω : Type u} [inst : MeasurableSpace Ω] {Z : Type w} {n : ℕ}
  {ι : Type u_1} {f : ι → Z → ℝ} {μ : Measure Ω} [inst_1 : IsProbabilityMeasure μ] {X : Ω → Z} [inst_2 : Nonempty ι]
  [inst_3 : Countable ι] (hf : ∀ (i : ι), Measurable (f i ∘ X)) {b : ℝ} (hf' : ∀ (i : ι) (z : Z), |f i z| ≤ b)
  (h_original_goal :
    AEStronglyMeasurable
      (fun a => ⨆ i, |∫ (x : Fin n → Ω), ∑ k, (f i (X (a k)) - f i (X (x k))) ∂Measure.pi fun x => μ|)
      (Measure.pi fun x => μ)) :
  Measurable fun a => ⨆ i, |∫ (x : Fin n → Ω), ∑ k, (f i (X (a k)) - f i (X (x k))) ∂Measure.pi fun x => μ| := sorry

Tactic state before:
case left
Ω : Type u
inst✝¹ : MeasurableSpace Ω
Z : Type w
n : ℕ
ι : Type u_1
f : ι → Z → ℝ
μ : Measure Ω
inst✝ : IsProbabilityMeasure μ
X : Ω → Z
inst_2 : Nonempty ι
inst_3 : Countable ι
hf : ∀ (i : ι), Measurable (f i ∘ X)
b : ℝ
hf' : ∀ (i : ι) (z : Z), |f i z| ≤ b
⊢ AEStronglyMeasurable (fun a => ⨆ i, |∫ (x : Fin n → Ω), ∑ k, (f i (X (a k)) - f i (X (x k))) ∂Measure.pi fun x => μ|)
    (Measure.pi fun x => μ)

Tactic:
apply Measurable.aestronglyMeasurable

Tactic state after:
[case left.hf
 Ω : Type u
 inst✝¹ : MeasurableSpace Ω
 Z : Type w
 n : ℕ
 ι : Type u_1
 f : ι → Z → ℝ
 μ : Measure Ω
 inst✝ : IsProbabilityMeasure μ
 X : Ω → Z
 inst_2 : Nonempty ι
 inst_3 : Countable ι
 hf : ∀ (i : ι), Measurable (f i ∘ X)
 b : ℝ
 hf' : ∀ (i : ι) (z : Z), |f i z| ≤ b
 ⊢ Measurable fun a => ⨆ i, |∫ (x : Fin n → Ω), ∑ k, (f i (X (a k)) - f i (X (x k))) ∂Measure.pi fun x => μ|]
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

theorem extracted_formal_statement_203.{u_1, w, u} {Ω : Type u} [inst : MeasurableSpace Ω] {Z : Type w} {n : ℕ}
  {ι : Type u_1} {f : ι → Z → ℝ} {μ : Measure Ω} [inst_1 : IsProbabilityMeasure μ] {X : Ω → Z} [inst_2 : Nonempty ι]
  [inst_3 : Countable ι] (hf : ∀ (i : ι), Measurable (f i ∘ X)) {b : ℝ} (hf' : ∀ (i : ι) (z : Z), |f i z| ≤ b) :
  Measurable fun a => ⨆ i, |∫ (x : Fin n → Ω), ∑ k, (f i (X (a k)) - f i (X (x k))) ∂Measure.pi fun x => μ| := sorry

Tactic state before:
case left.hf
Ω : Type u
inst✝¹ : MeasurableSpace Ω
Z : Type w
n : ℕ
ι : Type u_1
f : ι → Z → ℝ
μ : Measure Ω
inst✝ : IsProbabilityMeasure μ
X : Ω → Z
inst_2 : Nonempty ι
inst_3 : Countable ι
hf : ∀ (i : ι), Measurable (f i ∘ X)
b : ℝ
hf' : ∀ (i : ι) (z : Z), |f i z| ≤ b
⊢ Measurable fun a => ⨆ i, |∫ (x : Fin n → Ω), ∑ k, (f i (X (a k)) - f i (X (x k))) ∂Measure.pi fun x => μ|

Tactic:
apply measurable_aux10 hf

Tactic state after:
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

theorem extracted_formal_statement_204.{u_1, w, u} {Ω : Type u} [inst : MeasurableSpace Ω] {Z : Type w} {n : ℕ}
  {ι : Type u_1} {f : ι → Z → ℝ} {μ : Measure Ω} [inst_1 : IsProbabilityMeasure μ] {X : Ω → Z} [inst_2 : Nonempty ι]
  [inst_3 : Countable ι] (hf : ∀ (i : ι), Measurable (f i ∘ X)) {b : ℝ} (hf' : ∀ (i : ι) (z : Z), |f i z| ≤ b)
  (h_original_goal :
    HasFiniteIntegral (fun a => ⨆ i, |∫ (x : Fin n → Ω), ∑ k, (f i (X (a k)) - f i (X (x k))) ∂Measure.pi fun x => μ|)
      (Measure.pi fun x => μ)) :
  ∀ᵐ (a : Fin n → Ω) ∂Measure.pi fun x => μ,
    ‖⨆ i, |∫ (x : Fin n → Ω), ∑ k, (f i (X (a k)) - f i (X (x k))) ∂Measure.pi fun x => μ|‖ ≤ ↑n * (b + b) := sorry

Tactic state before:
case right
Ω : Type u
inst✝¹ : MeasurableSpace Ω
Z : Type w
n : ℕ
ι : Type u_1
f : ι → Z → ℝ
μ : Measure Ω
inst✝ : IsProbabilityMeasure μ
X : Ω → Z
inst_2 : Nonempty ι
inst_3 : Countable ι
hf : ∀ (i : ι), Measurable (f i ∘ X)
b : ℝ
hf' : ∀ (i : ι) (z : Z), |f i z| ≤ b
⊢ HasFiniteIntegral (fun a => ⨆ i, |∫ (x : Fin n → Ω), ∑ k, (f i (X (a k)) - f i (X (x k))) ∂Measure.pi fun x => μ|)
    (Measure.pi fun x => μ)

Tactic:
apply @MeasureTheory.hasFiniteIntegral_of_bounded _ _ _ _ _ _ _ (n * (b + b))

Tactic state after:
[case right
 Ω : Type u
 inst✝¹ : MeasurableSpace Ω
 Z : Type w
 n : ℕ
 ι : Type u_1
 f : ι → Z → ℝ
 μ : Measure Ω
 inst✝ : IsProbabilityMeasure μ
 X : Ω → Z
 inst_2 : Nonempty ι
 inst_3 : Countable ι
 hf : ∀ (i : ι), Measurable (f i ∘ X)
 b : ℝ
 hf' : ∀ (i : ι) (z : Z), |f i z| ≤ b
 ⊢ ∀ᵐ (a : Fin n → Ω) ∂Measure.pi fun x => μ,
     ‖⨆ i, |∫ (x : Fin n → Ω), ∑ k, (f i (X (a k)) - f i (X (x k))) ∂Measure.pi fun x => μ|‖ ≤ ↑n * (b + b)]
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

theorem extracted_formal_statement_205.{u_1, w, u} {Ω : Type u} [inst : MeasurableSpace Ω] {Z : Type w} {n : ℕ}
  {ι : Type u_1} {f : ι → Z → ℝ} {μ : Measure Ω} [inst_1 : IsProbabilityMeasure μ] {X : Ω → Z} [inst_2 : Nonempty ι]
  [inst_3 : Countable ι] (hf : ∀ (i : ι), Measurable (f i ∘ X)) {b : ℝ} (hf' : ∀ (i : ι) (z : Z), |f i z| ≤ b)
  (ω' : Fin n → Ω) (i : ι)
  (h_original_goal :
    |(|∫ (x : Fin n → Ω), ∑ k, (f i (X (ω' k)) - f i (X (x k))) ∂Measure.pi fun x => μ|)| ≤ ↑n * (b + b)) :
  |∫ (x : Fin n → Ω), ∑ x, f i (X (ω' x)) - ∑ x_1, f i (X (x x_1)) ∂Measure.pi fun x => μ| ≤ ↑n * (b + b) := sorry

Tactic state before:
case hf.right.h.hf
Ω : Type u
inst✝¹ : MeasurableSpace Ω
Z : Type w
n : ℕ
ι : Type u_1
f : ι → Z → ℝ
μ : Measure Ω
inst✝ : IsProbabilityMeasure μ
X : Ω → Z
inst_2 : Nonempty ι
inst_3 : Countable ι
hf : ∀ (i : ι), Measurable (f i ∘ X)
b : ℝ
hf' : ∀ (i : ι) (z : Z), |f i z| ≤ b
ω' : Fin n → Ω
i : ι
⊢ |(|∫ (x : Fin n → Ω), ∑ k, (f i (X (ω' k)) - f i (X (x k))) ∂Measure.pi fun x => μ|)| ≤ ↑n * (b + b)

Tactic:
simp only [Finset.sum_sub_distrib, abs_abs]

Tactic state after:
[case hf.right.h.hf
 Ω : Type u
 inst✝¹ : MeasurableSpace Ω
 Z : Type w
 n : ℕ
 ι : Type u_1
 f : ι → Z → ℝ
 μ : Measure Ω
 inst✝ : IsProbabilityMeasure μ
 X : Ω → Z
 inst_2 : Nonempty ι
 inst_3 : Countable ι
 hf : ∀ (i : ι), Measurable (f i ∘ X)
 b : ℝ
 hf' : ∀ (i : ι) (z : Z), |f i z| ≤ b
 ω' : Fin n → Ω
 i : ι
 ⊢ |∫ (x : Fin n → Ω), ∑ x, f i (X (ω' x)) - ∑ x_1, f i (X (x x_1)) ∂Measure.pi fun x => μ| ≤ ↑n * (b + b)]