zzhisthebest/LeanBenchmark huggingface dataset:
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

theorem extracted_formal_statement_0 (n : ℕ) : Fintype.card (Signs n) = 2 ^ n := sorry

Tactic state before:
n : ℕ
⊢ Fintype.card (Signs n) = 2 ^ n

Tactic:
simp [Signs]

Tactic state after:
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

theorem extracted_formal_statement_1 : |(-1)| = 1 := sorry

Tactic state before:
case inl
n : ℕ
σ : Signs n
k : Fin n
this : ↑(σ k) ∈ {-1, 1}
h : ↑(σ k) = -1
⊢ |↑(σ k)| = 1

Tactic:
rw [h]

Tactic state after:
[case inl
 n : ℕ
 σ : Signs n
 k : Fin n
 this : ↑(σ k) ∈ {-1, 1}
 h : ↑(σ k) = -1
 ⊢ |(-1)| = 1]
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

theorem extracted_formal_statement_2 : |(-1)| = 1 := sorry

Tactic state before:
case inl
n : ℕ
σ : Signs n
k : Fin n
this : ↑(σ k) ∈ {-1, 1}
h : ↑(σ k) = -1
⊢ |(-1)| = 1

Tactic:
simp

Tactic state after:
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

theorem extracted_formal_statement_3 : |1| = 1 := sorry

Tactic state before:
case inr
n : ℕ
σ : Signs n
k : Fin n
this : ↑(σ k) ∈ {-1, 1}
h : ↑(σ k) = 1
⊢ |↑(σ k)| = 1

Tactic:
rw [h]

Tactic state after:
[case inr
 n : ℕ
 σ : Signs n
 k : Fin n
 this : ↑(σ k) ∈ {-1, 1}
 h : ↑(σ k) = 1
 ⊢ |1| = 1]
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

theorem extracted_formal_statement_4 : |1| = 1 := sorry

Tactic state before:
case inr
n : ℕ
σ : Signs n
k : Fin n
this : ↑(σ k) ∈ {-1, 1}
h : ↑(σ k) = 1
⊢ |1| = 1

Tactic:
simp

Tactic state after:
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

theorem extracted_formal_statement_5 {n : ℕ} (σ : Signs n) (k : Fin n) : |↑(σ k)| = 1 := sorry

Tactic state before:
n : ℕ
σ : Signs n
k : Fin n
⊢ |↑(σ k)| = 1

Tactic:
simp

Tactic state after:
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

theorem extracted_formal_statement_6.{u} {Ω : Type u} [inst : MeasurableSpace Ω] {n : ℕ}
  (h_original_goal : Measurable fun f => Fin.snoc f.2 f.1) (a : Fin (n + 1)) :
  Measurable fun c => Fin.snoc c.2 c.1 a := sorry

Tactic state before:
Ω : Type u
inst✝ : MeasurableSpace Ω
n : ℕ
⊢ Measurable fun f => Fin.snoc f.2 f.1

Tactic:
apply measurable_pi_lambda

Tactic state after:
[case hf
 Ω : Type u
 inst✝ : MeasurableSpace Ω
 n : ℕ
 ⊢ ∀ (a : Fin (n + 1)), Measurable fun c => Fin.snoc c.2 c.1 a]
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

theorem extracted_formal_statement_7.{u} {Ω : Type u} [inst : MeasurableSpace Ω] {n : ℕ} (i : Fin (n + 1)) (h : ↑i < n)
  (c : Ω × (Fin n → Ω)) : (if h : ↑i < n then c.2 (i.castLT h) else c.1) = c.2 (i.castLT h) := sorry

Tactic state before:
case h
Ω : Type u
inst✝ : MeasurableSpace Ω
n : ℕ
i : Fin (n + 1)
h : ↑i < n
c : Ω × (Fin n → Ω)
⊢ (if h : ↑i < n then c.2 (i.castLT h) else c.1) = c.2 (i.castLT h)

Tactic:
rw [dif_pos h]

Tactic state after:
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

theorem extracted_formal_statement_8.{u} {Ω : Type u} [inst : MeasurableSpace Ω] {n : ℕ} (i : Fin (n + 1)) (h : ↑i < n)
  (this : (fun c => if h : ↑i < n then c.2 (i.castLT h) else c.1) = fun c => c.2 (i.castLT h))
  (h_original_goal : Measurable fun c => if h : ↑i < n then c.2 (i.castLT h) else c.1) :
  Measurable fun c => c.2 (i.castLT h) := sorry

Tactic state before:
Ω : Type u
inst✝ : MeasurableSpace Ω
n : ℕ
i : Fin (n + 1)
h : ↑i < n
this : (fun c => if h : ↑i < n then c.2 (i.castLT h) else c.1) = fun c => c.2 (i.castLT h)
⊢ Measurable fun c => if h : ↑i < n then c.2 (i.castLT h) else c.1

Tactic:
rw [this]

Tactic state after:
[Ω : Type u
 inst✝ : MeasurableSpace Ω
 n : ℕ
 i : Fin (n + 1)
 h : ↑i < n
 this : (fun c => if h : ↑i < n then c.2 (i.castLT h) else c.1) = fun c => c.2 (i.castLT h)
 ⊢ Measurable fun c => c.2 (i.castLT h)]
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

theorem extracted_formal_statement_9.{u} {Ω : Type u} [inst : MeasurableSpace Ω] {n : ℕ} (i : Fin (n + 1)) (h : ↑i < n)
  (this : (fun c => if h : ↑i < n then c.2 (i.castLT h) else c.1) = fun c => c.2 (i.castLT h)) :
  Measurable fun c => c.2 (i.castLT h) := sorry

Tactic state before:
Ω : Type u
inst✝ : MeasurableSpace Ω
n : ℕ
i : Fin (n + 1)
h : ↑i < n
this : (fun c => if h : ↑i < n then c.2 (i.castLT h) else c.1) = fun c => c.2 (i.castLT h)
⊢ Measurable fun c => c.2 (i.castLT h)

Tactic:
exact Measurable.eval measurable_snd

Tactic state after:
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

theorem extracted_formal_statement_10.{u} {Ω : Type u} [inst : MeasurableSpace Ω] {n : ℕ} (i : Fin (n + 1)) (h : ¬↑i < n)
  (c : Ω × (Fin n → Ω)) : (if h : ↑i < n then c.2 (i.castLT h) else c.1) = c.1 := sorry

Tactic state before:
case h
Ω : Type u
inst✝ : MeasurableSpace Ω
n : ℕ
i : Fin (n + 1)
h : ¬↑i < n
c : Ω × (Fin n → Ω)
⊢ (if h : ↑i < n then c.2 (i.castLT h) else c.1) = c.1

Tactic:
rw [dif_neg h]

Tactic state after:
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

theorem extracted_formal_statement_11.{u} {Ω : Type u} [inst : MeasurableSpace Ω] {n : ℕ} (i : Fin (n + 1)) (h : ¬↑i < n)
  (this : (fun c => if h : ↑i < n then c.2 (i.castLT h) else c.1) = fun c => c.1)
  (h_original_goal : Measurable fun c => if h : ↑i < n then c.2 (i.castLT h) else c.1) :
  Measurable fun c => c.1 := sorry

Tactic state before:
Ω : Type u
inst✝ : MeasurableSpace Ω
n : ℕ
i : Fin (n + 1)
h : ¬↑i < n
this : (fun c => if h : ↑i < n then c.2 (i.castLT h) else c.1) = fun c => c.1
⊢ Measurable fun c => if h : ↑i < n then c.2 (i.castLT h) else c.1

Tactic:
rw [this]

Tactic state after:
[Ω : Type u
 inst✝ : MeasurableSpace Ω
 n : ℕ
 i : Fin (n + 1)
 h : ¬↑i < n
 this : (fun c => if h : ↑i < n then c.2 (i.castLT h) else c.1) = fun c => c.1
 ⊢ Measurable fun c => c.1]
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

theorem extracted_formal_statement_12.{u} {Ω : Type u} [inst : MeasurableSpace Ω] {n : ℕ} (i : Fin (n + 1)) (h : ¬↑i < n)
  (this : (fun c => if h : ↑i < n then c.2 (i.castLT h) else c.1) = fun c => c.1) : Measurable fun c => c.1 := sorry

Tactic state before:
Ω : Type u
inst✝ : MeasurableSpace Ω
n : ℕ
i : Fin (n + 1)
h : ¬↑i < n
this : (fun c => if h : ↑i < n then c.2 (i.castLT h) else c.1) = fun c => c.1
⊢ Measurable fun c => c.1

Tactic:
exact measurable_fst

Tactic state after:
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

theorem extracted_formal_statement_13.{u} {Ω : Type u} [inst : MeasurableSpace Ω] {μ : Measure Ω}
  [inst_1 : IsProbabilityMeasure μ] {n : ℕ}
  (h_original_goal :
    (Measure.pi fun x => μ) = Measure.map (fun f x => Fin.snoc f.2 f.1 x) (μ.prod (Measure.pi fun x => μ)))
  (s : Fin (n + 1) → Set Ω) :
  (∀ (i : Fin (n + 1)), MeasurableSet (s i)) →
    (Measure.map (fun f x => Fin.snoc f.2 f.1 x) (μ.prod (Measure.pi fun x => μ))) (Set.univ.pi s) =
      ∏ i, μ (s i) := sorry

Tactic state before:
Ω : Type u
inst✝¹ : MeasurableSpace Ω
μ : Measure Ω
inst✝ : IsProbabilityMeasure μ
n : ℕ
⊢ (Measure.pi fun x => μ) = Measure.map (fun f x => Fin.snoc f.2 f.1 x) (μ.prod (Measure.pi fun x => μ))

Tactic:
apply Measure.pi_eq

Tactic state after:
[case h
 Ω : Type u
 inst✝¹ : MeasurableSpace Ω
 μ : Measure Ω
 inst✝ : IsProbabilityMeasure μ
 n : ℕ
 ⊢ ∀ (s : Fin (n + 1) → Set Ω),
     (∀ (i : Fin (n + 1)), MeasurableSet (s i)) →
       (Measure.map (fun f x => Fin.snoc f.2 f.1 x) (μ.prod (Measure.pi fun x => μ))) (Set.univ.pi s) = ∏ i, μ (s i)]
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

theorem extracted_formal_statement_14.{u} {Ω : Type u} [inst : MeasurableSpace Ω] {μ : Measure Ω}
  [inst_1 : IsProbabilityMeasure μ] {n : ℕ} (s : Fin (n + 1) → Set Ω) (hs : ∀ (i : Fin (n + 1)), MeasurableSet (s i))
  (h_original_goal :
    (Measure.map (fun f x => Fin.snoc f.2 f.1 x) (μ.prod (Measure.pi fun x => μ))) (Set.univ.pi s) = ∏ i, μ (s i)) :
  (μ.prod (Measure.pi fun x => μ)) ((fun f => Fin.snoc f.2 f.1) ⁻¹' Set.univ.pi s) = ∏ i, μ (s i) := sorry

Tactic state before:
case h
Ω : Type u
inst✝¹ : MeasurableSpace Ω
μ : Measure Ω
inst✝ : IsProbabilityMeasure μ
n : ℕ
s : Fin (n + 1) → Set Ω
hs : ∀ (i : Fin (n + 1)), MeasurableSet (s i)
⊢ (Measure.map (fun f x => Fin.snoc f.2 f.1 x) (μ.prod (Measure.pi fun x => μ))) (Set.univ.pi s) = ∏ i, μ (s i)

Tactic:
rw [Measure.map_apply measurable_snocEquiv (MeasurableSet.univ_pi hs)]

Tactic state after:
[case h
 Ω : Type u
 inst✝¹ : MeasurableSpace Ω
 μ : Measure Ω
 inst✝ : IsProbabilityMeasure μ
 n : ℕ
 s : Fin (n + 1) → Set Ω
 hs : ∀ (i : Fin (n + 1)), MeasurableSet (s i)
 ⊢ (μ.prod (Measure.pi fun x => μ)) ((fun f => Fin.snoc f.2 f.1) ⁻¹' Set.univ.pi s) = ∏ i, μ (s i)]
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

theorem extracted_formal_statement_15.{u} {Ω : Type u} [inst : MeasurableSpace Ω] {μ : Measure Ω}
  [inst_1 : IsProbabilityMeasure μ] {n : ℕ} (s : Fin (n + 1) → Set Ω) (hs : ∀ (i : Fin (n + 1)), MeasurableSet (s i))
  (ω : Ω × (Fin n → Ω))
  (h_original_goal :
    ω ∈ (fun f x => Fin.snoc f.2 f.1 x) ⁻¹' Set.univ.pi s ↔ ω ∈ s (Fin.last n) ×ˢ Set.univ.pi (s ∘ Fin.castSucc)) :
  (∀ (i : Fin (n + 1)), Fin.snoc ω.2 ω.1 i ∈ s i) ↔ ω.1 ∈ s (Fin.last n) ∧ ∀ (i : Fin n), ω.2 i ∈ s i.castSucc := sorry

Tactic state before:
case h
Ω : Type u
inst✝¹ : MeasurableSpace Ω
μ : Measure Ω
inst✝ : IsProbabilityMeasure μ
n : ℕ
s : Fin (n + 1) → Set Ω
hs : ∀ (i : Fin (n + 1)), MeasurableSet (s i)
ω : Ω × (Fin n → Ω)
⊢ ω ∈ (fun f x => Fin.snoc f.2 f.1 x) ⁻¹' Set.univ.pi s ↔ ω ∈ s (Fin.last n) ×ˢ Set.univ.pi (s ∘ Fin.castSucc)

Tactic:
simp only [Set.mem_preimage, Set.mem_pi, Set.mem_univ, forall_const, Set.mem_prod, Function.comp_apply]

Tactic state after:
[case h
 Ω : Type u
 inst✝¹ : MeasurableSpace Ω
 μ : Measure Ω
 inst✝ : IsProbabilityMeasure μ
 n : ℕ
 s : Fin (n + 1) → Set Ω
 hs : ∀ (i : Fin (n + 1)), MeasurableSet (s i)
 ω : Ω × (Fin n → Ω)
 ⊢ (∀ (i : Fin (n + 1)), Fin.snoc ω.2 ω.1 i ∈ s i) ↔ ω.1 ∈ s (Fin.last n) ∧ ∀ (i : Fin n), ω.2 i ∈ s i.castSucc]
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

theorem extracted_formal_statement_16.{u} {Ω : Type u} [inst : MeasurableSpace Ω] {μ : Measure Ω}
  [inst_1 : IsProbabilityMeasure μ] {n : ℕ} (s : Fin (n + 1) → Set Ω) (hs : ∀ (i : Fin (n + 1)), MeasurableSet (s i))
  (ω : Ω × (Fin n → Ω)) (h : ∀ (i : Fin (n + 1)), Fin.snoc ω.2 ω.1 i ∈ s i) (this_1 : ω.1 ∈ s (Fin.last n)) (i : Fin n)
  (this : ω.2 i ∈ s i.castSucc) : ω.2 i ∈ s i.castSucc := sorry

Tactic state before:
case right
Ω : Type u
inst✝¹ : MeasurableSpace Ω
μ : Measure Ω
inst✝ : IsProbabilityMeasure μ
n : ℕ
s : Fin (n + 1) → Set Ω
hs : ∀ (i : Fin (n + 1)), MeasurableSet (s i)
ω : Ω × (Fin n → Ω)
h : ∀ (i : Fin (n + 1)), Fin.snoc ω.2 ω.1 i ∈ s i
this✝ : ω.1 ∈ s (Fin.last n)
i : Fin n
this : ω.2 i ∈ s i.castSucc
⊢ ω.2 i ∈ s i.castSucc

Tactic:
exact this

Tactic state after:
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

theorem extracted_formal_statement_17.{u} {Ω : Type u} [inst : MeasurableSpace Ω] {μ : Measure Ω}
  [inst_1 : IsProbabilityMeasure μ] {n : ℕ} (s : Fin (n + 1) → Set Ω) (hs : ∀ (i : Fin (n + 1)), MeasurableSet (s i))
  (ω : Ω × (Fin n → Ω)) (h₁ : ω.1 ∈ s (Fin.last n)) (h₂ : ∀ (i : Fin n), ω.2 i ∈ s i.castSucc) (i : Fin (n + 1))
  (h : ↑i < n) (h_original_goal : (if h : ↑i < n then ω.2 (i.castLT h) else ω.1) ∈ s i) : ↑i < n := sorry

Tactic state before:
Ω : Type u
inst✝¹ : MeasurableSpace Ω
μ : Measure Ω
inst✝ : IsProbabilityMeasure μ
n : ℕ
s : Fin (n + 1) → Set Ω
hs : ∀ (i : Fin (n + 1)), MeasurableSet (s i)
ω : Ω × (Fin n → Ω)
h₁ : ω.1 ∈ s (Fin.last n)
h₂ : ∀ (i : Fin n), ω.2 i ∈ s i.castSucc
i : Fin (n + 1)
h : ↑i < n
⊢ (if h : ↑i < n then ω.2 (i.castLT h) else ω.1) ∈ s i

Tactic:
rw [dif_pos]

Tactic state after:
[Ω : Type u
 inst✝¹ : MeasurableSpace Ω
 μ : Measure Ω
 inst✝ : IsProbabilityMeasure μ
 n : ℕ
 s : Fin (n + 1) → Set Ω
 hs : ∀ (i : Fin (n + 1)), MeasurableSet (s i)
 ω : Ω × (Fin n → Ω)
 h₁ : ω.1 ∈ s (Fin.last n)
 h₂ : ∀ (i : Fin n), ω.2 i ∈ s i.castSucc
 i : Fin (n + 1)
 h : ↑i < n
 ⊢ ω.2 (i.castLT ?hc) ∈ s i,
 case hc
 Ω : Type u
 inst✝¹ : MeasurableSpace Ω
 μ : Measure Ω
 inst✝ : IsProbabilityMeasure μ
 n : ℕ
 s : Fin (n + 1) → Set Ω
 hs : ∀ (i : Fin (n + 1)), MeasurableSet (s i)
 ω : Ω × (Fin n → Ω)
 h₁ : ω.1 ∈ s (Fin.last n)
 h₂ : ∀ (i : Fin n), ω.2 i ∈ s i.castSucc
 i : Fin (n + 1)
 h : ↑i < n
 ⊢ ↑i < n]
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

theorem extracted_formal_statement_18.{u} {Ω : Type u} [inst : MeasurableSpace Ω] {μ : Measure Ω}
  [inst_1 : IsProbabilityMeasure μ] {n : ℕ} (s : Fin (n + 1) → Set Ω) (hs : ∀ (i : Fin (n + 1)), MeasurableSet (s i))
  (ω : Ω × (Fin n → Ω)) (h₁ : ω.1 ∈ s (Fin.last n)) (h₂ : ∀ (i : Fin n), ω.2 i ∈ s i.castSucc) (i : Fin (n + 1))
  (h : ¬↑i < n) (h_original_goal : (if h : ↑i < n then ω.2 (i.castLT h) else ω.1) ∈ s i) : ω.1 ∈ s i := sorry

Tactic state before:
Ω : Type u
inst✝¹ : MeasurableSpace Ω
μ : Measure Ω
inst✝ : IsProbabilityMeasure μ
n : ℕ
s : Fin (n + 1) → Set Ω
hs : ∀ (i : Fin (n + 1)), MeasurableSet (s i)
ω : Ω × (Fin n → Ω)
h₁ : ω.1 ∈ s (Fin.last n)
h₂ : ∀ (i : Fin n), ω.2 i ∈ s i.castSucc
i : Fin (n + 1)
h : ¬↑i < n
⊢ (if h : ↑i < n then ω.2 (i.castLT h) else ω.1) ∈ s i

Tactic:
rw [dif_neg h]

Tactic state after:
[Ω : Type u
 inst✝¹ : MeasurableSpace Ω
 μ : Measure Ω
 inst✝ : IsProbabilityMeasure μ
 n : ℕ
 s : Fin (n + 1) → Set Ω
 hs : ∀ (i : Fin (n + 1)), MeasurableSet (s i)
 ω : Ω × (Fin n → Ω)
 h₁ : ω.1 ∈ s (Fin.last n)
 h₂ : ∀ (i : Fin n), ω.2 i ∈ s i.castSucc
 i : Fin (n + 1)
 h : ¬↑i < n
 ⊢ ω.1 ∈ s i]
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

theorem extracted_formal_statement_19.{u} {Ω : Type u} [inst : MeasurableSpace Ω] {μ : Measure Ω}
  [inst_1 : IsProbabilityMeasure μ] {n : ℕ} (s : Fin (n + 1) → Set Ω) (hs : ∀ (i : Fin (n + 1)), MeasurableSet (s i))
  (ω : Ω × (Fin n → Ω)) (h₁ : ω.1 ∈ s (Fin.last n)) (h₂ : ∀ (i : Fin n), ω.2 i ∈ s i.castSucc) (i : Fin (n + 1))
  (h : ¬↑i < n) (this : i = Fin.last n) (h_original_goal : ω.1 ∈ s i) : ω.1 ∈ s (Fin.last n) := sorry

Tactic state before:
Ω : Type u
inst✝¹ : MeasurableSpace Ω
μ : Measure Ω
inst✝ : IsProbabilityMeasure μ
n : ℕ
s : Fin (n + 1) → Set Ω
hs : ∀ (i : Fin (n + 1)), MeasurableSet (s i)
ω : Ω × (Fin n → Ω)
h₁ : ω.1 ∈ s (Fin.last n)
h₂ : ∀ (i : Fin n), ω.2 i ∈ s i.castSucc
i : Fin (n + 1)
h : ¬↑i < n
this : i = Fin.last n
⊢ ω.1 ∈ s i

Tactic:
rw [this]

Tactic state after:
[Ω : Type u
 inst✝¹ : MeasurableSpace Ω
 μ : Measure Ω
 inst✝ : IsProbabilityMeasure μ
 n : ℕ
 s : Fin (n + 1) → Set Ω
 hs : ∀ (i : Fin (n + 1)), MeasurableSet (s i)
 ω : Ω × (Fin n → Ω)
 h₁ : ω.1 ∈ s (Fin.last n)
 h₂ : ∀ (i : Fin n), ω.2 i ∈ s i.castSucc
 i : Fin (n + 1)
 h : ¬↑i < n
 this : i = Fin.last n
 ⊢ ω.1 ∈ s (Fin.last n)]
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

theorem extracted_formal_statement_20.{u} {Ω : Type u} [inst : MeasurableSpace Ω] {μ : Measure Ω}
  [inst_1 : IsProbabilityMeasure μ] {n : ℕ} (s : Fin (n + 1) → Set Ω) (hs : ∀ (i : Fin (n + 1)), MeasurableSet (s i))
  (ω : Ω × (Fin n → Ω)) (h₁ : ω.1 ∈ s (Fin.last n)) (h₂ : ∀ (i : Fin n), ω.2 i ∈ s i.castSucc) (i : Fin (n + 1))
  (h : ¬↑i < n) (this : i = Fin.last n) : ω.1 ∈ s (Fin.last n) := sorry

Tactic state before:
Ω : Type u
inst✝¹ : MeasurableSpace Ω
μ : Measure Ω
inst✝ : IsProbabilityMeasure μ
n : ℕ
s : Fin (n + 1) → Set Ω
hs : ∀ (i : Fin (n + 1)), MeasurableSet (s i)
ω : Ω × (Fin n → Ω)
h₁ : ω.1 ∈ s (Fin.last n)
h₂ : ∀ (i : Fin n), ω.2 i ∈ s i.castSucc
i : Fin (n + 1)
h : ¬↑i < n
this : i = Fin.last n
⊢ ω.1 ∈ s (Fin.last n)

Tactic:
exact h₁

Tactic state after:
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

theorem extracted_formal_statement_21.{u} {Ω : Type u} [inst : MeasurableSpace Ω] {μ : Measure Ω}
  [inst_1 : IsProbabilityMeasure μ] {n : ℕ} (s : Fin (n + 1) → Set Ω) (hs : ∀ (i : Fin (n + 1)), MeasurableSet (s i))
  (this : (fun f x => Fin.snoc f.2 f.1 x) ⁻¹' Set.univ.pi s = s (Fin.last n) ×ˢ Set.univ.pi (s ∘ Fin.castSucc))
  (h_original_goal : (μ.prod (Measure.pi fun x => μ)) ((fun f => Fin.snoc f.2 f.1) ⁻¹' Set.univ.pi s) = ∏ i, μ (s i)) :
  μ (s (Fin.last n)) * ∏ i, μ ((s ∘ Fin.castSucc) i) = ∏ i, μ (s i) := sorry

Tactic state before:
case h
Ω : Type u
inst✝¹ : MeasurableSpace Ω
μ : Measure Ω
inst✝ : IsProbabilityMeasure μ
n : ℕ
s : Fin (n + 1) → Set Ω
hs : ∀ (i : Fin (n + 1)), MeasurableSet (s i)
this : (fun f x => Fin.snoc f.2 f.1 x) ⁻¹' Set.univ.pi s = s (Fin.last n) ×ˢ Set.univ.pi (s ∘ Fin.castSucc)
⊢ (μ.prod (Measure.pi fun x => μ)) ((fun f => Fin.snoc f.2 f.1) ⁻¹' Set.univ.pi s) = ∏ i, μ (s i)

Tactic:
rw [this, Measure.prod_prod, Measure.pi_pi]

Tactic state after:
[case h
 Ω : Type u
 inst✝¹ : MeasurableSpace Ω
 μ : Measure Ω
 inst✝ : IsProbabilityMeasure μ
 n : ℕ
 s : Fin (n + 1) → Set Ω
 hs : ∀ (i : Fin (n + 1)), MeasurableSet (s i)
 this : (fun f x => Fin.snoc f.2 f.1 x) ⁻¹' Set.univ.pi s = s (Fin.last n) ×ˢ Set.univ.pi (s ∘ Fin.castSucc)
 ⊢ μ (s (Fin.last n)) * ∏ i, μ ((s ∘ Fin.castSucc) i) = ∏ i, μ (s i)]
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

theorem extracted_formal_statement_22.{u} {Ω : Type u} [inst : MeasurableSpace Ω] {μ : Measure Ω}
  [inst_1 : IsProbabilityMeasure μ] {n : ℕ} (s : Fin (n + 1) → Set Ω) (hs : ∀ (i : Fin (n + 1)), MeasurableSet (s i))
  (this : (fun f x => Fin.snoc f.2 f.1 x) ⁻¹' Set.univ.pi s = s (Fin.last n) ×ˢ Set.univ.pi (s ∘ Fin.castSucc))
  (h_original_goal :
    μ (s (Fin.last n)) * ∏ i, μ ((s ∘ Fin.castSucc) i) = ∏ i, Fin.snoc (⇑μ ∘ s ∘ Fin.castSucc) (μ (s ↑n)) i) :
  (∏ i, μ ((s ∘ Fin.castSucc) i)) * μ (s (Fin.last n)) = (∏ i, (⇑μ ∘ s ∘ Fin.castSucc) i) * μ (s ↑n) := sorry

Tactic state before:
Ω : Type u
inst✝¹ : MeasurableSpace Ω
μ : Measure Ω
inst✝ : IsProbabilityMeasure μ
n : ℕ
s : Fin (n + 1) → Set Ω
hs : ∀ (i : Fin (n + 1)), MeasurableSet (s i)
this : (fun f x => Fin.snoc f.2 f.1 x) ⁻¹' Set.univ.pi s = s (Fin.last n) ×ˢ Set.univ.pi (s ∘ Fin.castSucc)
⊢ μ (s (Fin.last n)) * ∏ i, μ ((s ∘ Fin.castSucc) i) = ∏ i, Fin.snoc (⇑μ ∘ s ∘ Fin.castSucc) (μ (s ↑n)) i

Tactic:
rw [mul_comm, Fin.prod_snoc]

Tactic state after:
[Ω : Type u
 inst✝¹ : MeasurableSpace Ω
 μ : Measure Ω
 inst✝ : IsProbabilityMeasure μ
 n : ℕ
 s : Fin (n + 1) → Set Ω
 hs : ∀ (i : Fin (n + 1)), MeasurableSet (s i)
 this : (fun f x => Fin.snoc f.2 f.1 x) ⁻¹' Set.univ.pi s = s (Fin.last n) ×ˢ Set.univ.pi (s ∘ Fin.castSucc)
 ⊢ (∏ i, μ ((s ∘ Fin.castSucc) i)) * μ (s (Fin.last n)) = (∏ i, (⇑μ ∘ s ∘ Fin.castSucc) i) * μ (s ↑n)]
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

theorem extracted_formal_statement_23.{u} {Ω : Type u} [inst : MeasurableSpace Ω] {μ : Measure Ω}
  [inst_1 : IsProbabilityMeasure μ] {n : ℕ} (s : Fin (n + 1) → Set Ω) (hs : ∀ (i : Fin (n + 1)), MeasurableSet (s i))
  (this : (fun f x => Fin.snoc f.2 f.1 x) ⁻¹' Set.univ.pi s = s (Fin.last n) ×ˢ Set.univ.pi (s ∘ Fin.castSucc)) :
  (∏ i, μ ((s ∘ Fin.castSucc) i)) * μ (s (Fin.last n)) = (∏ i, (⇑μ ∘ s ∘ Fin.castSucc) i) * μ (s ↑n) := sorry

Tactic state before:
Ω : Type u
inst✝¹ : MeasurableSpace Ω
μ : Measure Ω
inst✝ : IsProbabilityMeasure μ
n : ℕ
s : Fin (n + 1) → Set Ω
hs : ∀ (i : Fin (n + 1)), MeasurableSet (s i)
this : (fun f x => Fin.snoc f.2 f.1 x) ⁻¹' Set.univ.pi s = s (Fin.last n) ×ˢ Set.univ.pi (s ∘ Fin.castSucc)
⊢ (∏ i, μ ((s ∘ Fin.castSucc) i)) * μ (s (Fin.last n)) = (∏ i, (⇑μ ∘ s ∘ Fin.castSucc) i) * μ (s ↑n)

Tactic:
simp

Tactic state after:
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

theorem extracted_formal_statement_24.{u} {Ω : Type u} [inst : MeasurableSpace Ω] {μ : Measure Ω}
  [inst_1 : IsProbabilityMeasure μ] {n : ℕ} (s : Fin (n + 1) → Set Ω) (hs : ∀ (i : Fin (n + 1)), MeasurableSet (s i))
  (this : (fun f x => Fin.snoc f.2 f.1 x) ⁻¹' Set.univ.pi s = s (Fin.last n) ×ˢ Set.univ.pi (s ∘ Fin.castSucc))
  (i : Fin (n + 1)) (h_original_goal : (if ↑i < n then μ (s i) else μ (s ↑n)) = μ (s i)) :
  n ≤ ↑i → μ (s (Fin.last n)) = μ (s i) := sorry

Tactic state before:
case e_f.h
Ω : Type u
inst✝¹ : MeasurableSpace Ω
μ : Measure Ω
inst✝ : IsProbabilityMeasure μ
n : ℕ
s : Fin (n + 1) → Set Ω
hs : ∀ (i : Fin (n + 1)), MeasurableSet (s i)
this : (fun f x => Fin.snoc f.2 f.1 x) ⁻¹' Set.univ.pi s = s (Fin.last n) ×ˢ Set.univ.pi (s ∘ Fin.castSucc)
i : Fin (n + 1)
⊢ (if ↑i < n then μ (s i) else μ (s ↑n)) = μ (s i)

Tactic:
simp only [Fin.natCast_eq_last, ite_eq_left_iff, not_lt]

Tactic state after:
[case e_f.h
 Ω : Type u
 inst✝¹ : MeasurableSpace Ω
 μ : Measure Ω
 inst✝ : IsProbabilityMeasure μ
 n : ℕ
 s : Fin (n + 1) → Set Ω
 hs : ∀ (i : Fin (n + 1)), MeasurableSet (s i)
 this : (fun f x => Fin.snoc f.2 f.1 x) ⁻¹' Set.univ.pi s = s (Fin.last n) ×ˢ Set.univ.pi (s ∘ Fin.castSucc)
 i : Fin (n + 1)
 ⊢ n ≤ ↑i → μ (s (Fin.last n)) = μ (s i)]
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

theorem extracted_formal_statement_25.{u} {Ω : Type u} [inst : MeasurableSpace Ω] {μ : Measure Ω}
  [inst_1 : IsProbabilityMeasure μ] {n : ℕ} (s : Fin (n + 1) → Set Ω) (hs : ∀ (i : Fin (n + 1)), MeasurableSet (s i))
  (this : (fun f x => Fin.snoc f.2 f.1 x) ⁻¹' Set.univ.pi s = s (Fin.last n) ×ˢ Set.univ.pi (s ∘ Fin.castSucc))
  (i : Fin (n + 1)) (h : n ≤ ↑i) (h_original_goal : s (Fin.last n) = s i) : Fin.last n = i := sorry

Tactic state before:
case e_f.h.h.e_6.h
Ω : Type u
inst✝¹ : MeasurableSpace Ω
μ : Measure Ω
inst✝ : IsProbabilityMeasure μ
n : ℕ
s : Fin (n + 1) → Set Ω
hs : ∀ (i : Fin (n + 1)), MeasurableSet (s i)
this : (fun f x => Fin.snoc f.2 f.1 x) ⁻¹' Set.univ.pi s = s (Fin.last n) ×ˢ Set.univ.pi (s ∘ Fin.castSucc)
i : Fin (n + 1)
h : n ≤ ↑i
⊢ s (Fin.last n) = s i

Tactic:
apply congr_arg

Tactic state after:
[case e_f.h.h.e_6.h.h
 Ω : Type u
 inst✝¹ : MeasurableSpace Ω
 μ : Measure Ω
 inst✝ : IsProbabilityMeasure μ
 n : ℕ
 s : Fin (n + 1) → Set Ω
 hs : ∀ (i : Fin (n + 1)), MeasurableSet (s i)
 this : (fun f x => Fin.snoc f.2 f.1 x) ⁻¹' Set.univ.pi s = s (Fin.last n) ×ˢ Set.univ.pi (s ∘ Fin.castSucc)
 i : Fin (n + 1)
 h : n ≤ ↑i
 ⊢ Fin.last n = i]
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

theorem extracted_formal_statement_26.{u} {Ω : Type u} [inst : MeasurableSpace Ω] {μ : Measure Ω}
  [inst_1 : IsProbabilityMeasure μ] {n : ℕ} (s : Fin (n + 1) → Set Ω) (hs : ∀ (i : Fin (n + 1)), MeasurableSet (s i))
  (this : (fun f x => Fin.snoc f.2 f.1 x) ⁻¹' Set.univ.pi s = s (Fin.last n) ×ˢ Set.univ.pi (s ∘ Fin.castSucc))
  (i : Fin (n + 1)) (h : n ≤ ↑i) (h_original_goal : Fin.last n = i) : i = Fin.last n := sorry

Tactic state before:
case e_f.h.h.e_6.h.h
Ω : Type u
inst✝¹ : MeasurableSpace Ω
μ : Measure Ω
inst✝ : IsProbabilityMeasure μ
n : ℕ
s : Fin (n + 1) → Set Ω
hs : ∀ (i : Fin (n + 1)), MeasurableSet (s i)
this : (fun f x => Fin.snoc f.2 f.1 x) ⁻¹' Set.univ.pi s = s (Fin.last n) ×ˢ Set.univ.pi (s ∘ Fin.castSucc)
i : Fin (n + 1)
h : n ≤ ↑i
⊢ Fin.last n = i

Tactic:
apply Eq.symm

Tactic state after:
[case e_f.h.h.e_6.h.h.h
 Ω : Type u
 inst✝¹ : MeasurableSpace Ω
 μ : Measure Ω
 inst✝ : IsProbabilityMeasure μ
 n : ℕ
 s : Fin (n + 1) → Set Ω
 hs : ∀ (i : Fin (n + 1)), MeasurableSet (s i)
 this : (fun f x => Fin.snoc f.2 f.1 x) ⁻¹' Set.univ.pi s = s (Fin.last n) ×ˢ Set.univ.pi (s ∘ Fin.castSucc)
 i : Fin (n + 1)
 h : n ≤ ↑i
 ⊢ i = Fin.last n]
import Mathlib
import FoML


open MeasureTheory ProbabilityTheory Real

theorem extracted_formal_statement_27.{u} {Ω : Type u} [inst : MeasurableSpace Ω] {μ : Measure Ω}
  [inst_1 : IsProbabilityMeasure μ] {n : ℕ} (s : Fin (n + 1) → Set Ω) (hs : ∀ (i : Fin (n + 1)), MeasurableSet (s i))
  (this : (fun f x => Fin.snoc f.2 f.1 x) ⁻¹' Set.univ.pi s = s (Fin.last n) ×ˢ Set.univ.pi (s ∘ Fin.castSucc))
  (i : Fin (n + 1)) (h : n ≤ ↑i) : i = Fin.last n := sorry

Tactic state before:
case e_f.h.h.e_6.h.h.h
Ω : Type u
inst✝¹ : MeasurableSpace Ω
μ : Measure Ω
inst✝ : IsProbabilityMeasure μ
n : ℕ
s : Fin (n + 1) → Set Ω
hs : ∀ (i : Fin (n + 1)), MeasurableSet (s i)
this : (fun f x => Fin.snoc f.2 f.1 x) ⁻¹' Set.univ.pi s = s (Fin.last n) ×ˢ Set.univ.pi (s ∘ Fin.castSucc)
i : Fin (n + 1)
h : n ≤ ↑i
⊢ i = Fin.last n

Tactic:
exact Fin.last_le_iff.mp h

Tactic state after: