zzhisthebest/LeanBenchmark huggingface dataset:
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

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

Tactic:
rw [abs_le]

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 : ι
 ⊢ (-(↑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 → Ω), ∑ x, f i (X (ω' x)) - ∑ x_1, f i (X (x x_1)) ∂Measure.pi fun x => μ) ≤ ↑n * (b + b)]
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

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

Tactic:
simp

Tactic state after:
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

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

Tactic:
apply MeasureTheory.integral_mono

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


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

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

Tactic:
apply MeasureTheory.integral_mono

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


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

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

Tactic:
apply MeasureTheory.integral_mono

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


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

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

Tactic state before:
case 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 : ι
this : ∀ (x : Fin n → Ω), -(↑n * (b + b)) ≤ ∑ x, f i (X (ω' x)) - ∑ x_1, f i (X (x x_1))
⊢ Integrable (fun a => -(↑n * (b + b))) (Measure.pi fun x => μ)

Tactic:
simp

Tactic state after:
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

theorem extracted_formal_statement_212.{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 : ∀ (x : Fin n → Ω), -(↑n * (b + b)) ≤ ∑ x, f i (X (ω' x)) - ∑ x_1, f i (X (x x_1)))
  (x_1 : Fin n) : AEMeasurable (fun a => f i (X (a x_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 μ
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 : ∀ (x : Fin n → Ω), -(↑n * (b + b)) ≤ ∑ x, f i (X (ω' x)) - ∑ x_1, f i (X (x x_1))
x_1 : Fin n
⊢ AEMeasurable (fun a => f i (X (a x_1))) (Measure.pi fun x => μ)

Tactic:
exact Integrable.aemeasurable (integrable_aux0 hf hf' i x_1)

Tactic state after:
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

theorem extracted_formal_statement_213.{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 : ∀ (x : Fin n → Ω), -(↑n * (b + b)) ≤ ∑ x, f i (X (ω' x)) - ∑ x_1, f i (X (x x_1)))
  (w : ∀ (x_1 : Fin n), AEMeasurable (fun a => f i (X (a x_1))) (Measure.pi fun x => μ))
  (h_original_goal : AEMeasurable (fun a => ∑ x_1, f i (X (a x_1))) (Measure.pi fun x => μ)) :
  Measurable fun a => ∑ x_1, f i (X (a x_1)) := sorry

Tactic state before:
case hg.left.hf.a.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 : ι
this : ∀ (x : Fin n → Ω), -(↑n * (b + b)) ≤ ∑ x, f i (X (ω' x)) - ∑ x_1, f i (X (x x_1))
w : ∀ (x_1 : Fin n), AEMeasurable (fun a => f i (X (a x_1))) (Measure.pi fun x => μ)
⊢ AEMeasurable (fun a => ∑ x_1, f i (X (a x_1))) (Measure.pi fun x => μ)

Tactic:
apply Measurable.aemeasurable

Tactic state after:
[case hg.left.hf.a.hf.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 → Ω
 i : ι
 this : ∀ (x : Fin n → Ω), -(↑n * (b + b)) ≤ ∑ x, f i (X (ω' x)) - ∑ x_1, f i (X (x x_1))
 w : ∀ (x_1 : Fin n), AEMeasurable (fun a => f i (X (a x_1))) (Measure.pi fun x => μ)
 ⊢ Measurable fun a => ∑ x_1, f i (X (a x_1))]
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

theorem extracted_formal_statement_214.{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 : ∀ (x : Fin n → Ω), -(↑n * (b + b)) ≤ ∑ x, f i (X (ω' x)) - ∑ x_1, f i (X (x x_1)))
  (w : ∀ (x_1 : Fin n), AEMeasurable (fun a => f i (X (a x_1))) (Measure.pi fun x => μ)) :
  Measurable fun a => ∑ x_1, f i (X (a x_1)) := sorry

Tactic state before:
case hg.left.hf.a.hf.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 → Ω
i : ι
this : ∀ (x : Fin n → Ω), -(↑n * (b + b)) ≤ ∑ x, f i (X (ω' x)) - ∑ x_1, f i (X (x x_1))
w : ∀ (x_1 : Fin n), AEMeasurable (fun a => f i (X (a x_1))) (Measure.pi fun x => μ)
⊢ Measurable fun a => ∑ x_1, f i (X (a x_1))

Tactic:
apply measurable_pi_sum (hf i)

Tactic state after:
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

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

Tactic state before:
case hg.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 : ι
this : ∀ (x : Fin n → Ω), -(↑n * (b + b)) ≤ ∑ x, f i (X (ω' x)) - ∑ x_1, f i (X (x x_1))
⊢ HasFiniteIntegral (fun a => ∑ x, f i (X (ω' x)) - ∑ x_1, f i (X (a x_1))) (Measure.pi fun x => μ)

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

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


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

theorem extracted_formal_statement_216.{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 : ∀ (x : Fin n → Ω), -(↑n * (b + b)) ≤ ∑ x, f i (X (ω' x)) - ∑ x_1, f i (X (x x_1)))
  (a : Fin n → Ω) (h_original_goal : ‖∑ x, f i (X (ω' x)) - ∑ x_1, f i (X (a x_1))‖ ≤ ↑n * (b + b)) :
  |∑ x, f i (X (ω' x)) - ∑ x_1, f i (X (a x_1))| ≤ ↑n * (b + b) := sorry

Tactic state before:
case hg.right.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 → Ω
i : ι
this : ∀ (x : Fin n → Ω), -(↑n * (b + b)) ≤ ∑ x, f i (X (ω' x)) - ∑ x_1, f i (X (x x_1))
a : Fin n → Ω
⊢ ‖∑ x, f i (X (ω' x)) - ∑ x_1, f i (X (a x_1))‖ ≤ ↑n * (b + b)

Tactic:
simp only [norm_eq_abs]

Tactic state after:
[case hg.right.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 → Ω
 i : ι
 this : ∀ (x : Fin n → Ω), -(↑n * (b + b)) ≤ ∑ x, f i (X (ω' x)) - ∑ x_1, f i (X (x x_1))
 a : Fin n → Ω
 ⊢ |∑ x, f i (X (ω' x)) - ∑ x_1, f i (X (a x_1))| ≤ ↑n * (b + b)]
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

theorem extracted_formal_statement_217.{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 : ∀ (x : Fin n → Ω), -(↑n * (b + b)) ≤ ∑ x, f i (X (ω' x)) - ∑ x_1, f i (X (x x_1)))
  (a : Fin n → Ω) :
  |∑ x, f i (X (ω' x)) - ∑ x_1, f i (X (a x_1))| ≤ |∑ x, f i (X (ω' x))| + |∑ x_1, f i (X (a x_1))| := 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 : ι
this : ∀ (x : Fin n → Ω), -(↑n * (b + b)) ≤ ∑ x, f i (X (ω' x)) - ∑ x_1, f i (X (x x_1))
a : Fin n → Ω
⊢ |∑ x, f i (X (ω' x)) - ∑ x_1, f i (X (a x_1))| ≤ |∑ x, f i (X (ω' x))| + |∑ x_1, f i (X (a x_1))|

Tactic:
exact abs_sub (∑ x : Fin n, f i (X (ω' x))) (∑ x_1 : Fin n, f i (X (a x_1)))

Tactic state after:
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

theorem extracted_formal_statement_218.{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 : ∀ (x : Fin n → Ω), -(↑n * (b + b)) ≤ ∑ x, f i (X (ω' x)) - ∑ x_1, f i (X (x x_1))) :
  |∑ x, f i (X (ω' x))| ≤ ∑ x, |f i (X (ω' 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 → Ω
i : ι
this : ∀ (x : Fin n → Ω), -(↑n * (b + b)) ≤ ∑ x, f i (X (ω' x)) - ∑ x_1, f i (X (x x_1))
a : Fin n → Ω
⊢ |∑ x, f i (X (ω' x))| ≤ ∑ x, |f i (X (ω' x))|

Tactic:
exact Finset.abs_sum_le_sum_abs (fun i_1 ↦ f i (X (ω' i_1))) Finset.univ

Tactic state after:
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

theorem extracted_formal_statement_219.{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 : ∀ (x : Fin n → Ω), -(↑n * (b + b)) ≤ ∑ x, f i (X (ω' x)) - ∑ x_1, f i (X (x x_1))) :
  ∑ x, |f i (X (ω' x))| ≤ ∑ x, 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 : ι
this : ∀ (x : Fin n → Ω), -(↑n * (b + b)) ≤ ∑ x, f i (X (ω' x)) - ∑ x_1, f i (X (x x_1))
a : Fin n → Ω
⊢ ∑ x, |f i (X (ω' x))| ≤ ∑ x, b

Tactic:
exact Finset.sum_le_sum fun i_1 a ↦ hf' i (X (ω' i_1))

Tactic state after: