zzhisthebest/LeanBenchmark huggingface dataset:
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

theorem extracted_formal_statement_83.{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 : ℝ} (hb : b ≥ 0)
  (hf' : ∀ (i : ι) (z : Z), |f i z| ≤ b) (hn : ¬n = 0)
  (hr : ∃ C, ∀ (ω : Fin n → Ω) (k : Fin n), ∀ y ∈ Set.range fun i => f i (X (ω k)), y ≤ C)
  (hr' : ∃ C, ∀ (ω : Fin n → Ω) (k : Fin n), ∀ y ∈ Set.range fun i => f i (X (ω k)), C ≤ y)
  (hq : ∀ (ω : Fin n → Ω) (k : Fin n), BddAbove (Set.range fun i => f i (X (ω k))))
  (hq' : ∀ (ω : Fin n → Ω) (k : Fin n), BddBelow (Set.range fun i => f i (X (ω k)))) :
  ∫ (x : (Fin n → Ω) × (Fin n → Ω)),
      (fun ω =>
          ((↑(Fintype.card (Signs n)))⁻¹ * ∑ σ, ⨆ i, |∑ k, ↑↑(σ k) * f i (X (ω.1 k))|) +
            (↑(Fintype.card (Signs n)))⁻¹ * ∑ σ, ⨆ i, |∑ k, ↑↑(σ k) * f i (X (ω.2 k))|)
        x ∂(Measure.pi fun x => μ).prod (Measure.pi fun x => μ) =
    ∫ (x : (Fin n → Ω) × (Fin n → Ω)),
        (fun ω => (↑(Fintype.card (Signs n)))⁻¹ * ∑ σ, ⨆ i, |∑ k, ↑↑(σ k) * f i (X (ω.1 k))|)
          x ∂(Measure.pi fun x => μ).prod (Measure.pi fun x => μ) +
      ∫ (x : (Fin n → Ω) × (Fin n → Ω)),
        (fun ω => (↑(Fintype.card (Signs n)))⁻¹ * ∑ σ, ⨆ i, |∑ k, ↑↑(σ k) * f i (X (ω.2 k))|)
          x ∂(Measure.pi fun x => μ).prod (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✝¹ : Nonempty ι
inst✝ : Countable ι
hf : ∀ (i : ι), Measurable (f i ∘ X)
b : ℝ
hb : b ≥ 0
hf' : ∀ (i : ι) (z : Z), |f i z| ≤ b
hn : ¬n = 0
hr : ∃ C, ∀ (ω : Fin n → Ω) (k : Fin n), ∀ y ∈ Set.range fun i => f i (X (ω k)), y ≤ C
hr' : ∃ C, ∀ (ω : Fin n → Ω) (k : Fin n), ∀ y ∈ Set.range fun i => f i (X (ω k)), C ≤ y
hq : ∀ (ω : Fin n → Ω) (k : Fin n), BddAbove (Set.range fun i => f i (X (ω k)))
hq' : ∀ (ω : Fin n → Ω) (k : Fin n), BddBelow (Set.range fun i => f i (X (ω k)))
⊢ ∫ (x : (Fin n → Ω) × (Fin n → Ω)),
      (fun ω =>
          ((↑(Fintype.card (Signs n)))⁻¹ * ∑ σ, ⨆ i, |∑ k, ↑↑(σ k) * f i (X (ω.1 k))|) +
            (↑(Fintype.card (Signs n)))⁻¹ * ∑ σ, ⨆ i, |∑ k, ↑↑(σ k) * f i (X (ω.2 k))|)
        x ∂(Measure.pi fun x => μ).prod (Measure.pi fun x => μ) =
    ∫ (x : (Fin n → Ω) × (Fin n → Ω)),
        (fun ω => (↑(Fintype.card (Signs n)))⁻¹ * ∑ σ, ⨆ i, |∑ k, ↑↑(σ k) * f i (X (ω.1 k))|)
          x ∂(Measure.pi fun x => μ).prod (Measure.pi fun x => μ) +
      ∫ (x : (Fin n → Ω) × (Fin n → Ω)),
        (fun ω => (↑(Fintype.card (Signs n)))⁻¹ * ∑ σ, ⨆ i, |∑ k, ↑↑(σ k) * f i (X (ω.2 k))|)
          x ∂(Measure.pi fun x => μ).prod (Measure.pi fun x => μ)

Tactic:
apply integral_add
    · apply integrable_aux2 hf hb hf'
    ·
  rw [← integrable_swap_iff]
  apply integrable_aux2 hf hb hf'

Tactic state after:
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

theorem extracted_formal_statement_85.{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 : ℝ} (hb : b ≥ 0)
  (hf' : ∀ (i : ι) (z : Z), |f i z| ≤ b) (hn : ¬n = 0)
  (hr : ∃ C, ∀ (ω : Fin n → Ω) (k : Fin n), ∀ y ∈ Set.range fun i => f i (X (ω k)), y ≤ C)
  (hr' : ∃ C, ∀ (ω : Fin n → Ω) (k : Fin n), ∀ y ∈ Set.range fun i => f i (X (ω k)), C ≤ y)
  (hq : ∀ (ω : Fin n → Ω) (k : Fin n), BddAbove (Set.range fun i => f i (X (ω k))))
  (hq' : ∀ (ω : Fin n → Ω) (k : Fin n), BddBelow (Set.range fun i => f i (X (ω k)))) (x : Fin n → Ω)
  (h_original_goal :
    (↑(Fintype.card (Signs n)))⁻¹ * ∑ x_1, ⨆ i, |∑ x_2, ↑↑(x_1 x_2) * f i (X (x x_2))| =
      (↑(Fintype.card (Signs n)))⁻¹ * ↑n * ∑ x_1, ⨆ i, |(↑n)⁻¹ * ∑ k, ↑↑(x_1 k) * f i (X (x k))|) :
  ∑ x_1, ⨆ i, |∑ x_2, ↑↑(x_1 x_2) * f i (X (x x_2))| =
    ∑ i, ↑n * ⨆ i_1, |(↑n)⁻¹ * ∑ k, ↑↑(i k) * f i_1 (X (x k))| := sorry

Tactic state before:
case e_a.e_f.h
Ω : Type u
inst✝³ : MeasurableSpace Ω
Z : Type w
n : ℕ
ι : Type u_1
f : ι → Z → ℝ
μ : Measure Ω
inst✝² : IsProbabilityMeasure μ
X : Ω → Z
inst✝¹ : Nonempty ι
inst✝ : Countable ι
hf : ∀ (i : ι), Measurable (f i ∘ X)
b : ℝ
hb : b ≥ 0
hf' : ∀ (i : ι) (z : Z), |f i z| ≤ b
hn : ¬n = 0
hr : ∃ C, ∀ (ω : Fin n → Ω) (k : Fin n), ∀ y ∈ Set.range fun i => f i (X (ω k)), y ≤ C
hr' : ∃ C, ∀ (ω : Fin n → Ω) (k : Fin n), ∀ y ∈ Set.range fun i => f i (X (ω k)), C ≤ y
hq : ∀ (ω : Fin n → Ω) (k : Fin n), BddAbove (Set.range fun i => f i (X (ω k)))
hq' : ∀ (ω : Fin n → Ω) (k : Fin n), BddBelow (Set.range fun i => f i (X (ω k)))
x✝ : Fin n → Ω
⊢ (↑(Fintype.card (Signs n)))⁻¹ * ∑ x, ⨆ i, |∑ x_1, ↑↑(x x_1) * f i (X (x✝ x_1))| =
    (↑(Fintype.card (Signs n)))⁻¹ * ↑n * ∑ x, ⨆ i, |(↑n)⁻¹ * ∑ k, ↑↑(x k) * f i (X (x✝ k))|

Tactic:
rw [mul_assoc]
    congr
    rw [Finset.mul_sum]

Tactic state after:
[case e_a.e_f.h.e_a
 Ω : Type u
 inst✝³ : MeasurableSpace Ω
 Z : Type w
 n : ℕ
 ι : Type u_1
 f : ι → Z → ℝ
 μ : Measure Ω
 inst✝² : IsProbabilityMeasure μ
 X : Ω → Z
 inst✝¹ : Nonempty ι
 inst✝ : Countable ι
 hf : ∀ (i : ι), Measurable (f i ∘ X)
 b : ℝ
 hb : b ≥ 0
 hf' : ∀ (i : ι) (z : Z), |f i z| ≤ b
 hn : ¬n = 0
 hr : ∃ C, ∀ (ω : Fin n → Ω) (k : Fin n), ∀ y ∈ Set.range fun i => f i (X (ω k)), y ≤ C
 hr' : ∃ C, ∀ (ω : Fin n → Ω) (k : Fin n), ∀ y ∈ Set.range fun i => f i (X (ω k)), C ≤ y
 hq : ∀ (ω : Fin n → Ω) (k : Fin n), BddAbove (Set.range fun i => f i (X (ω k)))
 hq' : ∀ (ω : Fin n → Ω) (k : Fin n), BddBelow (Set.range fun i => f i (X (ω k)))
 x✝ : Fin n → Ω
 ⊢ ∑ x, ⨆ i, |∑ x_1, ↑↑(x x_1) * f i (X (x✝ x_1))| = ∑ i, ↑n * ⨆ i_1, |(↑n)⁻¹ * ∑ k, ↑↑(i k) * f i_1 (X (x✝ k))|]
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

open scoped ENNReal

theorem extracted_formal_statement_86.{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 : ℝ} (hb : b ≥ 0)
  (hf' : ∀ (i : ι) (z : Z), |f i z| ≤ b) (hn : ¬n = 0)
  (hr : ∃ C, ∀ (ω : Fin n → Ω) (k : Fin n), ∀ y ∈ Set.range fun i => f i (X (ω k)), y ≤ C)
  (hr' : ∃ C, ∀ (ω : Fin n → Ω) (k : Fin n), ∀ y ∈ Set.range fun i => f i (X (ω k)), C ≤ y)
  (hq : ∀ (ω : Fin n → Ω) (k : Fin n), BddAbove (Set.range fun i => f i (X (ω k))))
  (hq' : ∀ (ω : Fin n → Ω) (k : Fin n), BddBelow (Set.range fun i => f i (X (ω k)))) (x : Fin n → Ω) (x_1 : Signs n)
  (x_2 : ι)
  (h_original_goal : |∑ x_3, ↑↑(x_1 x_3) * f x_2 (X (x x_3))| = ↑n * |(↑n)⁻¹ * ∑ k, ↑↑(x_1 k) * f x_2 (X (x k))|) :
  |∑ x_3, ↑↑(x_1 x_3) * f x_2 (X (x x_3))| = ↑n * (↑n)⁻¹ * |∑ k, ↑↑(x_1 k) * f x_2 (X (x k))| := sorry

Tactic state before:
case e_a.e_f.h.e_a.e_f.h.e_s.h
Ω : Type u
inst✝³ : MeasurableSpace Ω
Z : Type w
n : ℕ
ι : Type u_1
f : ι → Z → ℝ
μ : Measure Ω
inst✝² : IsProbabilityMeasure μ
X : Ω → Z
inst✝¹ : Nonempty ι
inst✝ : Countable ι
hf : ∀ (i : ι), Measurable (f i ∘ X)
b : ℝ
hb : b ≥ 0
hf' : ∀ (i : ι) (z : Z), |f i z| ≤ b
hn : ¬n = 0
hr : ∃ C, ∀ (ω : Fin n → Ω) (k : Fin n), ∀ y ∈ Set.range fun i => f i (X (ω k)), y ≤ C
hr' : ∃ C, ∀ (ω : Fin n → Ω) (k : Fin n), ∀ y ∈ Set.range fun i => f i (X (ω k)), C ≤ y
hq : ∀ (ω : Fin n → Ω) (k : Fin n), BddAbove (Set.range fun i => f i (X (ω k)))
hq' : ∀ (ω : Fin n → Ω) (k : Fin n), BddBelow (Set.range fun i => f i (X (ω k)))
x✝² : Fin n → Ω
x✝¹ : Signs n
x✝ : ι
⊢ |∑ x, ↑↑(x✝¹ x) * f x✝ (X (x✝² x))| = ↑n * |(↑n)⁻¹ * ∑ k, ↑↑(x✝¹ k) * f x✝ (X (x✝² k))|

Tactic:
rw [abs_mul]
    have : |(n : ℝ)⁻¹| = (n : ℝ)⁻¹ := by
  apply abs_of_nonneg
  apply inv_nonneg_of_nonneg
  norm_num
    rw [this, ← mul_assoc]

Tactic state after:
[case e_a.e_f.h.e_a.e_f.h.e_s.h
 Ω : Type u
 inst✝³ : MeasurableSpace Ω
 Z : Type w
 n : ℕ
 ι : Type u_1
 f : ι → Z → ℝ
 μ : Measure Ω
 inst✝² : IsProbabilityMeasure μ
 X : Ω → Z
 inst✝¹ : Nonempty ι
 inst✝ : Countable ι
 hf : ∀ (i : ι), Measurable (f i ∘ X)
 b : ℝ
 hb : b ≥ 0
 hf' : ∀ (i : ι) (z : Z), |f i z| ≤ b
 hn : ¬n = 0
 hr : ∃ C, ∀ (ω : Fin n → Ω) (k : Fin n), ∀ y ∈ Set.range fun i => f i (X (ω k)), y ≤ C
 hr' : ∃ C, ∀ (ω : Fin n → Ω) (k : Fin n), ∀ y ∈ Set.range fun i => f i (X (ω k)), C ≤ y
 hq : ∀ (ω : Fin n → Ω) (k : Fin n), BddAbove (Set.range fun i => f i (X (ω k)))
 hq' : ∀ (ω : Fin n → Ω) (k : Fin n), BddBelow (Set.range fun i => f i (X (ω k)))
 x✝² : Fin n → Ω
 x✝¹ : Signs n
 x✝ : ι
 this : |(↑n)⁻¹| = (↑n)⁻¹
 ⊢ |∑ x, ↑↑(x✝¹ x) * f x✝ (X (x✝² x))| = ↑n * (↑n)⁻¹ * |∑ k, ↑↑(x✝¹ k) * f x✝ (X (x✝² k))|]
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory

theorem extracted_formal_statement_0.{u_4, u_3, u_2, u_1} {E : Type u_1} [inst : NormedAddCommGroup E]
  [inst_1 : NormedSpace ℝ E] {Ω : Type u_2} {β : Type u_3} {β' : Type u_4} {_mΩ : MeasurableSpace Ω} {μ : Measure Ω}
  {f : Ω → β} {g : Ω → β'} {F : β × β' → E} {mβ : MeasurableSpace β} {mβ' : MeasurableSpace β'}
  [inst_2 : IsFiniteMeasure μ] {hF' : StronglyMeasurable F} (hf : AEMeasurable f μ) (hg : AEMeasurable g μ)
  (hfg : IndepFun f g μ) (hF : HasFiniteIntegral F ((Measure.map f μ).prod (Measure.map g μ))) :
  let ν := Measure.map f μ;
  let ν' := Measure.map g μ;
  Measure.map (fun ω => (f ω, g ω)) μ = ν.prod ν' →
    ∀ (ω : Ω),
      ∫ (x' : β'), F (f ω, x') ∂ν' = ∫ (ω' : Ω), F (f ω, g ω') ∂μ → StronglyMeasurable fun y => F (f ω, y) := sorry

Tactic state before:
case h.h.h
E : Type u_1
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
Ω : Type u_2
β : Type u_3
β' : Type u_4
_mΩ : MeasurableSpace Ω
μ : Measure Ω
f : Ω → β
g : Ω → β'
F : β × β' → E
mβ : MeasurableSpace β
mβ' : MeasurableSpace β'
inst✝ : IsFiniteMeasure μ
hF' : StronglyMeasurable F
hf : AEMeasurable f μ
hg : AEMeasurable g μ
hfg : IndepFun f g μ
hF : HasFiniteIntegral F ((Measure.map f μ).prod (Measure.map g μ))
ν : Measure β := Measure.map f μ
ν' : Measure β' := Measure.map g μ
hfg' : Measure.map (fun ω => (f ω, g ω)) μ = ν.prod ν'
ω : Ω
⊢ ∫ (x' : β'), F (f ω, x') ∂ν' = ∫ (ω' : Ω), F (f ω, g ω') ∂μ

Tactic:
apply MeasureTheory.integral_map
    assumption
    apply StronglyMeasurable.aestronglyMeasurable

Tactic state after:
[case h.h.h.hfm.hf
 E : Type u_1
 inst✝² : NormedAddCommGroup E
 inst✝¹ : NormedSpace ℝ E
 Ω : Type u_2
 β : Type u_3
 β' : Type u_4
 _mΩ : MeasurableSpace Ω
 μ : Measure Ω
 f : Ω → β
 g : Ω → β'
 F : β × β' → E
 mβ : MeasurableSpace β
 mβ' : MeasurableSpace β'
 inst✝ : IsFiniteMeasure μ
 hF' : StronglyMeasurable F
 hf : AEMeasurable f μ
 hg : AEMeasurable g μ
 hfg : IndepFun f g μ
 hF : HasFiniteIntegral F ((Measure.map f μ).prod (Measure.map g μ))
 ν : Measure β := Measure.map f μ
 ν' : Measure β' := Measure.map g μ
 hfg' : Measure.map (fun ω => (f ω, g ω)) μ = ν.prod ν'
 ω : Ω
 ⊢ StronglyMeasurable fun y => F (f ω, y)]
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory

theorem extracted_formal_statement_1.{u_4, u_3, u_2, u_1} {E : Type u_1} [inst : NormedAddCommGroup E]
  [inst_1 : NormedSpace ℝ E] {Ω : Type u_2} {β : Type u_3} {β' : Type u_4} {_mΩ : MeasurableSpace Ω} {μ : Measure Ω}
  {f : Ω → β} {g : Ω → β'} {F : β × β' → E} {mβ : MeasurableSpace β} {mβ' : MeasurableSpace β'}
  [inst_2 : IsFiniteMeasure μ] {hF' : StronglyMeasurable F} (hf : AEMeasurable f μ) (hg : AEMeasurable g μ)
  (hfg : IndepFun f g μ) (hF : HasFiniteIntegral F ((Measure.map f μ).prod (Measure.map g μ))) :
  let ν := Measure.map f μ;
  let ν' := Measure.map g μ;
  Measure.map (fun ω => (f ω, g ω)) μ = ν.prod ν' →
    ∫ (ω : Ω), ∫ (x' : β'), F (f ω, x') ∂ν' ∂μ = ∫ (x : β), ∫ (x' : β'), F (x, x') ∂ν' ∂ν →
      AEStronglyMeasurable (fun y => ∫ (x' : β'), F (y, x') ∂ν') (Measure.map f μ) := sorry

Tactic state before:
E : Type u_1
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
Ω : Type u_2
β : Type u_3
β' : Type u_4
_mΩ : MeasurableSpace Ω
μ : Measure Ω
f : Ω → β
g : Ω → β'
F : β × β' → E
mβ : MeasurableSpace β
mβ' : MeasurableSpace β'
inst✝ : IsFiniteMeasure μ
hF' : StronglyMeasurable F
hf : AEMeasurable f μ
hg : AEMeasurable g μ
hfg : IndepFun f g μ
hF : HasFiniteIntegral F ((Measure.map f μ).prod (Measure.map g μ))
ν : Measure β := Measure.map f μ
ν' : Measure β' := Measure.map g μ
hfg' : Measure.map (fun ω => (f ω, g ω)) μ = ν.prod ν'
⊢ ∫ (ω : Ω), ∫ (x' : β'), F (f ω, x') ∂ν' ∂μ = ∫ (x : β), ∫ (x' : β'), F (x, x') ∂ν' ∂ν

Tactic:
apply Eq.symm
    apply MeasureTheory.integral_map
    assumption

Tactic state after:
[case h.hfm
 E : Type u_1
 inst✝² : NormedAddCommGroup E
 inst✝¹ : NormedSpace ℝ E
 Ω : Type u_2
 β : Type u_3
 β' : Type u_4
 _mΩ : MeasurableSpace Ω
 μ : Measure Ω
 f : Ω → β
 g : Ω → β'
 F : β × β' → E
 mβ : MeasurableSpace β
 mβ' : MeasurableSpace β'
 inst✝ : IsFiniteMeasure μ
 hF' : StronglyMeasurable F
 hf : AEMeasurable f μ
 hg : AEMeasurable g μ
 hfg : IndepFun f g μ
 hF : HasFiniteIntegral F ((Measure.map f μ).prod (Measure.map g μ))
 ν : Measure β := Measure.map f μ
 ν' : Measure β' := Measure.map g μ
 hfg' : Measure.map (fun ω => (f ω, g ω)) μ = ν.prod ν'
 ⊢ AEStronglyMeasurable (fun y => ∫ (x' : β'), F (y, x') ∂ν') (Measure.map f μ)]
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory

theorem extracted_formal_statement_2.{u_4, u_3, u_2, u_1} {E : Type u_1} [inst : NormedAddCommGroup E]
  [inst_1 : NormedSpace ℝ E] {Ω : Type u_2} {β : Type u_3} {β' : Type u_4} {_mΩ : MeasurableSpace Ω} {μ : Measure Ω}
  {f : Ω → β} {g : Ω → β'} {F : β × β' → E} {mβ : MeasurableSpace β} {mβ' : MeasurableSpace β'}
  [inst_2 : IsFiniteMeasure μ] {hF' : StronglyMeasurable F} (hf : AEMeasurable f μ) (hg : AEMeasurable g μ)
  (hfg : IndepFun f g μ) (hF : HasFiniteIntegral F ((Measure.map f μ).prod (Measure.map g μ))) :
  let ν := Measure.map f μ;
  let ν' := Measure.map g μ;
  Measure.map (fun ω => (f ω, g ω)) μ = ν.prod ν' →
    ∫ (x : β), ∫ (x' : β'), F (x, x') ∂ν' ∂ν = ∫ (z : β × β'), F z ∂ν.prod ν' := sorry

Tactic state before:
E : Type u_1
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
Ω : Type u_2
β : Type u_3
β' : Type u_4
_mΩ : MeasurableSpace Ω
μ : Measure Ω
f : Ω → β
g : Ω → β'
F : β × β' → E
mβ : MeasurableSpace β
mβ' : MeasurableSpace β'
inst✝ : IsFiniteMeasure μ
hF' : StronglyMeasurable F
hf : AEMeasurable f μ
hg : AEMeasurable g μ
hfg : IndepFun f g μ
hF : HasFiniteIntegral F ((Measure.map f μ).prod (Measure.map g μ))
ν : Measure β := Measure.map f μ
ν' : Measure β' := Measure.map g μ
hfg' : Measure.map (fun ω => (f ω, g ω)) μ = ν.prod ν'
⊢ ∫ (x : β), ∫ (x' : β'), F (x, x') ∂ν' ∂ν = ∫ (z : β × β'), F z ∂ν.prod ν'

Tactic:
apply Eq.symm
    apply MeasureTheory.integral_prod
    exact ⟨hF'.aestronglyMeasurable, hF⟩

Tactic state after:
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory

theorem extracted_formal_statement_3.{u_4, u_3, u_2, u_1} {E : Type u_1} [inst : NormedAddCommGroup E]
  [inst_1 : NormedSpace ℝ E] {Ω : Type u_2} {β : Type u_3} {β' : Type u_4} {_mΩ : MeasurableSpace Ω} {μ : Measure Ω}
  {f : Ω → β} {g : Ω → β'} {F : β × β' → E} {mβ : MeasurableSpace β} {mβ' : MeasurableSpace β'}
  [inst_2 : IsFiniteMeasure μ] {hF' : StronglyMeasurable F} (hf : AEMeasurable f μ) (hg : AEMeasurable g μ)
  (hfg : IndepFun f g μ) (hF : HasFiniteIntegral F ((Measure.map f μ).prod (Measure.map g μ))) :
  let ν := Measure.map f μ;
  let ν' := Measure.map g μ;
  Measure.map (fun ω => (f ω, g ω)) μ = ν.prod ν' →
    ∫ (z : β × β'), F z ∂Measure.map (fun ω => (f ω, g ω)) μ = ∫ (ω : Ω), F (f ω, g ω) ∂μ →
      AEStronglyMeasurable F (ν.prod ν') := sorry

Tactic state before:
E : Type u_1
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
Ω : Type u_2
β : Type u_3
β' : Type u_4
_mΩ : MeasurableSpace Ω
μ : Measure Ω
f : Ω → β
g : Ω → β'
F : β × β' → E
mβ : MeasurableSpace β
mβ' : MeasurableSpace β'
inst✝ : IsFiniteMeasure μ
hF' : StronglyMeasurable F
hf : AEMeasurable f μ
hg : AEMeasurable g μ
hfg : IndepFun f g μ
hF : HasFiniteIntegral F ((Measure.map f μ).prod (Measure.map g μ))
ν : Measure β := Measure.map f μ
ν' : Measure β' := Measure.map g μ
hfg' : Measure.map (fun ω => (f ω, g ω)) μ = ν.prod ν'
⊢ ∫ (z : β × β'), F z ∂Measure.map (fun ω => (f ω, g ω)) μ = ∫ (ω : Ω), F (f ω, g ω) ∂μ

Tactic:
apply MeasureTheory.integral_map
    exact AEMeasurable.prodMk hf hg
    rw [hfg']

Tactic state after:
[case hfm
 E : Type u_1
 inst✝² : NormedAddCommGroup E
 inst✝¹ : NormedSpace ℝ E
 Ω : Type u_2
 β : Type u_3
 β' : Type u_4
 _mΩ : MeasurableSpace Ω
 μ : Measure Ω
 f : Ω → β
 g : Ω → β'
 F : β × β' → E
 mβ : MeasurableSpace β
 mβ' : MeasurableSpace β'
 inst✝ : IsFiniteMeasure μ
 hF' : StronglyMeasurable F
 hf : AEMeasurable f μ
 hg : AEMeasurable g μ
 hfg : IndepFun f g μ
 hF : HasFiniteIntegral F ((Measure.map f μ).prod (Measure.map g μ))
 ν : Measure β := Measure.map f μ
 ν' : Measure β' := Measure.map g μ
 hfg' : Measure.map (fun ω => (f ω, g ω)) μ = ν.prod ν'
 ⊢ AEStronglyMeasurable F (ν.prod ν')]
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory

theorem extracted_formal_statement_4.{u_3, u_2} {𝓧 : Type u_2} {ι : Type u_3} [inst : DecidableEq ι] (f : (ι → 𝓧) → ℝ)
  (c : ι → ℝ) (h : ∀ (i : ι) (x : ι → 𝓧) (x' : 𝓧), f x - f (Function.update x i x') ≤ c i) (i : ι) (xi : ι → 𝓧) (x' : 𝓧)
  (h_original_goal : |f xi - f (Function.update xi i x')| ≤ c i) : f (Function.update xi i x') - f xi ≤ c i := sorry

Tactic state before:
case mpr
𝓧 : Type u_2
ι : Type u_3
inst✝ : DecidableEq ι
f : (ι → 𝓧) → ℝ
c : ι → ℝ
h : ∀ (i : ι) (x : ι → 𝓧) (x' : 𝓧), f x - f (Function.update x i x') ≤ c i
i : ι
xi : ι → 𝓧
x' : 𝓧
⊢ |f xi - f (Function.update xi i x')| ≤ c i

Tactic:
apply abs_sub_le_iff.mpr
    constructor
    · exact h i xi x'

Tactic state after:
[case mpr.right
 𝓧 : Type u_2
 ι : Type u_3
 inst✝ : DecidableEq ι
 f : (ι → 𝓧) → ℝ
 c : ι → ℝ
 h : ∀ (i : ι) (x : ι → 𝓧) (x' : 𝓧), f x - f (Function.update x i x') ≤ c i
 i : ι
 xi : ι → 𝓧
 x' : 𝓧
 ⊢ f (Function.update xi i x') - f xi ≤ c i]
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory

theorem extracted_formal_statement_6.{u_2, u_1} {Ω : Type u_1} [inst : MeasurableSpace Ω] {μ : Measure Ω}
  [inst_1 : IsProbabilityMeasure μ] {𝓧 : Type u_2} {m𝓧 : MeasurableSpace 𝓧} [hnonempty𝓧 : Nonempty 𝓧] {m : ℕ}
  {X' : Fin m → Ω → 𝓧} (hX'' : ∀ (i : Fin m), Measurable (X' i)) (hIndep' : iIndepFun X' μ) {f' : (Fin m → 𝓧) → ℝ}
  {c' : Fin m → ℝ} (hfι : ∀ (i : Fin m) (x : Fin m → 𝓧) (x' : 𝓧), |f' x - f' (Function.update x i x')| ≤ c' i)
  (hf'' : StronglyMeasurable f') {t : ℝ} (ht : t ≥ 0) (ht' : t * ∑ i, c' i ^ 2 ≤ 1) (k i : Fin m) (h : ¬↑i < ↑k)
  (h2 : ¬↑i = ↑k) (h_original_goal : ¬↑i < ↑k.succ) : k < i := sorry

Tactic state before:
Ω : Type u_1
inst✝¹ : MeasurableSpace Ω
μ : Measure Ω
inst✝ : IsProbabilityMeasure μ
𝓧 : Type u_2
m𝓧 : MeasurableSpace 𝓧
hnonempty𝓧 : Nonempty 𝓧
m : ℕ
X' : Fin m → Ω → 𝓧
hX'' : ∀ (i : Fin m), Measurable (X' i)
hIndep' : iIndepFun X' μ
f' : (Fin m → 𝓧) → ℝ
c' : Fin m → ℝ
hfι : ∀ (i : Fin m) (x : Fin m → 𝓧) (x' : 𝓧), |f' x - f' (Function.update x i x')| ≤ c' i
hf'' : StronglyMeasurable f'
ε : ℝ
hε : ε > 0
t : ℝ
ht : t ≥ 0
ht' : t * ∑ i, c' i ^ 2 ≤ 1
Y : (k : Fin m.succ) → (Fin ↑k → 𝓧) → ℝ :=
  fun k Xk => ∫ (x : Ω), (fun ω => f' fun i => if h : ↑i < ↑k then Xk ⟨↑i, h⟩ else X' i ω) x ∂μ
A : (k : Fin m) → (Fin ↑k → 𝓧) → ℝ :=
  fun k Xk =>
    ⨅ x, ∫ (x_1 : Ω), (fun ω => f' fun i => if h : ↑i < ↑k then Xk ⟨↑i, h⟩ else if ↑i = ↑k then x else X' i ω) x_1 ∂μ
B : (k : Fin m) → (Fin ↑k → 𝓧) → ℝ :=
  fun k Xk =>
    ⨆ x, ∫ (x_1 : Ω), (fun ω => f' fun i => if h : ↑i < ↑k then Xk ⟨↑i, h⟩ else if ↑i = ↑k then x else X' i ω) x_1 ∂μ
k : Fin m
Xk : Fin ↑k → 𝓧
x : 𝓧
ω : Ω
i : Fin m
h : ¬↑i < ↑k
h2 : ¬↑i = ↑k
⊢ ¬↑i < ↑k.succ

Tactic:
simp only [Fin.val_succ, not_lt]
    simp only [Fin.val_fin_lt, not_lt] at h
    apply Fin.val_add_one_le_of_lt

Tactic state after:
[case h
 Ω : Type u_1
 inst✝¹ : MeasurableSpace Ω
 μ : Measure Ω
 inst✝ : IsProbabilityMeasure μ
 𝓧 : Type u_2
 m𝓧 : MeasurableSpace 𝓧
 hnonempty𝓧 : Nonempty 𝓧
 m : ℕ
 X' : Fin m → Ω → 𝓧
 hX'' : ∀ (i : Fin m), Measurable (X' i)
 hIndep' : iIndepFun X' μ
 f' : (Fin m → 𝓧) → ℝ
 c' : Fin m → ℝ
 hfι : ∀ (i : Fin m) (x : Fin m → 𝓧) (x' : 𝓧), |f' x - f' (Function.update x i x')| ≤ c' i
 hf'' : StronglyMeasurable f'
 ε : ℝ
 hε : ε > 0
 t : ℝ
 ht : t ≥ 0
 ht' : t * ∑ i, c' i ^ 2 ≤ 1
 Y : (k : Fin m.succ) → (Fin ↑k → 𝓧) → ℝ :=
   fun k Xk => ∫ (x : Ω), (fun ω => f' fun i => if h : ↑i < ↑k then Xk ⟨↑i, h⟩ else X' i ω) x ∂μ
 A : (k : Fin m) → (Fin ↑k → 𝓧) → ℝ :=
   fun k Xk =>
     ⨅ x, ∫ (x_1 : Ω), (fun ω => f' fun i => if h : ↑i < ↑k then Xk ⟨↑i, h⟩ else if ↑i = ↑k then x else X' i ω) x_1 ∂μ
 B : (k : Fin m) → (Fin ↑k → 𝓧) → ℝ :=
   fun k Xk =>
     ⨆ x, ∫ (x_1 : Ω), (fun ω => f' fun i => if h : ↑i < ↑k then Xk ⟨↑i, h⟩ else if ↑i = ↑k then x else X' i ω) x_1 ∂μ
 k : Fin m
 Xk : Fin ↑k → 𝓧
 x : 𝓧
 ω : Ω
 i : Fin m
 h2 : ¬↑i = ↑k
 h : k ≤ i
 ⊢ k < i]
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory

theorem extracted_formal_statement_51.{u_3, u_2, u_1} {Ω : Type u_1} [inst : MeasurableSpace Ω] {μ : Measure Ω}
  [inst_1 : IsProbabilityMeasure μ] {𝓧 : Type u_2} {ι : Type u_3} [inst_2 : DecidableEq ι] {m𝓧 : MeasurableSpace 𝓧}
  [hnonempty𝓧 : Nonempty 𝓧] [inst_3 : Fintype ι] (X_1 : ι → Ω → 𝓧) (hX : ∀ (i : ι), Measurable (X_1 i))
  (hX' : iIndepFun X_1 μ) (f : (ι → 𝓧) → ℝ) (c : ι → ℝ)
  (hf : ∀ (i : ι) (x : ι → 𝓧) (x' : 𝓧), |f x - f (Function.update x i x')| ≤ c i) (hf' : Measurable f) (t : ℝ)
  (ht' : t * ∑ i, c i ^ 2 ≤ 1) :
  let m := Fintype.card ι;
  let ιm := Fintype.equivFinOfCardEq rfl;
  ∀ (X : Fin m → 𝓧) (k : Fin m) (x : 𝓧) (i : ι),
    k = ιm i → Function.update X k x (ιm i) = Function.update (X ∘ ⇑ιm) (ιm.symm k) x i := sorry

Tactic state before:
Ω : Type u_1
inst✝³ : MeasurableSpace Ω
μ : Measure Ω
inst✝² : IsProbabilityMeasure μ
𝓧 : Type u_2
ι : Type u_3
inst✝¹ : DecidableEq ι
m𝓧 : MeasurableSpace 𝓧
hnonempty𝓧 : Nonempty 𝓧
inst✝ : Fintype ι
X✝ : ι → Ω → 𝓧
hX : ∀ (i : ι), Measurable (X✝ i)
hX' : iIndepFun X✝ μ
f : (ι → 𝓧) → ℝ
c : ι → ℝ
hf : ∀ (i : ι) (x : ι → 𝓧) (x' : 𝓧), |f x - f (Function.update x i x')| ≤ c i
hf' : Measurable f
ε : ℝ
hε : ε > 0
t : ℝ
ht' : t * ∑ i, c i ^ 2 ≤ 1
m : ℕ := Fintype.card ι
ιm : ι ≃ Fin m := Fintype.equivFinOfCardEq ⋯
X' : Fin m → Ω → 𝓧 := X✝ ∘ ⇑ιm.symm
f' : (Fin m → 𝓧) → ℝ := f ∘ fun s => s ∘ ⇑ιm
c' : Fin m → ℝ := c ∘ ⇑ιm.symm
X : Fin m → 𝓧
k : Fin m
x : 𝓧
i : ι
h : k = ιm i
⊢ Function.update X k x (ιm i) = Function.update (X ∘ ⇑ιm) (ιm.symm k) x i

Tactic:
rw [← h, Function.update_self]
    have : ιm.symm k = i := (Equiv.symm_apply_eq ιm).mpr h
    rw [this, Function.update_self]

Tactic state after: