zzhisthebest/LeanBenchmark huggingface dataset:
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

theorem extracted_formal_statement_48.{w, v, u} {Z : Type w} {ι : Type v} {f : ι → Z → ℝ} {Ω : Type u}
  [inst : MeasurableSpace Ω] {X : Ω → Z} [inst_1 : Countable ι] (h𝓕 : ∀ (I : ι), Measurable (f I ∘ X)) {n : ℕ} {I : ι}
  {i : Fin n} (h_original_goal : Measurable fun a => f I (X (a i).1)) : Measurable fun a => (a i).1 := sorry

Tactic state before:
case hf
Z : Type w
ι : Type v
f : ι → Z → ℝ
Ω : Type u
inst✝¹ : MeasurableSpace Ω
X : Ω → Z
inst✝ : Countable ι
h𝓕 : ∀ (I : ι), Measurable (f I ∘ X)
n : ℕ
I : ι
i : Fin n
⊢ Measurable fun a => f I (X (a i).1)

Tactic:
apply (h𝓕 I).comp

Tactic state after:
[case hf
 Z : Type w
 ι : Type v
 f : ι → Z → ℝ
 Ω : Type u
 inst✝¹ : MeasurableSpace Ω
 X : Ω → Z
 inst✝ : Countable ι
 h𝓕 : ∀ (I : ι), Measurable (f I ∘ X)
 n : ℕ
 I : ι
 i : Fin n
 ⊢ Measurable fun a => (a i).1]
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

theorem extracted_formal_statement_49.{w, v, u} {Z : Type w} {ι : Type v} {f : ι → Z → ℝ} {Ω : Type u}
  [inst : MeasurableSpace Ω] {X : Ω → Z} [inst_1 : Countable ι] (h𝓕 : ∀ (I : ι), Measurable (f I ∘ X)) {n : ℕ} {I : ι}
  {i : Fin n} (h_original_goal : Measurable fun a => f I (X (a i).2)) : Measurable fun a => (a i).2 := sorry

Tactic state before:
case hg
Z : Type w
ι : Type v
f : ι → Z → ℝ
Ω : Type u
inst✝¹ : MeasurableSpace Ω
X : Ω → Z
inst✝ : Countable ι
h𝓕 : ∀ (I : ι), Measurable (f I ∘ X)
n : ℕ
I : ι
i : Fin n
⊢ Measurable fun a => f I (X (a i).2)

Tactic:
apply (h𝓕 I).comp

Tactic state after:
[case hg
 Z : Type w
 ι : Type v
 f : ι → Z → ℝ
 Ω : Type u
 inst✝¹ : MeasurableSpace Ω
 X : Ω → Z
 inst✝ : Countable ι
 h𝓕 : ∀ (I : ι), Measurable (f I ∘ X)
 n : ℕ
 I : ι
 i : Fin n
 ⊢ Measurable fun a => (a i).2]
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

theorem extracted_formal_statement_50.{w, v, u} {Z : Type w} {ι : Type v} {f : ι → Z → ℝ} {Ω : Type u}
  [inst : MeasurableSpace Ω] {X : Ω → Z} [inst_1 : Countable ι] (h𝓕 : ∀ (I : ι), Measurable (f I ∘ X)) {n : ℕ} {I : ι}
  (h_original_goal : Measurable fun ω => ∑ i, (f I (X (ω i).1) - f I (X (ω i).2))) (i : Fin n) :
  i ∈ Finset.univ → Measurable fun a => f I (X (a i).1) - f I (X (a i).2) := sorry

Tactic state before:
Z : Type w
ι : Type v
f : ι → Z → ℝ
Ω : Type u
inst✝¹ : MeasurableSpace Ω
X : Ω → Z
inst✝ : Countable ι
h𝓕 : ∀ (I : ι), Measurable (f I ∘ X)
n : ℕ
I : ι
⊢ Measurable fun ω => ∑ i, (f I (X (ω i).1) - f I (X (ω i).2))

Tactic:
apply Finset.measurable_sum Finset.univ

Tactic state after:
[Z : Type w
 ι : Type v
 f : ι → Z → ℝ
 Ω : Type u
 inst✝¹ : MeasurableSpace Ω
 X : Ω → Z
 inst✝ : Countable ι
 h𝓕 : ∀ (I : ι), Measurable (f I ∘ X)
 n : ℕ
 I : ι
 ⊢ ∀ i ∈ Finset.univ, Measurable fun a => f I (X (a i).1) - f I (X (a i).2)]
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

theorem extracted_formal_statement_51.{w, v, u} {Z : Type w} {ι : Type v} {f : ι → Z → ℝ} {Ω : Type u}
  [inst : MeasurableSpace Ω] {X : Ω → Z} [inst_1 : Countable ι] (h𝓕 : ∀ (I : ι), Measurable (f I ∘ X)) {n : ℕ} {I : ι}
  (i : Fin n) (a : i ∈ Finset.univ) : Measurable fun a => f I (X (a i).1) - f I (X (a i).2) := sorry

Tactic state before:
Z : Type w
ι : Type v
f : ι → Z → ℝ
Ω : Type u
inst✝¹ : MeasurableSpace Ω
X : Ω → Z
inst✝ : Countable ι
h𝓕 : ∀ (I : ι), Measurable (f I ∘ X)
n : ℕ
I : ι
i : Fin n
a✝ : i ∈ Finset.univ
⊢ Measurable fun a => f I (X (a i).1) - f I (X (a i).2)

Tactic:
exact measurable_sub_part h𝓕

Tactic state after:
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

theorem extracted_formal_statement_52.{w, v, u} {Z : Type w} {ι : Type v} {f : ι → Z → ℝ} {Ω : Type u}
  [inst : MeasurableSpace Ω] {X : Ω → Z} [inst_1 : Countable ι] (h𝓕 : ∀ (I : ι), Measurable (f I ∘ X)) (n : ℕ)
  (c : ι → ℝ) (h_original_goal : Measurable fun ω => ⨆ I, ∑ i, (f I (X (ω i).1) - f I (X (ω i).2)) + c I) (i : ι) :
  Measurable fun b => ∑ i_1, (f i (X (b i_1).1) - f i (X (b i_1).2)) + c i := sorry

Tactic state before:
Z : Type w
ι : Type v
f : ι → Z → ℝ
Ω : Type u
inst✝¹ : MeasurableSpace Ω
X : Ω → Z
inst✝ : Countable ι
h𝓕 : ∀ (I : ι), Measurable (f I ∘ X)
n : ℕ
c : ι → ℝ
⊢ Measurable fun ω => ⨆ I, ∑ i, (f I (X (ω i).1) - f I (X (ω i).2)) + c I

Tactic:
apply Measurable.iSup

Tactic state after:
[case hf
 Z : Type w
 ι : Type v
 f : ι → Z → ℝ
 Ω : Type u
 inst✝¹ : MeasurableSpace Ω
 X : Ω → Z
 inst✝ : Countable ι
 h𝓕 : ∀ (I : ι), Measurable (f I ∘ X)
 n : ℕ
 c : ι → ℝ
 ⊢ ∀ (i : ι), Measurable fun b => ∑ i_1, (f i (X (b i_1).1) - f i (X (b i_1).2)) + c i]
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

theorem extracted_formal_statement_53.{w, v, u} {Z : Type w} {ι : Type v} {f : ι → Z → ℝ} {Ω : Type u}
  [inst : MeasurableSpace Ω] {X : Ω → Z} [inst_1 : Countable ι] (h𝓕 : ∀ (I : ι), Measurable (f I ∘ X)) (n : ℕ)
  (c : ι → ℝ) (I : ι) (h_original_goal : Measurable fun b => ∑ i, (f I (X (b i).1) - f I (X (b i).2)) + c I) :
  Measurable fun x => ∑ i, (f I (X (x i).1) - f I (X (x i).2)) := sorry

Tactic state before:
case hf
Z : Type w
ι : Type v
f : ι → Z → ℝ
Ω : Type u
inst✝¹ : MeasurableSpace Ω
X : Ω → Z
inst✝ : Countable ι
h𝓕 : ∀ (I : ι), Measurable (f I ∘ X)
n : ℕ
c : ι → ℝ
I : ι
⊢ Measurable fun b => ∑ i, (f I (X (b i).1) - f I (X (b i).2)) + c I

Tactic:
apply Measurable.add_const

Tactic state after:
[case hf.hf
 Z : Type w
 ι : Type v
 f : ι → Z → ℝ
 Ω : Type u
 inst✝¹ : MeasurableSpace Ω
 X : Ω → Z
 inst✝ : Countable ι
 h𝓕 : ∀ (I : ι), Measurable (f I ∘ X)
 n : ℕ
 c : ι → ℝ
 I : ι
 ⊢ Measurable fun x => ∑ i, (f I (X (x i).1) - f I (X (x i).2))]
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

theorem extracted_formal_statement_54.{w, v, u} {Z : Type w} {ι : Type v} {f : ι → Z → ℝ} {Ω : Type u}
  [inst : MeasurableSpace Ω] {X : Ω → Z} [inst_1 : Countable ι] (h𝓕 : ∀ (I : ι), Measurable (f I ∘ X)) (n : ℕ) (I : ι) :
  Measurable fun x => ∑ i, (f I (X (x i).1) - f I (X (x i).2)) := sorry

Tactic state before:
case hf.hf
Z : Type w
ι : Type v
f : ι → Z → ℝ
Ω : Type u
inst✝¹ : MeasurableSpace Ω
X : Ω → Z
inst✝ : Countable ι
h𝓕 : ∀ (I : ι), Measurable (f I ∘ X)
n : ℕ
c : ι → ℝ
I : ι
⊢ Measurable fun x => ∑ i, (f I (X (x i).1) - f I (X (x i).2))

Tactic:
exact measurable_sum_part h𝓕

Tactic state after:
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

theorem extracted_formal_statement_55.{v} {ι : Type v} [inst : Nonempty ι] {f : ι → ℝ} {a : ℝ} (hf : ∀ (i : ι), |f i| ≤ a)
  ⦃x : ℝ⦄ (i : ι) (heq : f i = x) (this : |x| ≤ a) : x ≤ a := sorry

Tactic state before:
case h
ι : Type v
inst✝ : Nonempty ι
f : ι → ℝ
a : ℝ
hf : ∀ (i : ι), |f i| ≤ a
x : ℝ
i : ι
heq : f i = x
this : |x| ≤ a
⊢ x ≤ a

Tactic:
exact le_of_max_le_left this

Tactic state after:
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

theorem extracted_formal_statement_56.{v} {ι : Type v} [inst : Nonempty ι] {f : ι → ℝ} {a : ℝ} (hf : ∀ (i : ι), |f i| ≤ a)
  (hbdd : BddAbove (Set.range f)) (h_original_goal : |⨆ i, f i| ≤ a) : -a ≤ ⨆ i, f i ∧ ⨆ i, f i ≤ a := sorry

Tactic state before:
ι : Type v
inst✝ : Nonempty ι
f : ι → ℝ
a : ℝ
hf : ∀ (i : ι), |f i| ≤ a
hbdd : BddAbove (Set.range f)
⊢ |⨆ i, f i| ≤ a

Tactic:
apply abs_le.mpr

Tactic state after:
[ι : Type v
 inst✝ : Nonempty ι
 f : ι → ℝ
 a : ℝ
 hf : ∀ (i : ι), |f i| ≤ a
 hbdd : BddAbove (Set.range f)
 ⊢ -a ≤ ⨆ i, f i ∧ ⨆ i, f i ≤ a]
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

theorem extracted_formal_statement_57.{v} {ι : Type v} [inst : Nonempty ι] {f : ι → ℝ} {a : ℝ} (hf : ∀ (i : ι), |f i| ≤ a)
  (hbdd : BddAbove (Set.range f)) : -a ≤ ⨆ i, f i := sorry

Tactic state before:
case left
ι : Type v
inst✝ : Nonempty ι
f : ι → ℝ
a : ℝ
hf : ∀ (i : ι), |f i| ≤ a
hbdd : BddAbove (Set.range f)
i : ι := inst✝.some
⊢ -a ≤ ⨆ i, f i

Tactic:
exact le_trans (abs_le.mp (hf i)).1 (le_ciSup hbdd i)

Tactic state after:
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

theorem extracted_formal_statement_58.{v} {ι : Type v} [inst : Nonempty ι] {f : ι → ℝ} {a : ℝ} (hf : ∀ (i : ι), |f i| ≤ a)
  (hbdd : BddAbove (Set.range f)) (h_original_goal : ⨆ i, f i ≤ a) (x : ι) : f x ≤ a := sorry

Tactic state before:
case right
ι : Type v
inst✝ : Nonempty ι
f : ι → ℝ
a : ℝ
hf : ∀ (i : ι), |f i| ≤ a
hbdd : BddAbove (Set.range f)
⊢ ⨆ i, f i ≤ a

Tactic:
apply ciSup_le

Tactic state after:
[case right.H
 ι : Type v
 inst✝ : Nonempty ι
 f : ι → ℝ
 a : ℝ
 hf : ∀ (i : ι), |f i| ≤ a
 hbdd : BddAbove (Set.range f)
 ⊢ ∀ (x : ι), f x ≤ a]
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

theorem extracted_formal_statement_59.{v} {ι : Type v} [inst : Nonempty ι] {f : ι → ℝ} {a : ℝ} (hf : ∀ (i : ι), |f i| ≤ a)
  (hbdd : BddAbove (Set.range f)) (x : ι) : f x ≤ a := sorry

Tactic state before:
case right.H
ι : Type v
inst✝ : Nonempty ι
f : ι → ℝ
a : ℝ
hf : ∀ (i : ι), |f i| ≤ a
hbdd : BddAbove (Set.range f)
⊢ ∀ (x : ι), f x ≤ a

Tactic:
exact fun x ↦ le_of_max_le_left (hf x)

Tactic state after:
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

theorem extracted_formal_statement_60.{w, v, u} {Z : Type w} {ι : Type v} {f : ι → Z → ℝ} {Ω : Type u} {X : Ω → Z} {n : ℕ}
  {b : ℝ} (h𝓕' : ∀ (I : ι) (z : Z), |f I z| ≤ b) (ω : Fin n → Ω × Ω) (I : ι)
  (h_original_goal : ∑ i, |f I (X (ω i).1) - f I (X (ω i).2)| ≤ ∑ i, (b + b)) :
  (fun i => |f I (X (ω i).1) - f I (X (ω i).2)|) ≤ fun i => b + b := sorry

Tactic state before:
Z : Type w
ι : Type v
f : ι → Z → ℝ
Ω : Type u
X : Ω → Z
n : ℕ
b : ℝ
h𝓕' : ∀ (I : ι) (z : Z), |f I z| ≤ b
ω : Fin n → Ω × Ω
I : ι
⊢ ∑ i, |f I (X (ω i).1) - f I (X (ω i).2)| ≤ ∑ i, (b + b)

Tactic:
apply Fintype.sum_mono

Tactic state after:
[case a
 Z : Type w
 ι : Type v
 f : ι → Z → ℝ
 Ω : Type u
 X : Ω → Z
 n : ℕ
 b : ℝ
 h𝓕' : ∀ (I : ι) (z : Z), |f I z| ≤ b
 ω : Fin n → Ω × Ω
 I : ι
 ⊢ (fun i => |f I (X (ω i).1) - f I (X (ω i).2)|) ≤ fun i => b + b]
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

theorem extracted_formal_statement_61.{w, v, u} {Z : Type w} {ι : Type v} {f : ι → Z → ℝ} {Ω : Type u} {X : Ω → Z} {n : ℕ}
  {b : ℝ} (h𝓕' : ∀ (I : ι) (z : Z), |f I z| ≤ b) (ω : Fin n → Ω × Ω) (I : ι) (i : Fin n) :
  (fun i => |f I (X (ω i).1) - f I (X (ω i).2)|) i ≤ (fun i => b + b) i := sorry

Tactic state before:
case a
Z : Type w
ι : Type v
f : ι → Z → ℝ
Ω : Type u
X : Ω → Z
n : ℕ
b : ℝ
h𝓕' : ∀ (I : ι) (z : Z), |f I z| ≤ b
ω : Fin n → Ω × Ω
I : ι
i : Fin n
⊢ (fun i => |f I (X (ω i).1) - f I (X (ω i).2)|) i ≤ (fun i => b + b) i

Tactic:
exact bound_sub h𝓕'

Tactic state after:
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

theorem extracted_formal_statement_62.{w, v, u} {Z : Type w} {ι : Type v} {f : ι → Z → ℝ} {Ω : Type u} {X : Ω → Z} {n : ℕ}
  {b : ℝ} (h𝓕' : ∀ (I : ι) (z : Z), |f I z| ≤ b) (h_original_goal : ∑ i, (b + b) = ↑n * (b + b)) :
  ↑n * b + ↑n * b = ↑n * (b + b) := sorry

Tactic state before:
Z : Type w
ι : Type v
f : ι → Z → ℝ
Ω : Type u
X : Ω → Z
n : ℕ
b : ℝ
h𝓕' : ∀ (I : ι) (z : Z), |f I z| ≤ b
ω : Fin n → Ω × Ω
I : ι
⊢ ∑ i, (b + b) = ↑n * (b + b)

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

Tactic state after:
[Z : Type w
 ι : Type v
 f : ι → Z → ℝ
 Ω : Type u
 X : Ω → Z
 n : ℕ
 b : ℝ
 h𝓕' : ∀ (I : ι) (z : Z), |f I z| ≤ b
 ω : Fin n → Ω × Ω
 I : ι
 ⊢ ↑n * b + ↑n * b = ↑n * (b + b)]
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

theorem extracted_formal_statement_63.{w, v, u} {Z : Type w} {ι : Type v} {f : ι → Z → ℝ} {Ω : Type u} {X : Ω → Z} {n : ℕ}
  [inst : Nonempty ι] {b : ℝ} (h𝓕' : ∀ (I : ι) (z : Z), |f I z| ≤ b) {c : ι → ℝ} {C : ℝ} (hC : ∀ (I : ι), |c I| ≤ C)
  (ω : Fin n → Ω × Ω) (h_original_goal : |⨆ I, ∑ i, (f I (X (ω i).1) - f I (X (ω i).2)) + c I| ≤ ↑n * (b + b) + C)
  (i : ι) : |∑ i_1, (f i (X (ω i_1).1) - f i (X (ω i_1).2)) + c i| ≤ ↑n * (b + b) + C := sorry

Tactic state before:
Z : Type w
ι : Type v
f : ι → Z → ℝ
Ω : Type u
X : Ω → Z
n : ℕ
inst✝ : Nonempty ι
b : ℝ
h𝓕' : ∀ (I : ι) (z : Z), |f I z| ≤ b
c : ι → ℝ
C : ℝ
hC : ∀ (I : ι), |c I| ≤ C
ω : Fin n → Ω × Ω
⊢ |⨆ I, ∑ i, (f I (X (ω i).1) - f I (X (ω i).2)) + c I| ≤ ↑n * (b + b) + C

Tactic:
apply abs_iSup_le

Tactic state after:
[case hf
 Z : Type w
 ι : Type v
 f : ι → Z → ℝ
 Ω : Type u
 X : Ω → Z
 n : ℕ
 inst✝ : Nonempty ι
 b : ℝ
 h𝓕' : ∀ (I : ι) (z : Z), |f I z| ≤ b
 c : ι → ℝ
 C : ℝ
 hC : ∀ (I : ι), |c I| ≤ C
 ω : Fin n → Ω × Ω
 ⊢ ∀ (i : ι), |∑ i_1, (f i (X (ω i_1).1) - f i (X (ω i_1).2)) + c i| ≤ ↑n * (b + b) + C]
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

theorem extracted_formal_statement_64.{w, v, u} {Z : Type w} {ι : Type v} {f : ι → Z → ℝ} {Ω : Type u} {X : Ω → Z} {n : ℕ}
  [inst : Nonempty ι] {b : ℝ} (h𝓕' : ∀ (I : ι) (z : Z), |f I z| ≤ b) {c : ι → ℝ} {C : ℝ} (hC : ∀ (I : ι), |c I| ≤ C)
  (ω : Fin n → Ω × Ω) (I : ι) :
  |∑ i, (f I (X (ω i).1) - f I (X (ω i).2)) + c I| ≤ |∑ i, (f I (X (ω i).1) - f I (X (ω i).2))| + |c I| := sorry

Tactic state before:
Z : Type w
ι : Type v
f : ι → Z → ℝ
Ω : Type u
X : Ω → Z
n : ℕ
inst✝ : Nonempty ι
b : ℝ
h𝓕' : ∀ (I : ι) (z : Z), |f I z| ≤ b
c : ι → ℝ
C : ℝ
hC : ∀ (I : ι), |c I| ≤ C
ω : Fin n → Ω × Ω
I : ι
⊢ |∑ i, (f I (X (ω i).1) - f I (X (ω i).2)) + c I| ≤ |∑ i, (f I (X (ω i).1) - f I (X (ω i).2))| + |c I|

Tactic:
apply abs_add_le

Tactic state after:
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

theorem extracted_formal_statement_65.{w, v, u} {Z : Type w} {ι : Type v} {f : ι → Z → ℝ} {Ω : Type u} {X : Ω → Z} {n : ℕ}
  [inst : Nonempty ι] {b : ℝ} (h𝓕' : ∀ (I : ι) (z : Z), |f I z| ≤ b) {c : ι → ℝ} {C : ℝ} (hC : ∀ (I : ι), |c I| ≤ C)
  (ω : Fin n → Ω × Ω) (I : ι) : |∑ i, (f I (X (ω i).1) - f I (X (ω i).2))| + |c I| ≤ ↑n * (b + b) + |c I| := sorry

Tactic state before:
Z : Type w
ι : Type v
f : ι → Z → ℝ
Ω : Type u
X : Ω → Z
n : ℕ
inst✝ : Nonempty ι
b : ℝ
h𝓕' : ∀ (I : ι) (z : Z), |f I z| ≤ b
c : ι → ℝ
C : ℝ
hC : ∀ (I : ι), |c I| ≤ C
ω : Fin n → Ω × Ω
I : ι
⊢ |∑ i, (f I (X (ω i).1) - f I (X (ω i).2))| + |c I| ≤ ↑n * (b + b) + |c I|

Tactic:
apply add_le_add_right (bound_lem h𝓕' ω I)

Tactic state after:
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

theorem extracted_formal_statement_66.{w, v, u} {Z : Type w} {ι : Type v} {f : ι → Z → ℝ} {Ω : Type u} {X : Ω → Z} {n : ℕ}
  {b : ℝ} (h𝓕' : ∀ (I : ι) (z : Z), |f I z| ≤ b) (ω : Fin n → Ω × Ω) (I : ι) (σ : Fin n → { x // x ∈ {-1, 1} })
  (h_original_goal : ∑ i, |↑↑(σ i) * (f I (X (ω i).1) - f I (X (ω i).2))| ≤ ∑ i, (b + b)) :
  (fun i => |↑↑(σ i) * (f I (X (ω i).1) - f I (X (ω i).2))|) ≤ fun i => b + b := sorry

Tactic state before:
Z : Type w
ι : Type v
f : ι → Z → ℝ
Ω : Type u
X : Ω → Z
n : ℕ
b : ℝ
h𝓕' : ∀ (I : ι) (z : Z), |f I z| ≤ b
ω : Fin n → Ω × Ω
I : ι
σ : Fin n → { x // x ∈ {-1, 1} }
⊢ ∑ i, |↑↑(σ i) * (f I (X (ω i).1) - f I (X (ω i).2))| ≤ ∑ i, (b + b)

Tactic:
apply Fintype.sum_mono

Tactic state after:
[case a
 Z : Type w
 ι : Type v
 f : ι → Z → ℝ
 Ω : Type u
 X : Ω → Z
 n : ℕ
 b : ℝ
 h𝓕' : ∀ (I : ι) (z : Z), |f I z| ≤ b
 ω : Fin n → Ω × Ω
 I : ι
 σ : Fin n → { x // x ∈ {-1, 1} }
 ⊢ (fun i => |↑↑(σ i) * (f I (X (ω i).1) - f I (X (ω i).2))|) ≤ fun i => b + b]
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

theorem extracted_formal_statement_67.{w, v, u} {Z : Type w} {ι : Type v} {f : ι → Z → ℝ} {Ω : Type u} {X : Ω → Z} {n : ℕ}
  {b : ℝ} (h𝓕' : ∀ (I : ι) (z : Z), |f I z| ≤ b) (ω : Fin n → Ω × Ω) (I : ι) (σ : Fin n → { x // x ∈ {-1, 1} })
  (i : Fin n) (this : |↑↑(σ i)| = 1) (h_original_goal : |↑↑(σ i) * (f I (X (ω i).1) - f I (X (ω i).2))| ≤ b + b) :
  1 * |f I (X (ω i).1) - f I (X (ω i).2)| ≤ b + b := sorry

Tactic state before:
case a
Z : Type w
ι : Type v
f : ι → Z → ℝ
Ω : Type u
X : Ω → Z
n : ℕ
b : ℝ
h𝓕' : ∀ (I : ι) (z : Z), |f I z| ≤ b
ω : Fin n → Ω × Ω
I : ι
σ : Fin n → { x // x ∈ {-1, 1} }
i : Fin n
this : |↑↑(σ i)| = 1
⊢ |↑↑(σ i) * (f I (X (ω i).1) - f I (X (ω i).2))| ≤ b + b

Tactic:
rw [abs_mul, this]

Tactic state after:
[case a
 Z : Type w
 ι : Type v
 f : ι → Z → ℝ
 Ω : Type u
 X : Ω → Z
 n : ℕ
 b : ℝ
 h𝓕' : ∀ (I : ι) (z : Z), |f I z| ≤ b
 ω : Fin n → Ω × Ω
 I : ι
 σ : Fin n → { x // x ∈ {-1, 1} }
 i : Fin n
 this : |↑↑(σ i)| = 1
 ⊢ 1 * |f I (X (ω i).1) - f I (X (ω i).2)| ≤ b + b]
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

theorem extracted_formal_statement_68.{w, v, u} {Z : Type w} {ι : Type v} {f : ι → Z → ℝ} {Ω : Type u} {X : Ω → Z} {n : ℕ}
  {b : ℝ} (h𝓕' : ∀ (I : ι) (z : Z), |f I z| ≤ b) (ω : Fin n → Ω × Ω) (I : ι) (σ : Fin n → { x // x ∈ {-1, 1} })
  (i : Fin n) (this : |↑↑(σ i)| = 1) (h_original_goal : 1 * |f I (X (ω i).1) - f I (X (ω i).2)| ≤ b + b) :
  |f I (X (ω i).1) - f I (X (ω i).2)| ≤ b + b := sorry

Tactic state before:
case a
Z : Type w
ι : Type v
f : ι → Z → ℝ
Ω : Type u
X : Ω → Z
n : ℕ
b : ℝ
h𝓕' : ∀ (I : ι) (z : Z), |f I z| ≤ b
ω : Fin n → Ω × Ω
I : ι
σ : Fin n → { x // x ∈ {-1, 1} }
i : Fin n
this : |↑↑(σ i)| = 1
⊢ 1 * |f I (X (ω i).1) - f I (X (ω i).2)| ≤ b + b

Tactic:
simp only [one_mul, ge_iff_le]

Tactic state after:
[case a
 Z : Type w
 ι : Type v
 f : ι → Z → ℝ
 Ω : Type u
 X : Ω → Z
 n : ℕ
 b : ℝ
 h𝓕' : ∀ (I : ι) (z : Z), |f I z| ≤ b
 ω : Fin n → Ω × Ω
 I : ι
 σ : Fin n → { x // x ∈ {-1, 1} }
 i : Fin n
 this : |↑↑(σ i)| = 1
 ⊢ |f I (X (ω i).1) - f I (X (ω i).2)| ≤ b + b]
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

theorem extracted_formal_statement_69.{w, v, u} {Z : Type w} {ι : Type v} {f : ι → Z → ℝ} {Ω : Type u} {X : Ω → Z} {n : ℕ}
  {b : ℝ} (h𝓕' : ∀ (I : ι) (z : Z), |f I z| ≤ b) (ω : Fin n → Ω × Ω) (I : ι) (σ : Fin n → { x // x ∈ {-1, 1} })
  (i : Fin n) (this : |↑↑(σ i)| = 1) : |f I (X (ω i).1) - f I (X (ω i).2)| ≤ b + b := sorry

Tactic state before:
case a
Z : Type w
ι : Type v
f : ι → Z → ℝ
Ω : Type u
X : Ω → Z
n : ℕ
b : ℝ
h𝓕' : ∀ (I : ι) (z : Z), |f I z| ≤ b
ω : Fin n → Ω × Ω
I : ι
σ : Fin n → { x // x ∈ {-1, 1} }
i : Fin n
this : |↑↑(σ i)| = 1
⊢ |f I (X (ω i).1) - f I (X (ω i).2)| ≤ b + b

Tactic:
exact bound_sub h𝓕'

Tactic state after:
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

theorem extracted_formal_statement_70.{w, v, u} {Z : Type w} {ι : Type v} {f : ι → Z → ℝ} {Ω : Type u} {X : Ω → Z} {n : ℕ}
  {b : ℝ} (h𝓕' : ∀ (I : ι) (z : Z), |f I z| ≤ b) (h_original_goal : ∑ i, (b + b) = ↑n * (b + b)) :
  ↑n * b + ↑n * b = ↑n * (b + b) := sorry

Tactic state before:
Z : Type w
ι : Type v
f : ι → Z → ℝ
Ω : Type u
X : Ω → Z
n : ℕ
b : ℝ
h𝓕' : ∀ (I : ι) (z : Z), |f I z| ≤ b
ω : Fin n → Ω × Ω
I : ι
σ : Fin n → { x // x ∈ {-1, 1} }
⊢ ∑ i, (b + b) = ↑n * (b + b)

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

Tactic state after:
[Z : Type w
 ι : Type v
 f : ι → Z → ℝ
 Ω : Type u
 X : Ω → Z
 n : ℕ
 b : ℝ
 h𝓕' : ∀ (I : ι) (z : Z), |f I z| ≤ b
 ω : Fin n → Ω × Ω
 I : ι
 σ : Fin n → { x // x ∈ {-1, 1} }
 ⊢ ↑n * b + ↑n * b = ↑n * (b + b)]
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

theorem extracted_formal_statement_71.{w, v, u} {Z : Type w} {ι : Type v} {f : ι → Z → ℝ} {Ω : Type u} {X : Ω → Z} {n : ℕ}
  [inst : Nonempty ι] {b : ℝ} (h𝓕' : ∀ (I : ι) (z : Z), |f I z| ≤ b) {c : ι → ℝ} {C : ℝ} (hC : ∀ (I : ι), |c I| ≤ C)
  (ω : Fin n → Ω × Ω) (σ : Fin n → { x // x ∈ {-1, 1} })
  (h_original_goal : |⨆ I, ∑ i, ↑↑(σ i) * (f I (X (ω i).1) - f I (X (ω i).2)) + c I| ≤ ↑n * (b + b) + C) (i : ι) :
  |∑ i_1, ↑↑(σ i_1) * (f i (X (ω i_1).1) - f i (X (ω i_1).2)) + c i| ≤ ↑n * (b + b) + C := sorry

Tactic state before:
Z : Type w
ι : Type v
f : ι → Z → ℝ
Ω : Type u
X : Ω → Z
n : ℕ
inst✝ : Nonempty ι
b : ℝ
h𝓕' : ∀ (I : ι) (z : Z), |f I z| ≤ b
c : ι → ℝ
C : ℝ
hC : ∀ (I : ι), |c I| ≤ C
ω : Fin n → Ω × Ω
σ : Fin n → { x // x ∈ {-1, 1} }
⊢ |⨆ I, ∑ i, ↑↑(σ i) * (f I (X (ω i).1) - f I (X (ω i).2)) + c I| ≤ ↑n * (b + b) + C

Tactic:
apply abs_iSup_le

Tactic state after:
[case hf
 Z : Type w
 ι : Type v
 f : ι → Z → ℝ
 Ω : Type u
 X : Ω → Z
 n : ℕ
 inst✝ : Nonempty ι
 b : ℝ
 h𝓕' : ∀ (I : ι) (z : Z), |f I z| ≤ b
 c : ι → ℝ
 C : ℝ
 hC : ∀ (I : ι), |c I| ≤ C
 ω : Fin n → Ω × Ω
 σ : Fin n → { x // x ∈ {-1, 1} }
 ⊢ ∀ (i : ι), |∑ i_1, ↑↑(σ i_1) * (f i (X (ω i_1).1) - f i (X (ω i_1).2)) + c i| ≤ ↑n * (b + b) + C]
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

theorem extracted_formal_statement_72.{w, v, u} {Z : Type w} {ι : Type v} {f : ι → Z → ℝ} {Ω : Type u} {X : Ω → Z} {n : ℕ}
  [inst : Nonempty ι] {b : ℝ} (h𝓕' : ∀ (I : ι) (z : Z), |f I z| ≤ b) {c : ι → ℝ} {C : ℝ} (hC : ∀ (I : ι), |c I| ≤ C)
  (ω : Fin n → Ω × Ω) (σ : Fin n → { x // x ∈ {-1, 1} }) (I : ι) :
  |∑ i, ↑↑(σ i) * (f I (X (ω i).1) - f I (X (ω i).2)) + c I| ≤
    |∑ i, ↑↑(σ i) * (f I (X (ω i).1) - f I (X (ω i).2))| + |c I| := sorry

Tactic state before:
Z : Type w
ι : Type v
f : ι → Z → ℝ
Ω : Type u
X : Ω → Z
n : ℕ
inst✝ : Nonempty ι
b : ℝ
h𝓕' : ∀ (I : ι) (z : Z), |f I z| ≤ b
c : ι → ℝ
C : ℝ
hC : ∀ (I : ι), |c I| ≤ C
ω : Fin n → Ω × Ω
σ : Fin n → { x // x ∈ {-1, 1} }
I : ι
⊢ |∑ i, ↑↑(σ i) * (f I (X (ω i).1) - f I (X (ω i).2)) + c I| ≤
    |∑ i, ↑↑(σ i) * (f I (X (ω i).1) - f I (X (ω i).2))| + |c I|

Tactic:
apply abs_add_le

Tactic state after:
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

theorem extracted_formal_statement_73.{w, v, u} {Z : Type w} {ι : Type v} {f : ι → Z → ℝ} {Ω : Type u} {X : Ω → Z} {n : ℕ}
  [inst : Nonempty ι] {b : ℝ} (h𝓕' : ∀ (I : ι) (z : Z), |f I z| ≤ b) {c : ι → ℝ} {C : ℝ} (hC : ∀ (I : ι), |c I| ≤ C)
  (ω : Fin n → Ω × Ω) (σ : Fin n → { x // x ∈ {-1, 1} }) (I : ι) :
  |∑ i, ↑↑(σ i) * (f I (X (ω i).1) - f I (X (ω i).2))| + |c I| ≤ ↑n * (b + b) + |c I| := sorry

Tactic state before:
Z : Type w
ι : Type v
f : ι → Z → ℝ
Ω : Type u
X : Ω → Z
n : ℕ
inst✝ : Nonempty ι
b : ℝ
h𝓕' : ∀ (I : ι) (z : Z), |f I z| ≤ b
c : ι → ℝ
C : ℝ
hC : ∀ (I : ι), |c I| ≤ C
ω : Fin n → Ω × Ω
σ : Fin n → { x // x ∈ {-1, 1} }
I : ι
⊢ |∑ i, ↑↑(σ i) * (f I (X (ω i).1) - f I (X (ω i).2))| + |c I| ≤ ↑n * (b + b) + |c I|

Tactic:
apply add_le_add_right (bound_lem' h𝓕' ω I σ)

Tactic state after:
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

theorem extracted_formal_statement_74.{w, v, u} {Z : Type w} {ι : Type v} {f : ι → Z → ℝ} {Ω : Type u}
  [inst : MeasurableSpace Ω] {X : Ω → Z} {μ : Measure Ω} [inst_1 : IsProbabilityMeasure μ] [inst_2 : Countable ι]
  [inst_3 : Nonempty ι] (h𝓕 : ∀ (I : ι), Measurable (f I ∘ X)) {b : ℝ} (h𝓕' : ∀ (I : ι) (z : Z), |f I z| ≤ b) {n : ℕ}
  {c : ι → ℝ} {C : ℝ} (hC : ∀ (I : ι), |c I| ≤ C)
  (h_original_goal :
    AEStronglyMeasurable
      (fun ω => ⨆ I, ∑ i, (f I (X (ω.2 i).1) - f I (X (ω.2 i).2)) + (f I (X ω.1.1) - f I (X ω.1.2) + c I))
      ((μ.prod μ).prod (Measure.pi fun x => μ.prod μ))) :
  Measurable fun ω => ⨆ I, ∑ i, (f I (X (ω.2 i).1) - f I (X (ω.2 i).2)) + (f I (X ω.1.1) - f I (X ω.1.2) + c I) := sorry

Tactic state before:
case left
Z : Type w
ι : Type v
f : ι → Z → ℝ
Ω : Type u
inst✝³ : MeasurableSpace Ω
X : Ω → Z
μ : Measure Ω
inst✝² : IsProbabilityMeasure μ
inst✝¹ : Countable ι
inst✝ : Nonempty ι
h𝓕 : ∀ (I : ι), Measurable (f I ∘ X)
b : ℝ
h𝓕' : ∀ (I : ι) (z : Z), |f I z| ≤ b
n : ℕ
c : ι → ℝ
C : ℝ
hC : ∀ (I : ι), |c I| ≤ C
⊢ AEStronglyMeasurable
    (fun ω => ⨆ I, ∑ i, (f I (X (ω.2 i).1) - f I (X (ω.2 i).2)) + (f I (X ω.1.1) - f I (X ω.1.2) + c I))
    ((μ.prod μ).prod (Measure.pi fun x => μ.prod μ))

Tactic:
apply Measurable.aestronglyMeasurable

Tactic state after:
[case left.hf
 Z : Type w
 ι : Type v
 f : ι → Z → ℝ
 Ω : Type u
 inst✝³ : MeasurableSpace Ω
 X : Ω → Z
 μ : Measure Ω
 inst✝² : IsProbabilityMeasure μ
 inst✝¹ : Countable ι
 inst✝ : Nonempty ι
 h𝓕 : ∀ (I : ι), Measurable (f I ∘ X)
 b : ℝ
 h𝓕' : ∀ (I : ι) (z : Z), |f I z| ≤ b
 n : ℕ
 c : ι → ℝ
 C : ℝ
 hC : ∀ (I : ι), |c I| ≤ C
 ⊢ Measurable fun ω => ⨆ I, ∑ i, (f I (X (ω.2 i).1) - f I (X (ω.2 i).2)) + (f I (X ω.1.1) - f I (X ω.1.2) + c I)]