zzhisthebest/LeanBenchmark huggingface dataset:
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

theorem extracted_formal_statement_132.{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) (σ : Fin (n + 1) → { x // x ∈ {-1, 1} }) (a : σ ∈ Finset.univ) (I : ι)
  (h_original_goal :
    Measurable fun b =>
      ∑ i, ↑↑(σ ↑↑i) * (f I (X (b.2 i).1) - f I (X (b.2 i).2)) + (↑↑(σ ↑n) * (f I (X b.1.1) - f I (X b.1.2)) + c I)) :
  Measurable fun a => ↑↑(σ ↑n) * (f I (X a.1.1) - f I (X a.1.2)) + c I := sorry

Tactic state before:
case left.hf.hf.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
σ : Fin (n + 1) → { x // x ∈ {-1, 1} }
a✝ : σ ∈ Finset.univ
I : ι
⊢ Measurable fun b =>
    ∑ i, ↑↑(σ ↑↑i) * (f I (X (b.2 i).1) - f I (X (b.2 i).2)) + (↑↑(σ ↑n) * (f I (X b.1.1) - f I (X b.1.2)) + c I)

Tactic:
apply Measurable.add

Tactic state after:
[case left.hf.hf.hf.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
 σ : Fin (n + 1) → { x // x ∈ {-1, 1} }
 a✝ : σ ∈ Finset.univ
 I : ι
 ⊢ Measurable fun a => ∑ i, ↑↑(σ ↑↑i) * (f I (X (a.2 i).1) - f I (X (a.2 i).2)),
 case left.hf.hf.hf.hg
 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
 σ : Fin (n + 1) → { x // x ∈ {-1, 1} }
 a✝ : σ ∈ Finset.univ
 I : ι
 ⊢ Measurable fun a => ↑↑(σ ↑n) * (f I (X a.1.1) - f I (X a.1.2)) + c I]
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

theorem extracted_formal_statement_133.{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) (σ : Fin (n + 1) → { x // x ∈ {-1, 1} }) (a : σ ∈ Finset.univ) (I : ι)
  (h_original_goal : Measurable fun a => ∑ i, ↑↑(σ ↑↑i) * (f I (X (a.2 i).1) - f I (X (a.2 i).2))) (i : Fin n) :
  i ∈ Finset.univ → Measurable fun a => ↑↑(σ ↑↑i) * (f I (X (a.2 i).1) - f I (X (a.2 i).2)) := sorry

Tactic state before:
case left.hf.hf.hf.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
σ : Fin (n + 1) → { x // x ∈ {-1, 1} }
a✝ : σ ∈ Finset.univ
I : ι
⊢ Measurable fun a => ∑ i, ↑↑(σ ↑↑i) * (f I (X (a.2 i).1) - f I (X (a.2 i).2))

Tactic:
apply Finset.measurable_sum Finset.univ

Tactic state after:
[case left.hf.hf.hf.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
 σ : Fin (n + 1) → { x // x ∈ {-1, 1} }
 a✝ : σ ∈ Finset.univ
 I : ι
 ⊢ ∀ i ∈ Finset.univ, Measurable fun a => ↑↑(σ ↑↑i) * (f I (X (a.2 i).1) - f I (X (a.2 i).2))]
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

theorem extracted_formal_statement_134.{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) (σ : Fin (n + 1) → { x // x ∈ {-1, 1} }) (a : σ ∈ Finset.univ) (I : ι)
  (i : Fin n) (a_1 : i ∈ Finset.univ)
  (h_original_goal : Measurable fun a => ↑↑(σ ↑↑i) * (f I (X (a.2 i).1) - f I (X (a.2 i).2))) :
  Measurable fun x => f I (X (x.2 i).1) - f I (X (x.2 i).2) := sorry

Tactic state before:
case left.hf.hf.hf.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
σ : Fin (n + 1) → { x // x ∈ {-1, 1} }
a✝¹ : σ ∈ Finset.univ
I : ι
i : Fin n
a✝ : i ∈ Finset.univ
⊢ Measurable fun a => ↑↑(σ ↑↑i) * (f I (X (a.2 i).1) - f I (X (a.2 i).2))

Tactic:
apply Measurable.const_mul

Tactic state after:
[case left.hf.hf.hf.hf.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
 σ : Fin (n + 1) → { x // x ∈ {-1, 1} }
 a✝¹ : σ ∈ Finset.univ
 I : ι
 i : Fin n
 a✝ : i ∈ Finset.univ
 ⊢ Measurable fun x => f I (X (x.2 i).1) - f I (X (x.2 i).2)]
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

theorem extracted_formal_statement_135.{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) (σ : Fin (n + 1) → { x // x ∈ {-1, 1} }) (a : σ ∈ Finset.univ) (I : ι)
  (i : Fin n) (a_1 : i ∈ Finset.univ) : Measurable fun x => f I (X (x.2 i).1) - f I (X (x.2 i).2) := sorry

Tactic state before:
case left.hf.hf.hf.hf.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
σ : Fin (n + 1) → { x // x ∈ {-1, 1} }
a✝¹ : σ ∈ Finset.univ
I : ι
i : Fin n
a✝ : i ∈ Finset.univ
⊢ Measurable fun x => f I (X (x.2 i).1) - f I (X (x.2 i).2)

Tactic:
exact (measurable_sub_part h𝓕).comp measurable_snd

Tactic state after:
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

theorem extracted_formal_statement_136.{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) (σ : Fin (n + 1) → { x // x ∈ {-1, 1} }) (a : σ ∈ Finset.univ) (I : ι)
  (h_original_goal : Measurable fun a => ↑↑(σ ↑n) * (f I (X a.1.1) - f I (X a.1.2)) + c I) :
  Measurable fun x => ↑↑(σ ↑n) * (f I (X x.1.1) - f I (X x.1.2)) := sorry

Tactic state before:
case left.hf.hf.hf.hg
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
σ : Fin (n + 1) → { x // x ∈ {-1, 1} }
a✝ : σ ∈ Finset.univ
I : ι
⊢ Measurable fun a => ↑↑(σ ↑n) * (f I (X a.1.1) - f I (X a.1.2)) + c I

Tactic:
apply Measurable.add_const

Tactic state after:
[case left.hf.hf.hf.hg.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
 σ : Fin (n + 1) → { x // x ∈ {-1, 1} }
 a✝ : σ ∈ Finset.univ
 I : ι
 ⊢ Measurable fun x => ↑↑(σ ↑n) * (f I (X x.1.1) - f I (X x.1.2))]
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

theorem extracted_formal_statement_137.{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) (σ : Fin (n + 1) → { x // x ∈ {-1, 1} }) (a : σ ∈ Finset.univ) (I : ι)
  (h_original_goal : Measurable fun x => ↑↑(σ ↑n) * (f I (X x.1.1) - f I (X x.1.2))) :
  Measurable fun x => f I (X x.1.1) - f I (X x.1.2) := sorry

Tactic state before:
case left.hf.hf.hf.hg.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
σ : Fin (n + 1) → { x // x ∈ {-1, 1} }
a✝ : σ ∈ Finset.univ
I : ι
⊢ Measurable fun x => ↑↑(σ ↑n) * (f I (X x.1.1) - f I (X x.1.2))

Tactic:
apply Measurable.const_mul

Tactic state after:
[case left.hf.hf.hf.hg.hf.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
 σ : Fin (n + 1) → { x // x ∈ {-1, 1} }
 a✝ : σ ∈ Finset.univ
 I : ι
 ⊢ Measurable fun x => f I (X x.1.1) - f I (X x.1.2)]
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

theorem extracted_formal_statement_138.{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) (σ : Fin (n + 1) → { x // x ∈ {-1, 1} }) (a : σ ∈ Finset.univ) (I : ι)
  (h_original_goal : Measurable fun x => f I (X x.1.1) - f I (X x.1.2)) : Measurable fun a => f I (X a.1.1) := sorry

Tactic state before:
case left.hf.hf.hf.hg.hf.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
σ : Fin (n + 1) → { x // x ∈ {-1, 1} }
a✝ : σ ∈ Finset.univ
I : ι
⊢ Measurable fun x => f I (X x.1.1) - f I (X x.1.2)

Tactic:
apply Measurable.sub

Tactic state after:
[case left.hf.hf.hf.hg.hf.hf.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
 σ : Fin (n + 1) → { x // x ∈ {-1, 1} }
 a✝ : σ ∈ Finset.univ
 I : ι
 ⊢ Measurable fun a => f I (X a.1.1),
 case left.hf.hf.hf.hg.hf.hf.hg
 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
 σ : Fin (n + 1) → { x // x ∈ {-1, 1} }
 a✝ : σ ∈ Finset.univ
 I : ι
 ⊢ Measurable fun a => f I (X a.1.2)]
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

theorem extracted_formal_statement_139.{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) (σ : Fin (n + 1) → { x // x ∈ {-1, 1} }) (a : σ ∈ Finset.univ) (I : ι)
  (h_original_goal : Measurable fun x => f I (X x.1.1) - f I (X x.1.2)) : Measurable fun a => f I (X a.1.2) := sorry

Tactic state before:
case left.hf.hf.hf.hg.hf.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
σ : Fin (n + 1) → { x // x ∈ {-1, 1} }
a✝ : σ ∈ Finset.univ
I : ι
⊢ Measurable fun x => f I (X x.1.1) - f I (X x.1.2)

Tactic:
apply Measurable.sub

Tactic state after:
[case left.hf.hf.hf.hg.hf.hf.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
 σ : Fin (n + 1) → { x // x ∈ {-1, 1} }
 a✝ : σ ∈ Finset.univ
 I : ι
 ⊢ Measurable fun a => f I (X a.1.1),
 case left.hf.hf.hf.hg.hf.hf.hg
 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
 σ : Fin (n + 1) → { x // x ∈ {-1, 1} }
 a✝ : σ ∈ Finset.univ
 I : ι
 ⊢ Measurable fun a => f I (X a.1.2)]
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

theorem extracted_formal_statement_140.{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) (σ : Fin (n + 1) → { x // x ∈ {-1, 1} }) (a : σ ∈ Finset.univ)
  (I : ι) : Measurable fun a => f I (X a.1.1) := sorry

Tactic state before:
case left.hf.hf.hf.hg.hf.hf.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
σ : Fin (n + 1) → { x // x ∈ {-1, 1} }
a✝ : σ ∈ Finset.univ
I : ι
⊢ Measurable fun a => f I (X a.1.1)

Tactic:
exact (h𝓕 I).comp <| measurable_fst.comp measurable_fst

Tactic state after:
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

theorem extracted_formal_statement_141.{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) (σ : Fin (n + 1) → { x // x ∈ {-1, 1} }) (a : σ ∈ Finset.univ)
  (I : ι) : Measurable fun a => f I (X a.1.2) := sorry

Tactic state before:
case left.hf.hf.hf.hg.hf.hf.hg
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
σ : Fin (n + 1) → { x // x ∈ {-1, 1} }
a✝ : σ ∈ Finset.univ
I : ι
⊢ Measurable fun a => f I (X a.1.2)

Tactic:
exact (h𝓕 I).comp <| measurable_snd.comp measurable_fst

Tactic state after:
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

theorem extracted_formal_statement_142.{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 :
    HasFiniteIntegral
      (fun ω =>
        2⁻¹ ^ (n + 1) *
          ∑ σ,
            ⨆ I,
              ∑ i, ↑↑(σ ↑↑i) * (f I (X (ω.2 i).1) - f I (X (ω.2 i).2)) +
                (↑↑(σ ↑n) * (f I (X ω.1.1) - f I (X ω.1.2)) + c I))
      ((μ.prod μ).prod (Measure.pi fun x => μ.prod μ))) :
  ∀ᵐ (a : (Ω × Ω) × (Fin n → Ω × Ω)) ∂(μ.prod μ).prod (Measure.pi fun x => μ.prod μ),
    ‖2⁻¹ ^ (n + 1) *
          ∑ σ,
            ⨆ I,
              ∑ i, ↑↑(σ ↑↑i) * (f I (X (a.2 i).1) - f I (X (a.2 i).2)) +
                (↑↑(σ ↑n) * (f I (X a.1.1) - f I (X a.1.2)) + c I)‖ ≤
      ↑n * (b + b) + (b + b + C) := sorry

Tactic state before:
case right
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
⊢ HasFiniteIntegral
    (fun ω =>
      2⁻¹ ^ (n + 1) *
        ∑ σ,
          ⨆ I,
            ∑ i, ↑↑(σ ↑↑i) * (f I (X (ω.2 i).1) - f I (X (ω.2 i).2)) +
              (↑↑(σ ↑n) * (f I (X ω.1.1) - f I (X ω.1.2)) + c I))
    ((μ.prod μ).prod (Measure.pi fun x => μ.prod μ))

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

Tactic state after:
[case right
 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
 ⊢ ∀ᵐ (a : (Ω × Ω) × (Fin n → Ω × Ω)) ∂(μ.prod μ).prod (Measure.pi fun x => μ.prod μ),
     ‖2⁻¹ ^ (n + 1) *
           ∑ σ,
             ⨆ I,
               ∑ i, ↑↑(σ ↑↑i) * (f I (X (a.2 i).1) - f I (X (a.2 i).2)) +
                 (↑↑(σ ↑n) * (f I (X a.1.1) - f I (X a.1.2)) + c I)‖ ≤
       ↑n * (b + b) + (b + b + C)]
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

theorem extracted_formal_statement_143.{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) (ω : (Ω × Ω) × (Fin n → Ω × Ω))
  (h_original_goal :
    |2⁻¹ ^ (n + 1) *
          ∑ σ,
            ⨆ I,
              ∑ i, ↑↑(σ ↑↑i) * (f I (X (ω.2 i).1) - f I (X (ω.2 i).2)) +
                (↑↑(σ ↑n) * (f I (X ω.1.1) - f I (X ω.1.2)) + c I)| ≤
      ↑n * (b + b) + (b + b + C)) :
  2⁻¹ ^ (n + 1) *
      |∑ σ,
          ⨆ I,
            ∑ i, ↑↑(σ ↑↑i) * (f I (X (ω.2 i).1) - f I (X (ω.2 i).2)) +
              (↑↑(σ ↑n) * (f I (X ω.1.1) - f I (X ω.1.2)) + c I)| ≤
    ↑n * (b + b) + (b + b + C) := sorry

Tactic state before:
case right.h
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
ω : (Ω × Ω) × (Fin n → Ω × Ω)
⊢ |2⁻¹ ^ (n + 1) *
        ∑ σ,
          ⨆ I,
            ∑ i, ↑↑(σ ↑↑i) * (f I (X (ω.2 i).1) - f I (X (ω.2 i).2)) +
              (↑↑(σ ↑n) * (f I (X ω.1.1) - f I (X ω.1.2)) + c I)| ≤
    ↑n * (b + b) + (b + b + C)

Tactic:
rw [abs_mul, abs_of_pos (by simp)]

Tactic state after:
[case right.h
 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
 ω : (Ω × Ω) × (Fin n → Ω × Ω)
 ⊢ 2⁻¹ ^ (n + 1) *
       |∑ σ,
           ⨆ I,
             ∑ i, ↑↑(σ ↑↑i) * (f I (X (ω.2 i).1) - f I (X (ω.2 i).2)) +
               (↑↑(σ ↑n) * (f I (X ω.1.1) - f I (X ω.1.2)) + c I)| ≤
     ↑n * (b + b) + (b + b + C)]
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

theorem extracted_formal_statement_144.{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) (ω : (Ω × Ω) × (Fin n → Ω × Ω)) :
  |∑ σ,
        ⨆ I,
          ∑ i, ↑↑(σ ↑↑i) * (f I (X (ω.2 i).1) - f I (X (ω.2 i).2)) +
            (↑↑(σ ↑n) * (f I (X ω.1.1) - f I (X ω.1.2)) + c I)| ≤
    ∑ σ,
      |⨆ I,
          ∑ i, ↑↑(σ ↑↑i) * (f I (X (ω.2 i).1) - f I (X (ω.2 i).2)) +
            (↑↑(σ ↑n) * (f I (X ω.1.1) - f I (X ω.1.2)) + c I)| := sorry

Tactic state before:
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
ω : (Ω × Ω) × (Fin n → Ω × Ω)
⊢ |∑ σ,
        ⨆ I,
          ∑ i, ↑↑(σ ↑↑i) * (f I (X (ω.2 i).1) - f I (X (ω.2 i).2)) +
            (↑↑(σ ↑n) * (f I (X ω.1.1) - f I (X ω.1.2)) + c I)| ≤
    ∑ σ,
      |⨆ I,
          ∑ i, ↑↑(σ ↑↑i) * (f I (X (ω.2 i).1) - f I (X (ω.2 i).2)) + (↑↑(σ ↑n) * (f I (X ω.1.1) - f I (X ω.1.2)) + c I)|

Tactic:
apply Finset.abs_sum_le_sum_abs

Tactic state after: