zzhisthebest/LeanBenchmark huggingface dataset:
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

theorem extracted_formal_statement_307.{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 → Ω)
  (this :
    (∫ (x : Fin n → Ω), ‖⨆ i, |∑ k, (f i (X (ω k)) - f i (X (x k)))|‖ ∂Measure.pi fun x => μ) ≤
      ∫ (x : Fin n → Ω), ⨆ i, ∑ k, (b + b) ∂Measure.pi fun x => μ)
  (h_original_goal : (∫ (x : Fin n → Ω), ⨆ i, ∑ k, (b + b) ∂Measure.pi fun x => μ) = ↑n * (b + b)) :
  ↑n * b + ↑n * b = ↑n * (b + b) := sorry

Tactic state before:
Ω : 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 → Ω
this :
  (∫ (x : Fin n → Ω), ‖⨆ i, |∑ k, (f i (X (ω k)) - f i (X (x k)))|‖ ∂Measure.pi fun x => μ) ≤
    ∫ (x : Fin n → Ω), ⨆ i, ∑ k, (b + b) ∂Measure.pi fun x => μ
⊢ (∫ (x : Fin n → Ω), ⨆ i, ∑ k, (b + b) ∂Measure.pi fun x => μ) = ↑n * (b + b)

Tactic:
simp only [Finset.sum_const, Finset.card_univ, Fintype.card_fin, smul_add, nsmul_eq_mul, ciSup_const,
  integral_const, measure_univ, ENNReal.one_toReal, smul_eq_mul, one_mul]

Tactic state after:
[Ω : 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 → Ω
 this :
   (∫ (x : Fin n → Ω), ‖⨆ i, |∑ k, (f i (X (ω k)) - f i (X (x k)))|‖ ∂Measure.pi fun x => μ) ≤
     ∫ (x : Fin n → Ω), ⨆ i, ∑ k, (b + b) ∂Measure.pi fun x => μ
 ⊢ ↑n * b + ↑n * b = ↑n * (b + b)]
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

theorem extracted_formal_statement_308.{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 → Ω)
  (this :
    (∫ (x : Fin n → Ω), ‖⨆ i, |∑ k, (f i (X (ω k)) - f i (X (x k)))|‖ ∂Measure.pi fun x => μ) ≤
      ∫ (x : Fin n → Ω), ⨆ i, ∑ k, (b + b) ∂Measure.pi fun x => μ)
  (h : (∫ (x : Fin n → Ω), ⨆ i, ∑ k, (b + b) ∂Measure.pi fun x => μ) = ↑n * (b + b))
  (h_original_goal :
    ‖∫ (x : Fin n → Ω), ⨆ i, |∑ k, (f i (X (ω k)) - f i (X (x k)))| ∂Measure.pi fun x => μ‖ ≤ ↑n * (b + b)) :
  ‖∫ (x : Fin n → Ω), ⨆ i, |∑ k, (f i (X (ω k)) - f i (X (x k)))| ∂Measure.pi fun x => μ‖ ≤
    ∫ (x : Fin n → Ω), ⨆ i, ∑ k, (b + b) ∂Measure.pi fun x => μ := sorry

Tactic state before:
Ω : 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 → Ω
this :
  (∫ (x : Fin n → Ω), ‖⨆ i, |∑ k, (f i (X (ω k)) - f i (X (x k)))|‖ ∂Measure.pi fun x => μ) ≤
    ∫ (x : Fin n → Ω), ⨆ i, ∑ k, (b + b) ∂Measure.pi fun x => μ
h : (∫ (x : Fin n → Ω), ⨆ i, ∑ k, (b + b) ∂Measure.pi fun x => μ) = ↑n * (b + b)
⊢ ‖∫ (x : Fin n → Ω), ⨆ i, |∑ k, (f i (X (ω k)) - f i (X (x k)))| ∂Measure.pi fun x => μ‖ ≤ ↑n * (b + b)

Tactic:
rw [← h]

Tactic state after:
[Ω : 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 → Ω
 this :
   (∫ (x : Fin n → Ω), ‖⨆ i, |∑ k, (f i (X (ω k)) - f i (X (x k)))|‖ ∂Measure.pi fun x => μ) ≤
     ∫ (x : Fin n → Ω), ⨆ i, ∑ k, (b + b) ∂Measure.pi fun x => μ
 h : (∫ (x : Fin n → Ω), ⨆ i, ∑ k, (b + b) ∂Measure.pi fun x => μ) = ↑n * (b + b)
 ⊢ ‖∫ (x : Fin n → Ω), ⨆ i, |∑ k, (f i (X (ω k)) - f i (X (x k)))| ∂Measure.pi fun x => μ‖ ≤
     ∫ (x : Fin n → Ω), ⨆ i, ∑ k, (b + b) ∂Measure.pi fun x => μ]
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

theorem extracted_formal_statement_309.{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 → Ω)
  (this :
    (∫ (x : Fin n → Ω), ‖⨆ i, |∑ k, (f i (X (ω k)) - f i (X (x k)))|‖ ∂Measure.pi fun x => μ) ≤
      ∫ (x : Fin n → Ω), ⨆ i, ∑ k, (b + b) ∂Measure.pi fun x => μ)
  (h : (∫ (x : Fin n → Ω), ⨆ i, ∑ k, (b + b) ∂Measure.pi fun x => μ) = ↑n * (b + b))
  (h_original_goal :
    ‖∫ (x : Fin n → Ω), ⨆ i, |∑ k, (f i (X (ω k)) - f i (X (x k)))| ∂Measure.pi fun x => μ‖ ≤
      ∫ (x : Fin n → Ω), ⨆ i, ∑ k, (b + b) ∂Measure.pi fun x => μ) :
  ‖∫ (x : Fin n → Ω), ⨆ i, |∑ k, (f i (X (ω k)) - f i (X (x k)))| ∂Measure.pi fun x => μ‖ ≤
    ∫ (x : Fin n → Ω), ‖⨆ i, |∑ k, (f i (X (ω k)) - f i (X (x k)))|‖ ∂Measure.pi fun x => μ := sorry

Tactic state before:
Ω : 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 → Ω
this :
  (∫ (x : Fin n → Ω), ‖⨆ i, |∑ k, (f i (X (ω k)) - f i (X (x k)))|‖ ∂Measure.pi fun x => μ) ≤
    ∫ (x : Fin n → Ω), ⨆ i, ∑ k, (b + b) ∂Measure.pi fun x => μ
h : (∫ (x : Fin n → Ω), ⨆ i, ∑ k, (b + b) ∂Measure.pi fun x => μ) = ↑n * (b + b)
⊢ ‖∫ (x : Fin n → Ω), ⨆ i, |∑ k, (f i (X (ω k)) - f i (X (x k)))| ∂Measure.pi fun x => μ‖ ≤
    ∫ (x : Fin n → Ω), ⨆ i, ∑ k, (b + b) ∂Measure.pi fun x => μ

Tactic:
apply le_trans _ this

Tactic state after:
[Ω : 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 → Ω
 this :
   (∫ (x : Fin n → Ω), ‖⨆ i, |∑ k, (f i (X (ω k)) - f i (X (x k)))|‖ ∂Measure.pi fun x => μ) ≤
     ∫ (x : Fin n → Ω), ⨆ i, ∑ k, (b + b) ∂Measure.pi fun x => μ
 h : (∫ (x : Fin n → Ω), ⨆ i, ∑ k, (b + b) ∂Measure.pi fun x => μ) = ↑n * (b + b)
 ⊢ ‖∫ (x : Fin n → Ω), ⨆ i, |∑ k, (f i (X (ω k)) - f i (X (x k)))| ∂Measure.pi fun x => μ‖ ≤
     ∫ (x : Fin n → Ω), ‖⨆ i, |∑ k, (f i (X (ω 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_310.{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 → Ω)
  (this :
    (∫ (x : Fin n → Ω), ‖⨆ i, |∑ k, (f i (X (ω k)) - f i (X (x k)))|‖ ∂Measure.pi fun x => μ) ≤
      ∫ (x : Fin n → Ω), ⨆ i, ∑ k, (b + b) ∂Measure.pi fun x => μ)
  (h : (∫ (x : Fin n → Ω), ⨆ i, ∑ k, (b + b) ∂Measure.pi fun x => μ) = ↑n * (b + b)) :
  ‖∫ (x : Fin n → Ω), ⨆ i, |∑ k, (f i (X (ω k)) - f i (X (x k)))| ∂Measure.pi fun x => μ‖ ≤
    ∫ (x : Fin n → Ω), ‖⨆ i, |∑ k, (f i (X (ω k)) - f i (X (x k)))|‖ ∂Measure.pi fun x => μ := sorry

Tactic state before:
Ω : 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 → Ω
this :
  (∫ (x : Fin n → Ω), ‖⨆ i, |∑ k, (f i (X (ω k)) - f i (X (x k)))|‖ ∂Measure.pi fun x => μ) ≤
    ∫ (x : Fin n → Ω), ⨆ i, ∑ k, (b + b) ∂Measure.pi fun x => μ
h : (∫ (x : Fin n → Ω), ⨆ i, ∑ k, (b + b) ∂Measure.pi fun x => μ) = ↑n * (b + b)
⊢ ‖∫ (x : Fin n → Ω), ⨆ i, |∑ k, (f i (X (ω k)) - f i (X (x k)))| ∂Measure.pi fun x => μ‖ ≤
    ∫ (x : Fin n → Ω), ‖⨆ i, |∑ k, (f i (X (ω k)) - f i (X (x k)))|‖ ∂Measure.pi fun x => μ

Tactic:
apply norm_integral_le_integral_norm

Tactic state after:
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

theorem extracted_formal_statement_311.{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 → Ω)
  (h_original_goal :
    (∫ (x : Fin n → Ω), ‖⨆ i, |∑ k, (f i (X (ω k)) - f i (X (x k)))|‖ ∂Measure.pi fun x => μ) ≤
      ∫ (x : Fin n → Ω), ⨆ i, ∑ k, (b + b) ∂Measure.pi fun x => μ) :
  Integrable (fun a => ‖⨆ i, |∑ k, (f i (X (ω k)) - f i (X (a k)))|‖) (Measure.pi fun x => μ) := sorry

Tactic state before:
case refine_2.h
Ω : 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 → Ω
⊢ (∫ (x : Fin n → Ω), ‖⨆ i, |∑ k, (f i (X (ω k)) - f i (X (x k)))|‖ ∂Measure.pi fun x => μ) ≤
    ∫ (x : Fin n → Ω), ⨆ i, ∑ k, (b + b) ∂Measure.pi fun x => μ

Tactic:
apply integral_mono

Tactic state after:
[case refine_2.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 → Ω
 ⊢ Integrable (fun a => ‖⨆ i, |∑ k, (f i (X (ω k)) - f i (X (a k)))|‖) (Measure.pi fun x => μ),
 case refine_2.h.hg
 Ω : 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 → Ω
 ⊢ Integrable (fun a => ⨆ i, ∑ k, (b + b)) (Measure.pi fun x => μ),
 case refine_2.h.h
 Ω : 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 → Ω
 ⊢ (fun a => ‖⨆ i, |∑ k, (f i (X (ω k)) - f i (X (a k)))|‖) ≤ fun a => ⨆ i, ∑ k, (b + b)]
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

theorem extracted_formal_statement_312.{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 → Ω)
  (h_original_goal :
    (∫ (x : Fin n → Ω), ‖⨆ i, |∑ k, (f i (X (ω k)) - f i (X (x k)))|‖ ∂Measure.pi fun x => μ) ≤
      ∫ (x : Fin n → Ω), ⨆ i, ∑ k, (b + b) ∂Measure.pi fun x => μ) :
  Integrable (fun a => ⨆ i, ∑ k, (b + b)) (Measure.pi fun x => μ) := sorry

Tactic state before:
case refine_2.h
Ω : 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 → Ω
⊢ (∫ (x : Fin n → Ω), ‖⨆ i, |∑ k, (f i (X (ω k)) - f i (X (x k)))|‖ ∂Measure.pi fun x => μ) ≤
    ∫ (x : Fin n → Ω), ⨆ i, ∑ k, (b + b) ∂Measure.pi fun x => μ

Tactic:
apply integral_mono

Tactic state after:
[case refine_2.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 → Ω
 ⊢ Integrable (fun a => ‖⨆ i, |∑ k, (f i (X (ω k)) - f i (X (a k)))|‖) (Measure.pi fun x => μ),
 case refine_2.h.hg
 Ω : 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 → Ω
 ⊢ Integrable (fun a => ⨆ i, ∑ k, (b + b)) (Measure.pi fun x => μ),
 case refine_2.h.h
 Ω : 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 → Ω
 ⊢ (fun a => ‖⨆ i, |∑ k, (f i (X (ω k)) - f i (X (a k)))|‖) ≤ fun a => ⨆ i, ∑ k, (b + b)]
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

theorem extracted_formal_statement_313.{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 → Ω)
  (h_original_goal :
    (∫ (x : Fin n → Ω), ‖⨆ i, |∑ k, (f i (X (ω k)) - f i (X (x k)))|‖ ∂Measure.pi fun x => μ) ≤
      ∫ (x : Fin n → Ω), ⨆ i, ∑ k, (b + b) ∂Measure.pi fun x => μ) :
  (fun a => ‖⨆ i, |∑ k, (f i (X (ω k)) - f i (X (a k)))|‖) ≤ fun a => ⨆ i, ∑ k, (b + b) := sorry

Tactic state before:
case refine_2.h
Ω : 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 → Ω
⊢ (∫ (x : Fin n → Ω), ‖⨆ i, |∑ k, (f i (X (ω k)) - f i (X (x k)))|‖ ∂Measure.pi fun x => μ) ≤
    ∫ (x : Fin n → Ω), ⨆ i, ∑ k, (b + b) ∂Measure.pi fun x => μ

Tactic:
apply integral_mono

Tactic state after:
[case refine_2.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 → Ω
 ⊢ Integrable (fun a => ‖⨆ i, |∑ k, (f i (X (ω k)) - f i (X (a k)))|‖) (Measure.pi fun x => μ),
 case refine_2.h.hg
 Ω : 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 → Ω
 ⊢ Integrable (fun a => ⨆ i, ∑ k, (b + b)) (Measure.pi fun x => μ),
 case refine_2.h.h
 Ω : 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 → Ω
 ⊢ (fun a => ‖⨆ i, |∑ k, (f i (X (ω k)) - f i (X (a k)))|‖) ≤ fun a => ⨆ i, ∑ k, (b + b)]
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

theorem extracted_formal_statement_314.{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 → Ω) : Integrable (fun a => ‖⨆ i, |∑ k, (f i (X (ω k)) - f i (X (a k)))|‖) (Measure.pi fun x => μ) := sorry

Tactic state before:
case refine_2.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 → Ω
⊢ Integrable (fun a => ‖⨆ i, |∑ k, (f i (X (ω k)) - f i (X (a k)))|‖) (Measure.pi fun x => μ)

Tactic:
exact integrable_aux5 hf hf' ω

Tactic state after:
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

theorem extracted_formal_statement_315.{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) :
  Integrable (fun a => ⨆ i, ∑ k, (b + b)) (Measure.pi fun x => μ) := sorry

Tactic state before:
case refine_2.h.hg
Ω : 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 → Ω
⊢ Integrable (fun a => ⨆ i, ∑ k, (b + b)) (Measure.pi fun x => μ)

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

Tactic state after:
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

theorem extracted_formal_statement_316.{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 → Ω)
  (h_original_goal : (fun a => ‖⨆ i, |∑ k, (f i (X (ω k)) - f i (X (a k)))|‖) ω' ≤ (fun a => ⨆ i, ∑ k, (b + b)) ω')
  (i : ι) : |(|∑ k, (f i (X (ω k)) - f i (X (ω' k)))|)| ≤ (fun a => ⨆ i, ∑ k, (b + b)) ω' := sorry

Tactic state before:
case refine_2.h.h
Ω : 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 → Ω
⊢ (fun a => ‖⨆ i, |∑ k, (f i (X (ω k)) - f i (X (a k)))|‖) ω' ≤ (fun a => ⨆ i, ∑ k, (b + b)) ω'

Tactic:
apply abs_iSup_le

Tactic state after:
[case refine_2.h.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 : ι), |(|∑ k, (f i (X (ω k)) - f i (X (ω' k)))|)| ≤ (fun a => ⨆ i, ∑ k, (b + b)) ω']
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

theorem extracted_formal_statement_317.{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 : |(|∑ k, (f i (X (ω k)) - f i (X (ω' k)))|)| ≤ (fun a => ⨆ i, ∑ k, (b + b)) ω') :
  |∑ k, (f i (X (ω k)) - f i (X (ω' k)))| ≤ (fun a => ⨆ i, ∑ k, (b + b)) ω' := sorry

Tactic state before:
case refine_2.h.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 : ι
⊢ |(|∑ k, (f i (X (ω k)) - f i (X (ω' k)))|)| ≤ (fun a => ⨆ i, ∑ k, (b + b)) ω'

Tactic:
rw [abs_abs]

Tactic state after:
[case refine_2.h.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 : ι
 ⊢ |∑ k, (f i (X (ω k)) - f i (X (ω' k)))| ≤ (fun a => ⨆ i, ∑ k, (b + b)) ω']
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

theorem extracted_formal_statement_318.{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 : ι) (this : |∑ k, (f i (X (ω k)) - f i (X (ω' k)))| ≤ ↑n * (b + b))
  (h_original_goal : (fun a => ⨆ i, ∑ k, (b + b)) ω' = ↑n * (b + b)) : ↑n * b + ↑n * b = ↑n * (b + b) := sorry

Tactic state before:
case h.e'_4
Ω : 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 : ι
this : |∑ k, (f i (X (ω k)) - f i (X (ω' k)))| ≤ ↑n * (b + b)
⊢ (fun a => ⨆ i, ∑ k, (b + b)) ω' = ↑n * (b + b)

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

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


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

theorem extracted_formal_statement_319.{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 : ι) : |∑ k, (f i (X (ω k)) - f i (X (ω' k)))| ≤ ↑n * (b + b) := sorry

Tactic state before:
case refine_2.h.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 : ι
⊢ |∑ k, (f i (X (ω k)) - f i (X (ω' k)))| ≤ ↑n * (b + b)

Tactic:
apply bounded_difference_of_bounded hf'

Tactic state after: