zzhisthebest/LeanBenchmark huggingface dataset:
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

theorem extracted_formal_statement_238.{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) (i : ι)
  (a : Fin n → Ω) (i_1 : Fin n) (hi_1 : i_1 ∈ Finset.univ) : f i (X (a i_1)) ≤ 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 → Ω
i : ι
a : Fin n → Ω
i_1 : Fin n
hi_1 : i_1 ∈ Finset.univ
⊢ f i (X (a i_1)) ≤ b

Tactic:
exact le_of_max_le_left (hf' i (X (a i_1)))

Tactic state after:
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

theorem extracted_formal_statement_239.{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) (i : ι)
  (a : Fin n → Ω) (p : ∑ x_1, f i (X (a x_1)) ≤ ∑ x_1, b) : ∑ x_1, f i (X (a x_1)) ≤ ∑ x_1, b := sorry

Tactic state before:
case hf.hg.right.h.h.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
ω' : Fin n → Ω
i : ι
a : Fin n → Ω
p : ∑ x_1, f i (X (a x_1)) ≤ ∑ x_1, b
⊢ ∑ x_1, f i (X (a x_1)) ≤ ?hf.hg.right.b

Tactic:
exact p

Tactic state after:
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

theorem extracted_formal_statement_240.{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 : ι)
  (p :
    (∫ (x : Fin n → Ω), ∑ x, f i (X (ω' x)) - ∑ x_1, f i (X (x x_1)) ∂Measure.pi fun x => μ) ≤
      ∫ (x : Fin n → Ω), ↑n * (b + b) ∂Measure.pi fun x => μ) :
  (∫ (x : Fin n → Ω), ↑n * (b + b) ∂Measure.pi fun x => μ) = ↑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 → Ω
i : ι
p :
  (∫ (x : Fin n → Ω), ∑ x, f i (X (ω' x)) - ∑ x_1, f i (X (x x_1)) ∂Measure.pi fun x => μ) ≤
    ∫ (x : Fin n → Ω), ↑n * (b + b) ∂Measure.pi fun x => μ
⊢ (∫ (x : Fin n → Ω), ↑n * (b + b) ∂Measure.pi fun x => μ) = ↑n * (b + b)

Tactic:
simp

Tactic state after:
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

theorem extracted_formal_statement_241.{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 : ι)
  (p :
    (∫ (x : Fin n → Ω), ∑ x, f i (X (ω' x)) - ∑ x_1, f i (X (x x_1)) ∂Measure.pi fun x => μ) ≤
      ∫ (x : Fin n → Ω), ↑n * (b + b) ∂Measure.pi fun x => μ)
  (p' : (∫ (x : Fin n → Ω), ↑n * (b + b) ∂Measure.pi fun x => μ) = ↑n * (b + b))
  (h_original_goal :
    (∫ (x : Fin n → Ω), ∑ x, f i (X (ω' x)) - ∑ x_1, f i (X (x x_1)) ∂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 => μ) ≤
    ∫ (x : Fin n → Ω), ↑n * (b + b) ∂Measure.pi fun x => μ := sorry

Tactic state before:
case hf.right.h.hf.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
ω' : Fin n → Ω
i : ι
p :
  (∫ (x : Fin n → Ω), ∑ x, f i (X (ω' x)) - ∑ x_1, f i (X (x x_1)) ∂Measure.pi fun x => μ) ≤
    ∫ (x : Fin n → Ω), ↑n * (b + b) ∂Measure.pi fun x => μ
p' : (∫ (x : Fin n → Ω), ↑n * (b + b) ∂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)

Tactic:
rw [<- p']

Tactic state after:
[case hf.right.h.hf.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
 ω' : Fin n → Ω
 i : ι
 p :
   (∫ (x : Fin n → Ω), ∑ x, f i (X (ω' x)) - ∑ x_1, f i (X (x x_1)) ∂Measure.pi fun x => μ) ≤
     ∫ (x : Fin n → Ω), ↑n * (b + b) ∂Measure.pi fun x => μ
 p' : (∫ (x : Fin n → Ω), ↑n * (b + b) ∂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 => μ) ≤
     ∫ (x : Fin n → Ω), ↑n * (b + b) ∂Measure.pi fun x => μ]
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

theorem extracted_formal_statement_242.{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 : ι)
  (p :
    (∫ (x : Fin n → Ω), ∑ x, f i (X (ω' x)) - ∑ x_1, f i (X (x x_1)) ∂Measure.pi fun x => μ) ≤
      ∫ (x : Fin n → Ω), ↑n * (b + b) ∂Measure.pi fun x => μ)
  (p' : (∫ (x : Fin n → Ω), ↑n * (b + b) ∂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 => μ) ≤
    ∫ (x : Fin n → Ω), ↑n * (b + b) ∂Measure.pi fun x => μ := sorry

Tactic state before:
case hf.right.h.hf.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
ω' : Fin n → Ω
i : ι
p :
  (∫ (x : Fin n → Ω), ∑ x, f i (X (ω' x)) - ∑ x_1, f i (X (x x_1)) ∂Measure.pi fun x => μ) ≤
    ∫ (x : Fin n → Ω), ↑n * (b + b) ∂Measure.pi fun x => μ
p' : (∫ (x : Fin n → Ω), ↑n * (b + b) ∂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 => μ) ≤
    ∫ (x : Fin n → Ω), ↑n * (b + b) ∂Measure.pi fun x => μ

Tactic:
exact p

Tactic state after:
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

theorem extracted_formal_statement_243.{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) (ω : Fin n → Ω) (i : ι) (ω' : Fin n → Ω) (k : Fin n)
  (a : k ∈ Finset.univ) : |f i (X (ω k)) - f i (X (ω' k))| ≤ |f i (X (ω 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 : ℝ
hf' : ∀ (i : ι) (z : Z), |f i z| ≤ b
ω : Fin n → Ω
i : ι
ω' : Fin n → Ω
k : Fin n
a✝ : k ∈ Finset.univ
⊢ |f i (X (ω k)) - f i (X (ω' k))| ≤ |f i (X (ω k))| + |f i (X (ω' k))|

Tactic:
exact abs_sub (f i (X (ω k))) (f i (X (ω' k)))

Tactic state after:
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

theorem extracted_formal_statement_244.{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) (ω : Fin n → Ω) (i : ι) (k : Fin n) (a : k ∈ Finset.univ) :
  |f i (X (ω k))| ≤ b := sorry

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

Tactic:
exact hf' i (X (ω k))

Tactic state after:
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

theorem extracted_formal_statement_245.{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 : Fin n)
  (a : k ∈ Finset.univ) : |f i (X (ω' k))| ≤ b := sorry

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

Tactic:
exact hf' i (X (ω' k))

Tactic state after:
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

theorem extracted_formal_statement_246.{u_1, w, u} {Ω : Type u} {Z : Type w} {n : ℕ} {ι : Type u_1} {f : ι → Z → ℝ} {b : ℝ}
  (hf' : ∀ (i : ι) (z : Z), |f i z| ≤ b) : ∑ k, (b + b) ≤ ↑n * 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
ω : Fin n → Ω
i : ι
ω' : Fin n → Ω
⊢ ∑ k, (b + b) ≤ ↑n * b + ↑n * b

Tactic:
simp

Tactic state after:
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

theorem extracted_formal_statement_247.{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))
  (ω : Fin n → Ω) (h_original_goal : Measurable fun ω' => ‖⨆ i, |∑ k, (f i (X (ω k)) - f i (X (ω' k)))|‖) :
  Measurable fun a => ⨆ i, |∑ k, (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 → ℝ
inst✝ : Countable ι
X : Ω → Z
hf : ∀ (i : ι), Measurable (f i ∘ X)
ω : Fin n → Ω
⊢ Measurable fun ω' => ‖⨆ i, |∑ k, (f i (X (ω k)) - f i (X (ω' k)))|‖

Tactic:
apply Measurable.norm

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)
 ω : Fin n → Ω
 ⊢ Measurable fun a => ⨆ i, |∑ k, (f i (X (ω k)) - f i (X (a k)))|]
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

theorem extracted_formal_statement_248.{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))
  (ω : Fin n → Ω) (h_original_goal : Measurable fun a => ⨆ i, |∑ k, (f i (X (ω k)) - f i (X (a k)))|) (i : ι) :
  Measurable fun b => |∑ k, (f i (X (ω k)) - f i (X (b 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)
ω : Fin n → Ω
⊢ Measurable fun a => ⨆ i, |∑ k, (f i (X (ω k)) - f i (X (a k)))|

Tactic:
apply Measurable.iSup

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)
 ω : Fin n → Ω
 ⊢ ∀ (i : ι), Measurable fun b => |∑ k, (f i (X (ω k)) - f i (X (b k)))|]
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

theorem extracted_formal_statement_249.{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))
  (ω : Fin n → Ω) (i : ι) (h_original_goal : Measurable fun b => |∑ k, (f i (X (ω k)) - f i (X (b k)))|) :
  Measurable fun x => ∑ k, (f i (X (ω k)) - f i (X (x 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)
ω : Fin n → Ω
i : ι
⊢ Measurable fun b => |∑ k, (f i (X (ω k)) - f i (X (b k)))|

Tactic:
apply Measurable.abs

Tactic state after:
[case hf.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)
 ω : Fin n → Ω
 i : ι
 ⊢ Measurable fun x => ∑ k, (f i (X (ω k)) - f i (X (x k)))]
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

theorem extracted_formal_statement_250.{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))
  (ω : Fin n → Ω) (i : ι) (k : Fin n) (a : k ∈ Finset.univ)
  (h_original_goal : Measurable fun a => f i (X (ω k)) - f i (X (a k))) : Measurable fun a => f i (X (ω k)) := sorry

Tactic state before:
case hf.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)
ω : Fin n → Ω
i : ι
k : Fin n
a✝ : k ∈ Finset.univ
⊢ Measurable fun a => f i (X (ω k)) - f i (X (a k))

Tactic:
apply Measurable.sub

Tactic state after:
[case hf.hf.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)
 ω : Fin n → Ω
 i : ι
 k : Fin n
 a✝ : k ∈ Finset.univ
 ⊢ Measurable fun a => f i (X (ω k)),
 case hf.hf.hf.hg
 Ω : Type u
 inst✝¹ : MeasurableSpace Ω
 Z : Type w
 n : ℕ
 ι : Type u_1
 f : ι → Z → ℝ
 inst✝ : Countable ι
 X : Ω → Z
 hf : ∀ (i : ι), Measurable (f i ∘ X)
 ω : Fin n → Ω
 i : ι
 k : Fin n
 a✝ : k ∈ Finset.univ
 ⊢ Measurable fun a => f i (X (a k))]
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

theorem extracted_formal_statement_251.{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))
  (ω : Fin n → Ω) (i : ι) (k : Fin n) (a : k ∈ Finset.univ)
  (h_original_goal : Measurable fun a => f i (X (ω k)) - f i (X (a k))) : Measurable fun a => f i (X (a k)) := sorry

Tactic state before:
case hf.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)
ω : Fin n → Ω
i : ι
k : Fin n
a✝ : k ∈ Finset.univ
⊢ Measurable fun a => f i (X (ω k)) - f i (X (a k))

Tactic:
apply Measurable.sub

Tactic state after:
[case hf.hf.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)
 ω : Fin n → Ω
 i : ι
 k : Fin n
 a✝ : k ∈ Finset.univ
 ⊢ Measurable fun a => f i (X (ω k)),
 case hf.hf.hf.hg
 Ω : Type u
 inst✝¹ : MeasurableSpace Ω
 Z : Type w
 n : ℕ
 ι : Type u_1
 f : ι → Z → ℝ
 inst✝ : Countable ι
 X : Ω → Z
 hf : ∀ (i : ι), Measurable (f i ∘ X)
 ω : Fin n → Ω
 i : ι
 k : Fin n
 a✝ : k ∈ Finset.univ
 ⊢ Measurable fun a => f i (X (a k))]
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

theorem extracted_formal_statement_252.{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)) (i : ι)
  (k : Fin n) (a : k ∈ Finset.univ) : Measurable fun a => f i (X (a k)) := sorry

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

Tactic:
exact measurable_aux0 hf i k

Tactic state after:
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

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

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

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✝¹ : Nonempty ι
 inst✝ : Countable ι
 X : Ω → Z
 hf : ∀ (i : ι), Measurable (f i ∘ X)
 b : ℝ
 hf' : ∀ (i : ι) (z : Z), |f i z| ≤ b
 ω : Fin n → Ω
 ⊢ MemLp (fun ω' => ‖⨆ i, |∑ k, (f i (X (ω k)) - f i (X (ω' k)))|‖) 1 (Measure.pi fun x => μ)]
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

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

Tactic state before:
Ω : Type u
inst✝³ : MeasurableSpace Ω
Z : Type w
n : ℕ
ι : Type u_1
f : ι → Z → ℝ
μ : Measure Ω
inst✝² : IsProbabilityMeasure μ
inst✝¹ : Nonempty ι
inst✝ : Countable ι
X : Ω → Z
hf : ∀ (i : ι), Measurable (f i ∘ X)
b : ℝ
hf' : ∀ (i : ι) (z : Z), |f i z| ≤ b
ω : Fin n → Ω
⊢ MemLp (fun ω' => ‖⨆ i, |∑ k, (f i (X (ω k)) - f i (X (ω' k)))|‖) 1 (Measure.pi fun x => μ)

Tactic:
apply MemLp.of_bound (measurable_aux5 hf ω).aestronglyMeasurable (n * (b + b))

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


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

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

Tactic state before:
case h
Ω : Type u
inst✝³ : MeasurableSpace Ω
Z : Type w
n : ℕ
ι : Type u_1
f : ι → Z → ℝ
μ : Measure Ω
inst✝² : IsProbabilityMeasure μ
inst✝¹ : Nonempty ι
inst✝ : Countable ι
X : Ω → Z
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:
simp only [norm_eq_abs, abs_abs]

Tactic state after:
[case h
 Ω : Type u
 inst✝³ : MeasurableSpace Ω
 Z : Type w
 n : ℕ
 ι : Type u_1
 f : ι → Z → ℝ
 μ : Measure Ω
 inst✝² : IsProbabilityMeasure μ
 inst✝¹ : Nonempty ι
 inst✝ : Countable ι
 X : Ω → Z
 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)]
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

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

Tactic state before:
case h
Ω : Type u
inst✝³ : MeasurableSpace Ω
Z : Type w
n : ℕ
ι : Type u_1
f : ι → Z → ℝ
μ : Measure Ω
inst✝² : IsProbabilityMeasure μ
inst✝¹ : Nonempty ι
inst✝ : Countable ι
X : Ω → Z
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 abs_iSup_le

Tactic state after:
[case h.hf
 Ω : Type u
 inst✝³ : MeasurableSpace Ω
 Z : Type w
 n : ℕ
 ι : Type u_1
 f : ι → Z → ℝ
 μ : Measure Ω
 inst✝² : IsProbabilityMeasure μ
 inst✝¹ : Nonempty ι
 inst✝ : Countable ι
 X : Ω → Z
 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)]
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

theorem extracted_formal_statement_257.{u_1, w, u} {Ω : Type u} [inst : MeasurableSpace Ω] {Z : Type w} {n : ℕ}
  {ι : Type u_1} {f : ι → Z → ℝ} {μ : Measure Ω} [inst_1 : IsProbabilityMeasure μ] [inst_2 : Nonempty ι]
  [inst_3 : Countable ι] {X : Ω → Z} (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)))|)| ≤ ↑n * (b + b)) :
  |∑ k, (f i (X (ω k)) - f i (X (ω' k)))| ≤ ↑n * (b + b) := sorry

Tactic state before:
case h.hf
Ω : Type u
inst✝³ : MeasurableSpace Ω
Z : Type w
n : ℕ
ι : Type u_1
f : ι → Z → ℝ
μ : Measure Ω
inst✝² : IsProbabilityMeasure μ
inst✝¹ : Nonempty ι
inst✝ : Countable ι
X : Ω → Z
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:
simp only [abs_abs]

Tactic state after:
[case h.hf
 Ω : Type u
 inst✝³ : MeasurableSpace Ω
 Z : Type w
 n : ℕ
 ι : Type u_1
 f : ι → Z → ℝ
 μ : Measure Ω
 inst✝² : IsProbabilityMeasure μ
 inst✝¹ : Nonempty ι
 inst✝ : Countable ι
 X : Ω → Z
 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)]