zzhisthebest/LeanBenchmark huggingface dataset:
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

theorem extracted_formal_statement_229.{w, v, u} {Z : Type w} {ι : Type v} {f_1 : ι → Z → ℝ} {Ω : Type u}
  [inst : MeasurableSpace Ω] {X : Ω → Z} {μ : Measure Ω} [inst_1 : IsProbabilityMeasure μ] {n : ℕ}
  [inst_2 : Countable ι] [inst_3 : Nonempty ι] (h𝓕 : ∀ (I : ι), Measurable (f_1 I ∘ X)) {b : ℝ}
  (h𝓕' : ∀ (I : ι) (z : Z), |f_1 I z| ≤ b) (ω : Fin n → Ω × Ω) (f : Z → ℝ)
  (h_original_goal : ∑ i, (-f (X (ω i).1) - -f (X (ω i).2)) = -∑ i, (f (X (ω i).1) - f (X (ω i).2))) :
  ∑ i, (-f (X (ω i).1) - -f (X (ω i).2)) = ∑ x, -(f (X (ω x).1) - f (X (ω x).2)) := sorry

Tactic state before:
Z : Type w
ι : Type v
f✝ : ι → Z → ℝ
Ω : Type u
inst✝³ : MeasurableSpace Ω
X : Ω → Z
μ : Measure Ω
inst✝² : IsProbabilityMeasure μ
n : ℕ
inst✝¹ : Countable ι
inst✝ : Nonempty ι
h𝓕 : ∀ (I : ι), Measurable (f✝ I ∘ X)
b : ℝ
h𝓕' : ∀ (I : ι) (z : Z), |f✝ I z| ≤ b
f' : Fin 2 × ι → Z → ℝ := fun i => if (↑i.1 == 0) = true then f✝ i.2 else -f✝ i.2
ω : Fin n → Ω × Ω
V : (Z → ℝ) → ℝ := fun f => ∑ i, (f (X (ω i).1) - f (X (ω i).2))
f : Z → ℝ
⊢ ∑ i, (-f (X (ω i).1) - -f (X (ω i).2)) = -∑ i, (f (X (ω i).1) - f (X (ω i).2))

Tactic:
rw [← Finset.sum_neg_distrib]

Tactic state after:
[Z : Type w
 ι : Type v
 f✝ : ι → Z → ℝ
 Ω : Type u
 inst✝³ : MeasurableSpace Ω
 X : Ω → Z
 μ : Measure Ω
 inst✝² : IsProbabilityMeasure μ
 n : ℕ
 inst✝¹ : Countable ι
 inst✝ : Nonempty ι
 h𝓕 : ∀ (I : ι), Measurable (f✝ I ∘ X)
 b : ℝ
 h𝓕' : ∀ (I : ι) (z : Z), |f✝ I z| ≤ b
 f' : Fin 2 × ι → Z → ℝ := fun i => if (↑i.1 == 0) = true then f✝ i.2 else -f✝ i.2
 ω : Fin n → Ω × Ω
 V : (Z → ℝ) → ℝ := fun f => ∑ i, (f (X (ω i).1) - f (X (ω i).2))
 f : Z → ℝ
 ⊢ ∑ i, (-f (X (ω i).1) - -f (X (ω i).2)) = ∑ x, -(f (X (ω x).1) - f (X (ω x).2))]
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

theorem extracted_formal_statement_230.{w, v, u} {Z : Type w} {ι : Type v} {f : ι → Z → ℝ} {Ω : Type u}
  [inst : MeasurableSpace Ω] {X : Ω → Z} {μ : Measure Ω} [inst_1 : IsProbabilityMeasure μ] {n : ℕ}
  [inst_2 : Countable ι] [inst_3 : Nonempty ι] (h𝓕 : ∀ (I : ι), Measurable (f I ∘ X)) {b : ℝ}
  (h𝓕' : ∀ (I : ι) (z : Z), |f I z| ≤ b) (ω : Fin n → Ω × Ω) :
  let V := fun f => ∑ i, (f (X (ω i).1) - f (X (ω i).2));
  (∀ (f : Z → ℝ), V (-f) = -V f) →
    ∀ ⦃x : ℝ⦄ (I : ι), (fun i => |V (f i)|) I = x → x ≤ ↑n * (b + b) → (fun i => |V (f i)|) I ≤ ↑n * (b + b) := sorry

Tactic state before:
case h
Z : Type w
ι : Type v
f : ι → Z → ℝ
Ω : Type u
inst✝³ : MeasurableSpace Ω
X : Ω → Z
μ : Measure Ω
inst✝² : IsProbabilityMeasure μ
n : ℕ
inst✝¹ : Countable ι
inst✝ : Nonempty ι
h𝓕 : ∀ (I : ι), Measurable (f I ∘ X)
b : ℝ
h𝓕' : ∀ (I : ι) (z : Z), |f I z| ≤ b
f' : Fin 2 × ι → Z → ℝ := fun i => if (↑i.1 == 0) = true then f i.2 else -f i.2
ω : Fin n → Ω × Ω
V : (Z → ℝ) → ℝ := fun f => ∑ i, (f (X (ω i).1) - f (X (ω i).2))
hV₀ : ∀ (f : Z → ℝ), V (-f) = -V f
x : ℝ
I : ι
eq : (fun i => |V (f i)|) I = x
⊢ x ≤ ↑n * (b + b)

Tactic:
rw [← eq]

Tactic state after:
[case h
 Z : Type w
 ι : Type v
 f : ι → Z → ℝ
 Ω : Type u
 inst✝³ : MeasurableSpace Ω
 X : Ω → Z
 μ : Measure Ω
 inst✝² : IsProbabilityMeasure μ
 n : ℕ
 inst✝¹ : Countable ι
 inst✝ : Nonempty ι
 h𝓕 : ∀ (I : ι), Measurable (f I ∘ X)
 b : ℝ
 h𝓕' : ∀ (I : ι) (z : Z), |f I z| ≤ b
 f' : Fin 2 × ι → Z → ℝ := fun i => if (↑i.1 == 0) = true then f i.2 else -f i.2
 ω : Fin n → Ω × Ω
 V : (Z → ℝ) → ℝ := fun f => ∑ i, (f (X (ω i).1) - f (X (ω i).2))
 hV₀ : ∀ (f : Z → ℝ), V (-f) = -V f
 x : ℝ
 I : ι
 eq : (fun i => |V (f i)|) I = x
 ⊢ (fun i => |V (f i)|) I ≤ ↑n * (b + b)]
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

theorem extracted_formal_statement_231.{w, v, u} {Z : Type w} {ι : Type v} {f : ι → Z → ℝ} {Ω : Type u}
  [inst : MeasurableSpace Ω] {X : Ω → Z} {μ : Measure Ω} [inst_1 : IsProbabilityMeasure μ] {n : ℕ}
  [inst_2 : Countable ι] [inst_3 : Nonempty ι] (h𝓕 : ∀ (I : ι), Measurable (f I ∘ X)) {b : ℝ}
  (h𝓕' : ∀ (I : ι) (z : Z), |f I z| ≤ b) (ω : Fin n → Ω × Ω) :
  let V := fun f => ∑ i, (f (X (ω i).1) - f (X (ω i).2));
  (∀ (f : Z → ℝ), V (-f) = -V f) →
    ∀ ⦃x : ℝ⦄ (I : ι), (fun i => |V (f i)|) I = x → |∑ i, (f I (X (ω i).1) - f I (X (ω i).2))| ≤ ↑n * (b + b) := sorry

Tactic state before:
case h
Z : Type w
ι : Type v
f : ι → Z → ℝ
Ω : Type u
inst✝³ : MeasurableSpace Ω
X : Ω → Z
μ : Measure Ω
inst✝² : IsProbabilityMeasure μ
n : ℕ
inst✝¹ : Countable ι
inst✝ : Nonempty ι
h𝓕 : ∀ (I : ι), Measurable (f I ∘ X)
b : ℝ
h𝓕' : ∀ (I : ι) (z : Z), |f I z| ≤ b
f' : Fin 2 × ι → Z → ℝ := fun i => if (↑i.1 == 0) = true then f i.2 else -f i.2
ω : Fin n → Ω × Ω
V : (Z → ℝ) → ℝ := fun f => ∑ i, (f (X (ω i).1) - f (X (ω i).2))
hV₀ : ∀ (f : Z → ℝ), V (-f) = -V f
x : ℝ
I : ι
eq : (fun i => |V (f i)|) I = x
⊢ |∑ i, (f I (X (ω i).1) - f I (X (ω i).2))| ≤ ↑n * (b + b)

Tactic:
exact bound_lem h𝓕' ω I

Tactic state after:
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

theorem extracted_formal_statement_232.{w, v, u} {Z : Type w} {ι : Type v} {f : ι → Z → ℝ} {Ω : Type u}
  [inst : MeasurableSpace Ω] {X : Ω → Z} {μ : Measure Ω} [inst_1 : IsProbabilityMeasure μ] {n : ℕ}
  [inst_2 : Countable ι] [inst_3 : Nonempty ι] (h𝓕 : ∀ (I : ι), Measurable (f I ∘ X)) {b : ℝ}
  (h𝓕' : ∀ (I : ι) (z : Z), |f I z| ≤ b) :
  let f' := fun i => if (↑i.1 == 0) = true then f i.2 else -f i.2;
  ∀ (ω : Fin n → Ω × Ω),
    let V := fun f => ∑ i, (f (X (ω i).1) - f (X (ω i).2));
    (∀ (f : Z → ℝ), V (-f) = -V f) →
      BddAbove (Set.range fun i => |V (f i)|) →
        ⨆ I, |∑ i, (f I (X (ω i).1) - f I (X (ω i).2))| = ⨆ I, ∑ i, (f' I (X (ω i).1) - f' I (X (ω i).2)) := sorry

Tactic state before:
case e_f.h
Z : Type w
ι : Type v
f : ι → Z → ℝ
Ω : Type u
inst✝³ : MeasurableSpace Ω
X : Ω → Z
μ : Measure Ω
inst✝² : IsProbabilityMeasure μ
n : ℕ
inst✝¹ : Countable ι
inst✝ : Nonempty ι
h𝓕 : ∀ (I : ι), Measurable (f I ∘ X)
b : ℝ
h𝓕' : ∀ (I : ι) (z : Z), |f I z| ≤ b
f' : Fin 2 × ι → Z → ℝ := fun i => if (↑i.1 == 0) = true then f i.2 else -f i.2
ω : Fin n → Ω × Ω
V : (Z → ℝ) → ℝ := fun f => ∑ i, (f (X (ω i).1) - f (X (ω i).2))
hV₀ : ∀ (f : Z → ℝ), V (-f) = -V f
hV₁ : BddAbove (Set.range fun i => |V (f i)|)
⊢ ⨆ I, |∑ i, (f I (X (ω i).1) - f I (X (ω i).2))| = ⨆ I, ∑ i, (f' I (X (ω i).1) - f' I (X (ω i).2))

Tactic:
exact sup_abs_lemma hV₀ hV₁

Tactic state after:
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

theorem extracted_formal_statement_233.{w, v, u} {Z : Type w} {ι : Type v} {f : ι → Z → ℝ} {Ω : Type u}
  [inst : MeasurableSpace Ω] {X : Ω → Z} {μ : Measure Ω} [inst_1 : IsProbabilityMeasure μ] {n : ℕ}
  [inst_2 : Countable ι] [inst_3 : Nonempty ι] (h𝓕 : ∀ (I : ι), Measurable (f I ∘ X)) {b : ℝ}
  (h𝓕' : ∀ (I : ι) (z : Z), |f I z| ≤ b) (s : Fin 2) (I : ι) (h : (↑s == 0) = true)
  (h_original_goal : Measurable ((if (↑(s, I).1 == 0) = true then f (s, I).2 else -f (s, I).2) ∘ X)) :
  Measurable (f (s, I).2 ∘ X) := sorry

Tactic state before:
Z : Type w
ι : Type v
f : ι → Z → ℝ
Ω : Type u
inst✝³ : MeasurableSpace Ω
X : Ω → Z
μ : Measure Ω
inst✝² : IsProbabilityMeasure μ
n : ℕ
inst✝¹ : Countable ι
inst✝ : Nonempty ι
h𝓕 : ∀ (I : ι), Measurable (f I ∘ X)
b : ℝ
h𝓕' : ∀ (I : ι) (z : Z), |f I z| ≤ b
f' : Fin 2 × ι → Z → ℝ := fun i => if (↑i.1 == 0) = true then f i.2 else -f i.2
s : Fin 2
I : ι
h : (↑s == 0) = true
⊢ Measurable ((if (↑(s, I).1 == 0) = true then f (s, I).2 else -f (s, I).2) ∘ X)

Tactic:
rw [if_pos h]

Tactic state after:
[Z : Type w
 ι : Type v
 f : ι → Z → ℝ
 Ω : Type u
 inst✝³ : MeasurableSpace Ω
 X : Ω → Z
 μ : Measure Ω
 inst✝² : IsProbabilityMeasure μ
 n : ℕ
 inst✝¹ : Countable ι
 inst✝ : Nonempty ι
 h𝓕 : ∀ (I : ι), Measurable (f I ∘ X)
 b : ℝ
 h𝓕' : ∀ (I : ι) (z : Z), |f I z| ≤ b
 f' : Fin 2 × ι → Z → ℝ := fun i => if (↑i.1 == 0) = true then f i.2 else -f i.2
 s : Fin 2
 I : ι
 h : (↑s == 0) = true
 ⊢ Measurable (f (s, I).2 ∘ X)]
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

theorem extracted_formal_statement_234.{w, v, u} {Z : Type w} {ι : Type v} {f : ι → Z → ℝ} {Ω : Type u}
  [inst : MeasurableSpace Ω] {X : Ω → Z} {μ : Measure Ω} [inst_1 : IsProbabilityMeasure μ] {n : ℕ}
  [inst_2 : Countable ι] [inst_3 : Nonempty ι] (h𝓕 : ∀ (I : ι), Measurable (f I ∘ X)) {b : ℝ}
  (h𝓕' : ∀ (I : ι) (z : Z), |f I z| ≤ b) (I : ι) : Measurable (f I ∘ X) := sorry

Tactic state before:
Z : Type w
ι : Type v
f : ι → Z → ℝ
Ω : Type u
inst✝³ : MeasurableSpace Ω
X : Ω → Z
μ : Measure Ω
inst✝² : IsProbabilityMeasure μ
n : ℕ
inst✝¹ : Countable ι
inst✝ : Nonempty ι
h𝓕 : ∀ (I : ι), Measurable (f I ∘ X)
b : ℝ
h𝓕' : ∀ (I : ι) (z : Z), |f I z| ≤ b
f' : Fin 2 × ι → Z → ℝ := fun i => if (↑i.1 == 0) = true then f i.2 else -f i.2
s : Fin 2
I : ι
h : (↑s == 0) = true
⊢ Measurable (f I ∘ X)

Tactic:
exact h𝓕 I

Tactic state after:
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

theorem extracted_formal_statement_235.{w, v, u} {Z : Type w} {ι : Type v} {f : ι → Z → ℝ} {Ω : Type u}
  [inst : MeasurableSpace Ω] {X : Ω → Z} {μ : Measure Ω} [inst_1 : IsProbabilityMeasure μ] {n : ℕ}
  [inst_2 : Countable ι] [inst_3 : Nonempty ι] (h𝓕 : ∀ (I : ι), Measurable (f I ∘ X)) {b : ℝ}
  (h𝓕' : ∀ (I : ι) (z : Z), |f I z| ≤ b) (s : Fin 2) (I : ι) (h : ¬(↑s == 0) = true)
  (h_original_goal : Measurable ((if (↑(s, I).1 == 0) = true then f (s, I).2 else -f (s, I).2) ∘ X)) :
  Measurable ((-f (s, I).2) ∘ X) := sorry

Tactic state before:
Z : Type w
ι : Type v
f : ι → Z → ℝ
Ω : Type u
inst✝³ : MeasurableSpace Ω
X : Ω → Z
μ : Measure Ω
inst✝² : IsProbabilityMeasure μ
n : ℕ
inst✝¹ : Countable ι
inst✝ : Nonempty ι
h𝓕 : ∀ (I : ι), Measurable (f I ∘ X)
b : ℝ
h𝓕' : ∀ (I : ι) (z : Z), |f I z| ≤ b
f' : Fin 2 × ι → Z → ℝ := fun i => if (↑i.1 == 0) = true then f i.2 else -f i.2
s : Fin 2
I : ι
h : ¬(↑s == 0) = true
⊢ Measurable ((if (↑(s, I).1 == 0) = true then f (s, I).2 else -f (s, I).2) ∘ X)

Tactic:
rw [if_neg h]

Tactic state after:
[Z : Type w
 ι : Type v
 f : ι → Z → ℝ
 Ω : Type u
 inst✝³ : MeasurableSpace Ω
 X : Ω → Z
 μ : Measure Ω
 inst✝² : IsProbabilityMeasure μ
 n : ℕ
 inst✝¹ : Countable ι
 inst✝ : Nonempty ι
 h𝓕 : ∀ (I : ι), Measurable (f I ∘ X)
 b : ℝ
 h𝓕' : ∀ (I : ι) (z : Z), |f I z| ≤ b
 f' : Fin 2 × ι → Z → ℝ := fun i => if (↑i.1 == 0) = true then f i.2 else -f i.2
 s : Fin 2
 I : ι
 h : ¬(↑s == 0) = true
 ⊢ Measurable ((-f (s, I).2) ∘ X)]
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

theorem extracted_formal_statement_236.{w, v, u} {Z : Type w} {ι : Type v} {f : ι → Z → ℝ} {Ω : Type u}
  [inst : MeasurableSpace Ω] {X : Ω → Z} {μ : Measure Ω} [inst_1 : IsProbabilityMeasure μ] {n : ℕ}
  [inst_2 : Countable ι] [inst_3 : Nonempty ι] (h𝓕 : ∀ (I : ι), Measurable (f I ∘ X)) {b : ℝ}
  (h𝓕' : ∀ (I : ι) (z : Z), |f I z| ≤ b) (I : ι) : Measurable ((-f I) ∘ X) := sorry

Tactic state before:
Z : Type w
ι : Type v
f : ι → Z → ℝ
Ω : Type u
inst✝³ : MeasurableSpace Ω
X : Ω → Z
μ : Measure Ω
inst✝² : IsProbabilityMeasure μ
n : ℕ
inst✝¹ : Countable ι
inst✝ : Nonempty ι
h𝓕 : ∀ (I : ι), Measurable (f I ∘ X)
b : ℝ
h𝓕' : ∀ (I : ι) (z : Z), |f I z| ≤ b
f' : Fin 2 × ι → Z → ℝ := fun i => if (↑i.1 == 0) = true then f i.2 else -f i.2
s : Fin 2
I : ι
h : ¬(↑s == 0) = true
⊢ Measurable ((-f I) ∘ X)

Tactic:
exact (h𝓕 I).neg

Tactic state after:
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

theorem extracted_formal_statement_237.{w, v, u} {Z : Type w} {ι : Type v} {f : ι → Z → ℝ} {Ω : Type u}
  [inst : MeasurableSpace Ω] {X : Ω → Z} {μ : Measure Ω} [inst_1 : IsProbabilityMeasure μ] {n : ℕ}
  [inst_2 : Countable ι] [inst_3 : Nonempty ι] (h𝓕 : ∀ (I : ι), Measurable (f I ∘ X)) {b : ℝ}
  (h𝓕' : ∀ (I : ι) (z : Z), |f I z| ≤ b) :
  let f' := fun i => if (↑i.1 == 0) = true then f i.2 else -f i.2;
  (∀ (I : Fin 2 × ι), Measurable (f' I ∘ X)) →
    ∀ (s : Fin 2) (I : ι) (z : Z),
      (↑s == 0) = true → |(if (↑s == 0) = true then f I else -f I) z| ≤ b → |f I z| ≤ b := sorry

Tactic state before:
Z : Type w
ι : Type v
f : ι → Z → ℝ
Ω : Type u
inst✝³ : MeasurableSpace Ω
X : Ω → Z
μ : Measure Ω
inst✝² : IsProbabilityMeasure μ
n : ℕ
inst✝¹ : Countable ι
inst✝ : Nonempty ι
h𝓕 : ∀ (I : ι), Measurable (f I ∘ X)
b : ℝ
h𝓕' : ∀ (I : ι) (z : Z), |f I z| ≤ b
f' : Fin 2 × ι → Z → ℝ := fun i => if (↑i.1 == 0) = true then f i.2 else -f i.2
h𝓕₂ : ∀ (I : Fin 2 × ι), Measurable (f' I ∘ X)
s : Fin 2
I : ι
z : Z
h : (↑s == 0) = true
⊢ |(if (↑s == 0) = true then f I else -f I) z| ≤ b

Tactic:
rw [if_pos h]

Tactic state after:
[Z : Type w
 ι : Type v
 f : ι → Z → ℝ
 Ω : Type u
 inst✝³ : MeasurableSpace Ω
 X : Ω → Z
 μ : Measure Ω
 inst✝² : IsProbabilityMeasure μ
 n : ℕ
 inst✝¹ : Countable ι
 inst✝ : Nonempty ι
 h𝓕 : ∀ (I : ι), Measurable (f I ∘ X)
 b : ℝ
 h𝓕' : ∀ (I : ι) (z : Z), |f I z| ≤ b
 f' : Fin 2 × ι → Z → ℝ := fun i => if (↑i.1 == 0) = true then f i.2 else -f i.2
 h𝓕₂ : ∀ (I : Fin 2 × ι), Measurable (f' I ∘ X)
 s : Fin 2
 I : ι
 z : Z
 h : (↑s == 0) = true
 ⊢ |f I z| ≤ b]
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

theorem extracted_formal_statement_238.{w, v, u} {Z : Type w} {ι : Type v} {f : ι → Z → ℝ} {Ω : Type u}
  [inst : MeasurableSpace Ω] {X : Ω → Z} {μ : Measure Ω} [inst_1 : IsProbabilityMeasure μ] {n : ℕ}
  [inst_2 : Countable ι] [inst_3 : Nonempty ι] (h𝓕 : ∀ (I : ι), Measurable (f I ∘ X)) {b : ℝ}
  (h𝓕' : ∀ (I : ι) (z : Z), |f I z| ≤ b) :
  let f' := fun i => if (↑i.1 == 0) = true then f i.2 else -f i.2;
  (∀ (I : Fin 2 × ι), Measurable (f' I ∘ X)) → ∀ (I : ι) (z : Z), |f I z| ≤ b := sorry

Tactic state before:
Z : Type w
ι : Type v
f : ι → Z → ℝ
Ω : Type u
inst✝³ : MeasurableSpace Ω
X : Ω → Z
μ : Measure Ω
inst✝² : IsProbabilityMeasure μ
n : ℕ
inst✝¹ : Countable ι
inst✝ : Nonempty ι
h𝓕 : ∀ (I : ι), Measurable (f I ∘ X)
b : ℝ
h𝓕' : ∀ (I : ι) (z : Z), |f I z| ≤ b
f' : Fin 2 × ι → Z → ℝ := fun i => if (↑i.1 == 0) = true then f i.2 else -f i.2
h𝓕₂ : ∀ (I : Fin 2 × ι), Measurable (f' I ∘ X)
s : Fin 2
I : ι
z : Z
h : (↑s == 0) = true
⊢ |f I z| ≤ b

Tactic:
exact h𝓕' I z

Tactic state after:
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

theorem extracted_formal_statement_239.{w, v, u} {Z : Type w} {ι : Type v} {f : ι → Z → ℝ} {Ω : Type u}
  [inst : MeasurableSpace Ω] {X : Ω → Z} {μ : Measure Ω} [inst_1 : IsProbabilityMeasure μ] {n : ℕ}
  [inst_2 : Countable ι] [inst_3 : Nonempty ι] (h𝓕 : ∀ (I : ι), Measurable (f I ∘ X)) {b : ℝ}
  (h𝓕' : ∀ (I : ι) (z : Z), |f I z| ≤ b) :
  let f' := fun i => if (↑i.1 == 0) = true then f i.2 else -f i.2;
  (∀ (I : Fin 2 × ι), Measurable (f' I ∘ X)) →
    ∀ (s : Fin 2) (I : ι) (z : Z),
      ¬(↑s == 0) = true → |(if (↑s == 0) = true then f I else -f I) z| ≤ b → |(-f I) z| ≤ b := sorry

Tactic state before:
Z : Type w
ι : Type v
f : ι → Z → ℝ
Ω : Type u
inst✝³ : MeasurableSpace Ω
X : Ω → Z
μ : Measure Ω
inst✝² : IsProbabilityMeasure μ
n : ℕ
inst✝¹ : Countable ι
inst✝ : Nonempty ι
h𝓕 : ∀ (I : ι), Measurable (f I ∘ X)
b : ℝ
h𝓕' : ∀ (I : ι) (z : Z), |f I z| ≤ b
f' : Fin 2 × ι → Z → ℝ := fun i => if (↑i.1 == 0) = true then f i.2 else -f i.2
h𝓕₂ : ∀ (I : Fin 2 × ι), Measurable (f' I ∘ X)
s : Fin 2
I : ι
z : Z
h : ¬(↑s == 0) = true
⊢ |(if (↑s == 0) = true then f I else -f I) z| ≤ b

Tactic:
rw [if_neg h]

Tactic state after:
[Z : Type w
 ι : Type v
 f : ι → Z → ℝ
 Ω : Type u
 inst✝³ : MeasurableSpace Ω
 X : Ω → Z
 μ : Measure Ω
 inst✝² : IsProbabilityMeasure μ
 n : ℕ
 inst✝¹ : Countable ι
 inst✝ : Nonempty ι
 h𝓕 : ∀ (I : ι), Measurable (f I ∘ X)
 b : ℝ
 h𝓕' : ∀ (I : ι) (z : Z), |f I z| ≤ b
 f' : Fin 2 × ι → Z → ℝ := fun i => if (↑i.1 == 0) = true then f i.2 else -f i.2
 h𝓕₂ : ∀ (I : Fin 2 × ι), Measurable (f' I ∘ X)
 s : Fin 2
 I : ι
 z : Z
 h : ¬(↑s == 0) = true
 ⊢ |(-f I) z| ≤ b]
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

theorem extracted_formal_statement_240.{w, v, u} {Z : Type w} {ι : Type v} {f : ι → Z → ℝ} {Ω : Type u}
  [inst : MeasurableSpace Ω] {X : Ω → Z} {μ : Measure Ω} [inst_1 : IsProbabilityMeasure μ] {n : ℕ}
  [inst_2 : Countable ι] [inst_3 : Nonempty ι] (h𝓕 : ∀ (I : ι), Measurable (f I ∘ X)) {b : ℝ}
  (h𝓕' : ∀ (I : ι) (z : Z), |f I z| ≤ b) :
  let f' := fun i => if (↑i.1 == 0) = true then f i.2 else -f i.2;
  (∀ (I : Fin 2 × ι), Measurable (f' I ∘ X)) → ∀ (I : ι) (z : Z), |(-f I) z| ≤ b → |f I z| ≤ b := sorry

Tactic state before:
Z : Type w
ι : Type v
f : ι → Z → ℝ
Ω : Type u
inst✝³ : MeasurableSpace Ω
X : Ω → Z
μ : Measure Ω
inst✝² : IsProbabilityMeasure μ
n : ℕ
inst✝¹ : Countable ι
inst✝ : Nonempty ι
h𝓕 : ∀ (I : ι), Measurable (f I ∘ X)
b : ℝ
h𝓕' : ∀ (I : ι) (z : Z), |f I z| ≤ b
f' : Fin 2 × ι → Z → ℝ := fun i => if (↑i.1 == 0) = true then f i.2 else -f i.2
h𝓕₂ : ∀ (I : Fin 2 × ι), Measurable (f' I ∘ X)
s : Fin 2
I : ι
z : Z
h : ¬(↑s == 0) = true
⊢ |(-f I) z| ≤ b

Tactic:
simp only [Pi.neg_apply, abs_neg, f']

Tactic state after:
[Z : Type w
 ι : Type v
 f : ι → Z → ℝ
 Ω : Type u
 inst✝³ : MeasurableSpace Ω
 X : Ω → Z
 μ : Measure Ω
 inst✝² : IsProbabilityMeasure μ
 n : ℕ
 inst✝¹ : Countable ι
 inst✝ : Nonempty ι
 h𝓕 : ∀ (I : ι), Measurable (f I ∘ X)
 b : ℝ
 h𝓕' : ∀ (I : ι) (z : Z), |f I z| ≤ b
 f' : Fin 2 × ι → Z → ℝ := fun i => if (↑i.1 == 0) = true then f i.2 else -f i.2
 h𝓕₂ : ∀ (I : Fin 2 × ι), Measurable (f' I ∘ X)
 s : Fin 2
 I : ι
 z : Z
 h : ¬(↑s == 0) = true
 ⊢ |f I z| ≤ b]
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

theorem extracted_formal_statement_241.{w, v, u} {Z : Type w} {ι : Type v} {f : ι → Z → ℝ} {Ω : Type u}
  [inst : MeasurableSpace Ω] {X : Ω → Z} {μ : Measure Ω} [inst_1 : IsProbabilityMeasure μ] {n : ℕ}
  [inst_2 : Countable ι] [inst_3 : Nonempty ι] (h𝓕 : ∀ (I : ι), Measurable (f I ∘ X)) {b : ℝ}
  (h𝓕' : ∀ (I : ι) (z : Z), |f I z| ≤ b) :
  let f' := fun i => if (↑i.1 == 0) = true then f i.2 else -f i.2;
  (∀ (I : Fin 2 × ι), Measurable (f' I ∘ X)) → ∀ (I : ι) (z : Z), |f I z| ≤ b := sorry

Tactic state before:
Z : Type w
ι : Type v
f : ι → Z → ℝ
Ω : Type u
inst✝³ : MeasurableSpace Ω
X : Ω → Z
μ : Measure Ω
inst✝² : IsProbabilityMeasure μ
n : ℕ
inst✝¹ : Countable ι
inst✝ : Nonempty ι
h𝓕 : ∀ (I : ι), Measurable (f I ∘ X)
b : ℝ
h𝓕' : ∀ (I : ι) (z : Z), |f I z| ≤ b
f' : Fin 2 × ι → Z → ℝ := fun i => if (↑i.1 == 0) = true then f i.2 else -f i.2
h𝓕₂ : ∀ (I : Fin 2 × ι), Measurable (f' I ∘ X)
s : Fin 2
I : ι
z : Z
h : ¬(↑s == 0) = true
⊢ |f I z| ≤ b

Tactic:
exact h𝓕' I z

Tactic state after:
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

theorem extracted_formal_statement_242.{w, v, u} {Z : Type w} {ι : Type v} {f : ι → Z → ℝ} {Ω : Type u}
  [inst : MeasurableSpace Ω] {X : Ω → Z} {μ : Measure Ω} [inst_1 : IsProbabilityMeasure μ] {n : ℕ}
  [inst_2 : Countable ι] [inst_3 : Nonempty ι] (h𝓕 : ∀ (I : ι), Measurable (f I ∘ X)) {b : ℝ}
  (h𝓕' : ∀ (I : ι) (z : Z), |f I z| ≤ b) :
  let f' := fun i => if (↑i.1 == 0) = true then f i.2 else -f i.2;
  (∀ (I : Fin 2 × ι), Measurable (f' I ∘ X)) →
    (∀ (I : Fin 2 × ι) (z : Z), |f' I z| ≤ b) →
      (∫ (x : Fin n → Ω × Ω),
          (fun ω => ⨆ I, ∑ i, (f' I (X (ω i).1) - f' I (X (ω i).2))) x ∂Measure.pi fun x => μ.prod μ) =
        ∫ (x : Fin n → Ω × Ω),
          (fun ω => 2⁻¹ ^ n * ∑ σ, ⨆ I, ∑ i, ↑↑(σ i) * (f' I (X (ω i).1) - f' I (X (ω i).2)))
            x ∂Measure.pi fun x => μ.prod μ := sorry

Tactic state before:
Z : Type w
ι : Type v
f : ι → Z → ℝ
Ω : Type u
inst✝³ : MeasurableSpace Ω
X : Ω → Z
μ : Measure Ω
inst✝² : IsProbabilityMeasure μ
n : ℕ
inst✝¹ : Countable ι
inst✝ : Nonempty ι
h𝓕 : ∀ (I : ι), Measurable (f I ∘ X)
b : ℝ
h𝓕' : ∀ (I : ι) (z : Z), |f I z| ≤ b
f' : Fin 2 × ι → Z → ℝ := fun i => if (↑i.1 == 0) = true then f i.2 else -f i.2
h𝓕₂ : ∀ (I : Fin 2 × ι), Measurable (f' I ∘ X)
h𝓕'₂ : ∀ (I : Fin 2 × ι) (z : Z), |f' I z| ≤ b
⊢ (∫ (x : Fin n → Ω × Ω), (fun ω => ⨆ I, ∑ i, (f' I (X (ω i).1) - f' I (X (ω i).2))) x ∂Measure.pi fun x => μ.prod μ) =
    ∫ (x : Fin n → Ω × Ω),
      (fun ω => 2⁻¹ ^ n * ∑ σ, ⨆ I, ∑ i, ↑↑(σ i) * (f' I (X (ω i).1) - f' I (X (ω i).2)))
        x ∂Measure.pi fun x => μ.prod μ

Tactic:
exact symmetrization_equation h𝓕₂ h𝓕'₂

Tactic state after:
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

theorem extracted_formal_statement_243.{w, v, u} {Z : Type w} {ι : Type v} {f_1 : ι → Z → ℝ} {Ω : Type u}
  [inst : MeasurableSpace Ω] {X : Ω → Z} {μ : Measure Ω} [inst_1 : IsProbabilityMeasure μ] {n : ℕ}
  [inst_2 : Countable ι] [inst_3 : Nonempty ι] (h𝓕 : ∀ (I : ι), Measurable (f_1 I ∘ X)) {b : ℝ}
  (h𝓕' : ∀ (I : ι) (z : Z), |f_1 I z| ≤ b) (ω : Fin n → Ω × Ω) (σ : Signs n) (f : Z → ℝ)
  (h_original_goal :
    ∑ i, ↑↑(σ i) * (-f (X (ω i).1) - -f (X (ω i).2)) = -∑ i, ↑↑(σ i) * (f (X (ω i).1) - f (X (ω i).2))) :
  ∑ i, ↑↑(σ i) * (-f (X (ω i).1) - -f (X (ω i).2)) = ∑ x, -(↑↑(σ x) * (f (X (ω x).1) - f (X (ω x).2))) := sorry

Tactic state before:
Z : Type w
ι : Type v
f✝ : ι → Z → ℝ
Ω : Type u
inst✝³ : MeasurableSpace Ω
X : Ω → Z
μ : Measure Ω
inst✝² : IsProbabilityMeasure μ
n : ℕ
inst✝¹ : Countable ι
inst✝ : Nonempty ι
h𝓕 : ∀ (I : ι), Measurable (f✝ I ∘ X)
b : ℝ
h𝓕' : ∀ (I : ι) (z : Z), |f✝ I z| ≤ b
f' : Fin 2 × ι → Z → ℝ := fun i => if (↑i.1 == 0) = true then f✝ i.2 else -f✝ i.2
ω : Fin n → Ω × Ω
σ : Signs n
V : (Z → ℝ) → ℝ := fun f => ∑ i, ↑↑(σ i) * (f (X (ω i).1) - f (X (ω i).2))
f : Z → ℝ
⊢ ∑ i, ↑↑(σ i) * (-f (X (ω i).1) - -f (X (ω i).2)) = -∑ i, ↑↑(σ i) * (f (X (ω i).1) - f (X (ω i).2))

Tactic:
rw [← Finset.sum_neg_distrib]

Tactic state after:
[Z : Type w
 ι : Type v
 f✝ : ι → Z → ℝ
 Ω : Type u
 inst✝³ : MeasurableSpace Ω
 X : Ω → Z
 μ : Measure Ω
 inst✝² : IsProbabilityMeasure μ
 n : ℕ
 inst✝¹ : Countable ι
 inst✝ : Nonempty ι
 h𝓕 : ∀ (I : ι), Measurable (f✝ I ∘ X)
 b : ℝ
 h𝓕' : ∀ (I : ι) (z : Z), |f✝ I z| ≤ b
 f' : Fin 2 × ι → Z → ℝ := fun i => if (↑i.1 == 0) = true then f✝ i.2 else -f✝ i.2
 ω : Fin n → Ω × Ω
 σ : Signs n
 V : (Z → ℝ) → ℝ := fun f => ∑ i, ↑↑(σ i) * (f (X (ω i).1) - f (X (ω i).2))
 f : Z → ℝ
 ⊢ ∑ i, ↑↑(σ i) * (-f (X (ω i).1) - -f (X (ω i).2)) = ∑ x, -(↑↑(σ x) * (f (X (ω x).1) - f (X (ω x).2)))]
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

theorem extracted_formal_statement_244.{w, v, u} {Z : Type w} {ι : Type v} {f : ι → Z → ℝ} {Ω : Type u}
  [inst : MeasurableSpace Ω] {X : Ω → Z} {μ : Measure Ω} [inst_1 : IsProbabilityMeasure μ] {n : ℕ}
  [inst_2 : Countable ι] [inst_3 : Nonempty ι] (h𝓕 : ∀ (I : ι), Measurable (f I ∘ X)) {b : ℝ}
  (h𝓕' : ∀ (I : ι) (z : Z), |f I z| ≤ b) (ω : Fin n → Ω × Ω) (σ : Signs n) :
  let V := fun f => ∑ i, ↑↑(σ i) * (f (X (ω i).1) - f (X (ω i).2));
  (∀ (f : Z → ℝ), V (-f) = -V f) →
    ∀ ⦃x : ℝ⦄ (I : ι), (fun i => |V (f i)|) I = x → x ≤ ↑n * (b + b) → (fun i => |V (f i)|) I ≤ ↑n * (b + b) := sorry

Tactic state before:
case h
Z : Type w
ι : Type v
f : ι → Z → ℝ
Ω : Type u
inst✝³ : MeasurableSpace Ω
X : Ω → Z
μ : Measure Ω
inst✝² : IsProbabilityMeasure μ
n : ℕ
inst✝¹ : Countable ι
inst✝ : Nonempty ι
h𝓕 : ∀ (I : ι), Measurable (f I ∘ X)
b : ℝ
h𝓕' : ∀ (I : ι) (z : Z), |f I z| ≤ b
f' : Fin 2 × ι → Z → ℝ := fun i => if (↑i.1 == 0) = true then f i.2 else -f i.2
ω : Fin n → Ω × Ω
σ : Signs n
V : (Z → ℝ) → ℝ := fun f => ∑ i, ↑↑(σ i) * (f (X (ω i).1) - f (X (ω i).2))
hV₀ : ∀ (f : Z → ℝ), V (-f) = -V f
x : ℝ
I : ι
eq : (fun i => |V (f i)|) I = x
⊢ x ≤ ↑n * (b + b)

Tactic:
rw [← eq]

Tactic state after:
[case h
 Z : Type w
 ι : Type v
 f : ι → Z → ℝ
 Ω : Type u
 inst✝³ : MeasurableSpace Ω
 X : Ω → Z
 μ : Measure Ω
 inst✝² : IsProbabilityMeasure μ
 n : ℕ
 inst✝¹ : Countable ι
 inst✝ : Nonempty ι
 h𝓕 : ∀ (I : ι), Measurable (f I ∘ X)
 b : ℝ
 h𝓕' : ∀ (I : ι) (z : Z), |f I z| ≤ b
 f' : Fin 2 × ι → Z → ℝ := fun i => if (↑i.1 == 0) = true then f i.2 else -f i.2
 ω : Fin n → Ω × Ω
 σ : Signs n
 V : (Z → ℝ) → ℝ := fun f => ∑ i, ↑↑(σ i) * (f (X (ω i).1) - f (X (ω i).2))
 hV₀ : ∀ (f : Z → ℝ), V (-f) = -V f
 x : ℝ
 I : ι
 eq : (fun i => |V (f i)|) I = x
 ⊢ (fun i => |V (f i)|) I ≤ ↑n * (b + b)]