Theorem: MeasurableSpace.measurableSet_generateFrom_memPartition_iff
File: Mathlib/MeasureTheory/MeasurableSpace/CountablyGenerated.lean

tactic: refine ⟨fun h ↦ ?_, fun ⟨S, hS_subset, hS_eq⟩ ↦ ?_⟩
state_before: α : Type u_1
β : Type u_2
t : ℕ → Set α
n : ℕ
s : Set α
⊢ MeasurableSet s ↔ ∃ S, ↑S ⊆ memPartition t n ∧ s = ⋃₀ ↑S
state_after: case refine_1
α : Type u_1
β : Type u_2
t : ℕ → Set α
n : ℕ
s : Set α
h : MeasurableSet s
⊢ ∃ S, ↑S ⊆ memPartition t n ∧ s = ⋃₀ ↑S

case refine_2
α : Type u_1
β : Type u_2
t : ℕ → Set α
n : ℕ
s : Set α
x✝ : ∃ S, ↑S ⊆ memPartition t n ∧ s = ⋃₀ ↑S
S : Finset (Set α)
hS_subset : ↑S ⊆ memPartition t n
hS_eq : s = ⋃₀ ↑S
⊢ MeasurableSet s

tactic: refine MeasurableSpace.generateFrom_induction
  (p := fun u ↦ ∃ S : Finset (Set α), ↑S ⊆ memPartition t n ∧ u = ⋃₀ ↑S)
  (C := memPartition t n) ?_ ?_ ?_ ?_ h
state_before: case refine_1
α : Type u_1
β : Type u_2
t : ℕ → Set α
n : ℕ
s : Set α
h : MeasurableSet s
⊢ ∃ S, ↑S ⊆ memPartition t n ∧ s = ⋃₀ ↑S
state_after: case refine_1.refine_1
α : Type u_1
β : Type u_2
t : ℕ → Set α
n : ℕ
s : Set α
h : MeasurableSet s
⊢ ∀ t_1 ∈ memPartition t n, (fun u => ∃ S, ↑S ⊆ memPartition t n ∧ u = ⋃₀ ↑S) t_1

case refine_1.refine_2
α : Type u_1
β : Type u_2
t : ℕ → Set α
n : ℕ
s : Set α
h : MeasurableSet s
⊢ (fun u => ∃ S, ↑S ⊆ memPartition t n ∧ u = ⋃₀ ↑S) ∅

case refine_1.refine_3
α : Type u_1
β : Type u_2
t : ℕ → Set α
n : ℕ
s : Set α
h : MeasurableSet s
⊢ ∀ (t_1 : Set α),
    (fun u => ∃ S, ↑S ⊆ memPartition t n ∧ u = ⋃₀ ↑S) t_1 → (fun u => ∃ S, ↑S ⊆ memPartition t n ∧ u = ⋃₀ ↑S) t_1ᶜ

case refine_1.refine_4
α : Type u_1
β : Type u_2
t : ℕ → Set α
n : ℕ
s : Set α
h : MeasurableSet s
⊢ ∀ (f : ℕ → Set α),
    (∀ (n_1 : ℕ), (fun u => ∃ S, ↑S ⊆ memPartition t n ∧ u = ⋃₀ ↑S) (f n_1)) →
      (fun u => ∃ S, ↑S ⊆ memPartition t n ∧ u = ⋃₀ ↑S) (⋃ i, f i)

tactic: exact fun u hu ↦ ⟨{u}, by simp [hu], by simp⟩
state_before: case refine_1.refine_1
α : Type u_1
β : Type u_2
t : ℕ → Set α
n : ℕ
s : Set α
h : MeasurableSet s
⊢ ∀ t_1 ∈ memPartition t n, (fun u => ∃ S, ↑S ⊆ memPartition t n ∧ u = ⋃₀ ↑S) t_1
state_after: no goals

tactic: simp [hu]
state_before: α : Type u_1
β : Type u_2
t : ℕ → Set α
n : ℕ
s : Set α
h : MeasurableSet s
u : Set α
hu : u ∈ memPartition t n
⊢ ↑{u} ⊆ memPartition t n
state_after: no goals

tactic: simp
state_before: α : Type u_1
β : Type u_2
t : ℕ → Set α
n : ℕ
s : Set α
h : MeasurableSet s
u : Set α
hu : u ∈ memPartition t n
⊢ u = ⋃₀ ↑{u}
state_after: no goals

tactic: exact ⟨∅, by simp, by simp⟩
state_before: case refine_1.refine_2
α : Type u_1
β : Type u_2
t : ℕ → Set α
n : ℕ
s : Set α
h : MeasurableSet s
⊢ (fun u => ∃ S, ↑S ⊆ memPartition t n ∧ u = ⋃₀ ↑S) ∅
state_after: no goals

tactic: simp
state_before: α : Type u_1
β : Type u_2
t : ℕ → Set α
n : ℕ
s : Set α
h : MeasurableSet s
⊢ ↑∅ ⊆ memPartition t n
state_after: no goals

tactic: simp
state_before: α : Type u_1
β : Type u_2
t : ℕ → Set α
n : ℕ
s : Set α
h : MeasurableSet s
⊢ ∅ = ⋃₀ ↑∅
state_after: no goals

tactic: rintro u ⟨S, hS_subset, rfl⟩
state_before: case refine_1.refine_3
α : Type u_1
β : Type u_2
t : ℕ → Set α
n : ℕ
s : Set α
h : MeasurableSet s
⊢ ∀ (t_1 : Set α),
    (fun u => ∃ S, ↑S ⊆ memPartition t n ∧ u = ⋃₀ ↑S) t_1 → (fun u => ∃ S, ↑S ⊆ memPartition t n ∧ u = ⋃₀ ↑S) t_1ᶜ
state_after: case refine_1.refine_3.intro.intro
α : Type u_1
β : Type u_2
t : ℕ → Set α
n : ℕ
s : Set α
h : MeasurableSet s
S : Finset (Set α)
hS_subset : ↑S ⊆ memPartition t n
⊢ ∃ S_1, ↑S_1 ⊆ memPartition t n ∧ (⋃₀ ↑S)ᶜ = ⋃₀ ↑S_1

tactic: refine ⟨(memPartition t n).toFinset \ S, ?_, ?_⟩
state_before: case refine_1.refine_3.intro.intro
α : Type u_1
β : Type u_2
t : ℕ → Set α
n : ℕ
s : Set α
h : MeasurableSet s
S : Finset (Set α)
hS_subset : ↑S ⊆ memPartition t n
⊢ ∃ S_1, ↑S_1 ⊆ memPartition t n ∧ (⋃₀ ↑S)ᶜ = ⋃₀ ↑S_1
state_after: case refine_1.refine_3.intro.intro.refine_1
α : Type u_1
β : Type u_2
t : ℕ → Set α
n : ℕ
s : Set α
h : MeasurableSet s
S : Finset (Set α)
hS_subset : ↑S ⊆ memPartition t n
⊢ ↑((memPartition t n).toFinset \ S) ⊆ memPartition t n

case refine_1.refine_3.intro.intro.refine_2
α : Type u_1
β : Type u_2
t : ℕ → Set α
n : ℕ
s : Set α
h : MeasurableSet s
S : Finset (Set α)
hS_subset : ↑S ⊆ memPartition t n
⊢ (⋃₀ ↑S)ᶜ = ⋃₀ ↑((memPartition t n).toFinset \ S)

tactic: simp only [Finset.coe_sdiff, coe_toFinset]
state_before: case refine_1.refine_3.intro.intro.refine_1
α : Type u_1
β : Type u_2
t : ℕ → Set α
n : ℕ
s : Set α
h : MeasurableSet s
S : Finset (Set α)
hS_subset : ↑S ⊆ memPartition t n
⊢ ↑((memPartition t n).toFinset \ S) ⊆ memPartition t n
state_after: case refine_1.refine_3.intro.intro.refine_1
α : Type u_1
β : Type u_2
t : ℕ → Set α
n : ℕ
s : Set α
h : MeasurableSet s
S : Finset (Set α)
hS_subset : ↑S ⊆ memPartition t n
⊢ memPartition t n \ ↑S ⊆ memPartition t n

tactic: exact diff_subset
state_before: case refine_1.refine_3.intro.intro.refine_1
α : Type u_1
β : Type u_2
t : ℕ → Set α
n : ℕ
s : Set α
h : MeasurableSet s
S : Finset (Set α)
hS_subset : ↑S ⊆ memPartition t n
⊢ memPartition t n \ ↑S ⊆ memPartition t n
state_after: no goals

tactic: simp only [Finset.coe_sdiff, coe_toFinset]
state_before: case refine_1.refine_3.intro.intro.refine_2
α : Type u_1
β : Type u_2
t : ℕ → Set α
n : ℕ
s : Set α
h : MeasurableSet s
S : Finset (Set α)
hS_subset : ↑S ⊆ memPartition t n
⊢ (⋃₀ ↑S)ᶜ = ⋃₀ ↑((memPartition t n).toFinset \ S)
state_after: case refine_1.refine_3.intro.intro.refine_2
α : Type u_1
β : Type u_2
t : ℕ → Set α
n : ℕ
s : Set α
h : MeasurableSet s
S : Finset (Set α)
hS_subset : ↑S ⊆ memPartition t n
⊢ (⋃₀ ↑S)ᶜ = ⋃₀ (memPartition t n \ ↑S)

tactic: refine (IsCompl.eq_compl ⟨?_, ?_⟩).symm
state_before: case refine_1.refine_3.intro.intro.refine_2
α : Type u_1
β : Type u_2
t : ℕ → Set α
n : ℕ
s : Set α
h : MeasurableSet s
S : Finset (Set α)
hS_subset : ↑S ⊆ memPartition t n
⊢ (⋃₀ ↑S)ᶜ = ⋃₀ (memPartition t n \ ↑S)
state_after: case refine_1.refine_3.intro.intro.refine_2.refine_1
α : Type u_1
β : Type u_2
t : ℕ → Set α
n : ℕ
s : Set α
h : MeasurableSet s
S : Finset (Set α)
hS_subset : ↑S ⊆ memPartition t n
⊢ Disjoint (⋃₀ (memPartition t n \ ↑S)) (⋃₀ ↑S)

case refine_1.refine_3.intro.intro.refine_2.refine_2
α : Type u_1
β : Type u_2
t : ℕ → Set α
n : ℕ
s : Set α
h : MeasurableSet s
S : Finset (Set α)
hS_subset : ↑S ⊆ memPartition t n
⊢ Codisjoint (⋃₀ (memPartition t n \ ↑S)) (⋃₀ ↑S)

tactic: refine Set.disjoint_sUnion_right.mpr fun u huS => ?_
state_before: case refine_1.refine_3.intro.intro.refine_2.refine_1
α : Type u_1
β : Type u_2
t : ℕ → Set α
n : ℕ
s : Set α
h : MeasurableSet s
S : Finset (Set α)
hS_subset : ↑S ⊆ memPartition t n
⊢ Disjoint (⋃₀ (memPartition t n \ ↑S)) (⋃₀ ↑S)
state_after: case refine_1.refine_3.intro.intro.refine_2.refine_1
α : Type u_1
β : Type u_2
t : ℕ → Set α
n : ℕ
s : Set α
h : MeasurableSet s
S : Finset (Set α)
hS_subset : ↑S ⊆ memPartition t n
u : Set α
huS : u ∈ ↑S
⊢ Disjoint (⋃₀ (memPartition t n \ ↑S)) u

tactic: refine Set.disjoint_sUnion_left.mpr fun v huV => ?_
state_before: case refine_1.refine_3.intro.intro.refine_2.refine_1
α : Type u_1
β : Type u_2
t : ℕ → Set α
n : ℕ
s : Set α
h : MeasurableSet s
S : Finset (Set α)
hS_subset : ↑S ⊆ memPartition t n
u : Set α
huS : u ∈ ↑S
⊢ Disjoint (⋃₀ (memPartition t n \ ↑S)) u
state_after: case refine_1.refine_3.intro.intro.refine_2.refine_1
α : Type u_1
β : Type u_2
t : ℕ → Set α
n : ℕ
s : Set α
h : MeasurableSet s
S : Finset (Set α)
hS_subset : ↑S ⊆ memPartition t n
u : Set α
huS : u ∈ ↑S
v : Set α
huV : v ∈ memPartition t n \ ↑S
⊢ Disjoint v u

tactic: refine disjoint_memPartition t n (mem_of_mem_diff huV) (hS_subset huS) ?_
state_before: case refine_1.refine_3.intro.intro.refine_2.refine_1
α : Type u_1
β : Type u_2
t : ℕ → Set α
n : ℕ
s : Set α
h : MeasurableSet s
S : Finset (Set α)
hS_subset : ↑S ⊆ memPartition t n
u : Set α
huS : u ∈ ↑S
v : Set α
huV : v ∈ memPartition t n \ ↑S
⊢ Disjoint v u
state_after: case refine_1.refine_3.intro.intro.refine_2.refine_1
α : Type u_1
β : Type u_2
t : ℕ → Set α
n : ℕ
s : Set α
h : MeasurableSet s
S : Finset (Set α)
hS_subset : ↑S ⊆ memPartition t n
u : Set α
huS : u ∈ ↑S
v : Set α
huV : v ∈ memPartition t n \ ↑S
⊢ v ≠ u

tactic: exact ne_of_mem_of_not_mem huS (not_mem_of_mem_diff huV) |>.symm
state_before: case refine_1.refine_3.intro.intro.refine_2.refine_1
α : Type u_1
β : Type u_2
t : ℕ → Set α
n : ℕ
s : Set α
h : MeasurableSet s
S : Finset (Set α)
hS_subset : ↑S ⊆ memPartition t n
u : Set α
huS : u ∈ ↑S
v : Set α
huV : v ∈ memPartition t n \ ↑S
⊢ v ≠ u
state_after: no goals

tactic: rw [codisjoint_iff]
state_before: case refine_1.refine_3.intro.intro.refine_2.refine_2
α : Type u_1
β : Type u_2
t : ℕ → Set α
n : ℕ
s : Set α
h : MeasurableSet s
S : Finset (Set α)
hS_subset : ↑S ⊆ memPartition t n
⊢ Codisjoint (⋃₀ (memPartition t n \ ↑S)) (⋃₀ ↑S)
state_after: case refine_1.refine_3.intro.intro.refine_2.refine_2
α : Type u_1
β : Type u_2
t : ℕ → Set α
n : ℕ
s : Set α
h : MeasurableSet s
S : Finset (Set α)
hS_subset : ↑S ⊆ memPartition t n
⊢ ⋃₀ (memPartition t n \ ↑S) ⊔ ⋃₀ ↑S = ⊤

tactic: simp only [sup_eq_union, top_eq_univ]
state_before: case refine_1.refine_3.intro.intro.refine_2.refine_2
α : Type u_1
β : Type u_2
t : ℕ → Set α
n : ℕ
s : Set α
h : MeasurableSet s
S : Finset (Set α)
hS_subset : ↑S ⊆ memPartition t n
⊢ ⋃₀ (memPartition t n \ ↑S) ⊔ ⋃₀ ↑S = ⊤
state_after: case refine_1.refine_3.intro.intro.refine_2.refine_2
α : Type u_1
β : Type u_2
t : ℕ → Set α
n : ℕ
s : Set α
h : MeasurableSet s
S : Finset (Set α)
hS_subset : ↑S ⊆ memPartition t n
⊢ ⋃₀ (memPartition t n \ ↑S) ∪ ⋃₀ ↑S = univ

tactic: rw [← sUnion_memPartition t n, union_comm, ← sUnion_union, union_diff_cancel hS_subset]
state_before: case refine_1.refine_3.intro.intro.refine_2.refine_2
α : Type u_1
β : Type u_2
t : ℕ → Set α
n : ℕ
s : Set α
h : MeasurableSet s
S : Finset (Set α)
hS_subset : ↑S ⊆ memPartition t n
⊢ ⋃₀ (memPartition t n \ ↑S) ∪ ⋃₀ ↑S = univ
state_after: no goals

tactic: intro f h
state_before: case refine_1.refine_4
α : Type u_1
β : Type u_2
t : ℕ → Set α
n : ℕ
s : Set α
h : MeasurableSet s
⊢ ∀ (f : ℕ → Set α),
    (∀ (n_1 : ℕ), (fun u => ∃ S, ↑S ⊆ memPartition t n ∧ u = ⋃₀ ↑S) (f n_1)) →
      (fun u => ∃ S, ↑S ⊆ memPartition t n ∧ u = ⋃₀ ↑S) (⋃ i, f i)
state_after: case refine_1.refine_4
α : Type u_1
β : Type u_2
t : ℕ → Set α
n : ℕ
s : Set α
h✝ : MeasurableSet s
f : ℕ → Set α
h : ∀ (n_1 : ℕ), (fun u => ∃ S, ↑S ⊆ memPartition t n ∧ u = ⋃₀ ↑S) (f n_1)
⊢ ∃ S, ↑S ⊆ memPartition t n ∧ ⋃ i, f i = ⋃₀ ↑S

tactic: choose S hS_subset hS_eq using h
state_before: case refine_1.refine_4
α : Type u_1
β : Type u_2
t : ℕ → Set α
n : ℕ
s : Set α
h✝ : MeasurableSet s
f : ℕ → Set α
h : ∀ (n_1 : ℕ), (fun u => ∃ S, ↑S ⊆ memPartition t n ∧ u = ⋃₀ ↑S) (f n_1)
⊢ ∃ S, ↑S ⊆ memPartition t n ∧ ⋃ i, f i = ⋃₀ ↑S
state_after: case refine_1.refine_4
α : Type u_1
β : Type u_2
t : ℕ → Set α
n : ℕ
s : Set α
h : MeasurableSet s
f : ℕ → Set α
S : ℕ → Finset (Set α)
hS_subset : ∀ (n_1 : ℕ), ↑(S n_1) ⊆ memPartition t n
hS_eq : ∀ (n : ℕ), f n = ⋃₀ ↑(S n)
⊢ ∃ S, ↑S ⊆ memPartition t n ∧ ⋃ i, f i = ⋃₀ ↑S

tactic: have : Fintype (⋃ n, (S n : Set (Set α))) := by
  refine (Finite.subset (finite_memPartition t n) ?_).fintype
  simp only [iUnion_subset_iff]
  exact hS_subset
state_before: case refine_1.refine_4
α : Type u_1
β : Type u_2
t : ℕ → Set α
n : ℕ
s : Set α
h : MeasurableSet s
f : ℕ → Set α
S : ℕ → Finset (Set α)
hS_subset : ∀ (n_1 : ℕ), ↑(S n_1) ⊆ memPartition t n
hS_eq : ∀ (n : ℕ), f n = ⋃₀ ↑(S n)
⊢ ∃ S, ↑S ⊆ memPartition t n ∧ ⋃ i, f i = ⋃₀ ↑S
state_after: case refine_1.refine_4
α : Type u_1
β : Type u_2
t : ℕ → Set α
n : ℕ
s : Set α
h : MeasurableSet s
f : ℕ → Set α
S : ℕ → Finset (Set α)
hS_subset : ∀ (n_1 : ℕ), ↑(S n_1) ⊆ memPartition t n
hS_eq : ∀ (n : ℕ), f n = ⋃₀ ↑(S n)
this : Fintype ↑(⋃ n, ↑(S n))
⊢ ∃ S, ↑S ⊆ memPartition t n ∧ ⋃ i, f i = ⋃₀ ↑S

tactic: refine ⟨(⋃ n, (S n : Set (Set α))).toFinset, ?_, ?_⟩
state_before: case refine_1.refine_4
α : Type u_1
β : Type u_2
t : ℕ → Set α
n : ℕ
s : Set α
h : MeasurableSet s
f : ℕ → Set α
S : ℕ → Finset (Set α)
hS_subset : ∀ (n_1 : ℕ), ↑(S n_1) ⊆ memPartition t n
hS_eq : ∀ (n : ℕ), f n = ⋃₀ ↑(S n)
this : Fintype ↑(⋃ n, ↑(S n))
⊢ ∃ S, ↑S ⊆ memPartition t n ∧ ⋃ i, f i = ⋃₀ ↑S
state_after: case refine_1.refine_4.refine_1
α : Type u_1
β : Type u_2
t : ℕ → Set α
n : ℕ
s : Set α
h : MeasurableSet s
f : ℕ → Set α
S : ℕ → Finset (Set α)
hS_subset : ∀ (n_1 : ℕ), ↑(S n_1) ⊆ memPartition t n
hS_eq : ∀ (n : ℕ), f n = ⋃₀ ↑(S n)
this : Fintype ↑(⋃ n, ↑(S n))
⊢ ↑(⋃ n, ↑(S n)).toFinset ⊆ memPartition t n

case refine_1.refine_4.refine_2
α : Type u_1
β : Type u_2
t : ℕ → Set α
n : ℕ
s : Set α
h : MeasurableSet s
f : ℕ → Set α
S : ℕ → Finset (Set α)
hS_subset : ∀ (n_1 : ℕ), ↑(S n_1) ⊆ memPartition t n
hS_eq : ∀ (n : ℕ), f n = ⋃₀ ↑(S n)
this : Fintype ↑(⋃ n, ↑(S n))
⊢ ⋃ i, f i = ⋃₀ ↑(⋃ n, ↑(S n)).toFinset

tactic: refine (Finite.subset (finite_memPartition t n) ?_).fintype
state_before: α : Type u_1
β : Type u_2
t : ℕ → Set α
n : ℕ
s : Set α
h : MeasurableSet s
f : ℕ → Set α
S : ℕ → Finset (Set α)
hS_subset : ∀ (n_1 : ℕ), ↑(S n_1) ⊆ memPartition t n
hS_eq : ∀ (n : ℕ), f n = ⋃₀ ↑(S n)
⊢ Fintype ↑(⋃ n, ↑(S n))
state_after: α : Type u_1
β : Type u_2
t : ℕ → Set α
n : ℕ
s : Set α
h : MeasurableSet s
f : ℕ → Set α
S : ℕ → Finset (Set α)
hS_subset : ∀ (n_1 : ℕ), ↑(S n_1) ⊆ memPartition t n
hS_eq : ∀ (n : ℕ), f n = ⋃₀ ↑(S n)
⊢ ⋃ n, ↑(S n) ⊆ memPartition t n

tactic: simp only [iUnion_subset_iff]
state_before: α : Type u_1
β : Type u_2
t : ℕ → Set α
n : ℕ
s : Set α
h : MeasurableSet s
f : ℕ → Set α
S : ℕ → Finset (Set α)
hS_subset : ∀ (n_1 : ℕ), ↑(S n_1) ⊆ memPartition t n
hS_eq : ∀ (n : ℕ), f n = ⋃₀ ↑(S n)
⊢ ⋃ n, ↑(S n) ⊆ memPartition t n
state_after: α : Type u_1
β : Type u_2
t : ℕ → Set α
n : ℕ
s : Set α
h : MeasurableSet s
f : ℕ → Set α
S : ℕ → Finset (Set α)
hS_subset : ∀ (n_1 : ℕ), ↑(S n_1) ⊆ memPartition t n
hS_eq : ∀ (n : ℕ), f n = ⋃₀ ↑(S n)
⊢ ∀ (i : ℕ), ↑(S i) ⊆ memPartition t n

tactic: exact hS_subset
state_before: α : Type u_1
β : Type u_2
t : ℕ → Set α
n : ℕ
s : Set α
h : MeasurableSet s
f : ℕ → Set α
S : ℕ → Finset (Set α)
hS_subset : ∀ (n_1 : ℕ), ↑(S n_1) ⊆ memPartition t n
hS_eq : ∀ (n : ℕ), f n = ⋃₀ ↑(S n)
⊢ ∀ (i : ℕ), ↑(S i) ⊆ memPartition t n
state_after: no goals

tactic: simp only [coe_toFinset, iUnion_subset_iff]
state_before: case refine_1.refine_4.refine_1
α : Type u_1
β : Type u_2
t : ℕ → Set α
n : ℕ
s : Set α
h : MeasurableSet s
f : ℕ → Set α
S : ℕ → Finset (Set α)
hS_subset : ∀ (n_1 : ℕ), ↑(S n_1) ⊆ memPartition t n
hS_eq : ∀ (n : ℕ), f n = ⋃₀ ↑(S n)
this : Fintype ↑(⋃ n, ↑(S n))
⊢ ↑(⋃ n, ↑(S n)).toFinset ⊆ memPartition t n
state_after: case refine_1.refine_4.refine_1
α : Type u_1
β : Type u_2
t : ℕ → Set α
n : ℕ
s : Set α
h : MeasurableSet s
f : ℕ → Set α
S : ℕ → Finset (Set α)
hS_subset : ∀ (n_1 : ℕ), ↑(S n_1) ⊆ memPartition t n
hS_eq : ∀ (n : ℕ), f n = ⋃₀ ↑(S n)
this : Fintype ↑(⋃ n, ↑(S n))
⊢ ∀ (i : ℕ), ↑(S i) ⊆ memPartition t n

tactic: exact hS_subset
state_before: case refine_1.refine_4.refine_1
α : Type u_1
β : Type u_2
t : ℕ → Set α
n : ℕ
s : Set α
h : MeasurableSet s
f : ℕ → Set α
S : ℕ → Finset (Set α)
hS_subset : ∀ (n_1 : ℕ), ↑(S n_1) ⊆ memPartition t n
hS_eq : ∀ (n : ℕ), f n = ⋃₀ ↑(S n)
this : Fintype ↑(⋃ n, ↑(S n))
⊢ ∀ (i : ℕ), ↑(S i) ⊆ memPartition t n
state_after: no goals

tactic: simp only [coe_toFinset, sUnion_iUnion, hS_eq]
state_before: case refine_1.refine_4.refine_2
α : Type u_1
β : Type u_2
t : ℕ → Set α
n : ℕ
s : Set α
h : MeasurableSet s
f : ℕ → Set α
S : ℕ → Finset (Set α)
hS_subset : ∀ (n_1 : ℕ), ↑(S n_1) ⊆ memPartition t n
hS_eq : ∀ (n : ℕ), f n = ⋃₀ ↑(S n)
this : Fintype ↑(⋃ n, ↑(S n))
⊢ ⋃ i, f i = ⋃₀ ↑(⋃ n, ↑(S n)).toFinset
state_after: no goals

tactic: rw [hS_eq, sUnion_eq_biUnion]
state_before: case refine_2
α : Type u_1
β : Type u_2
t : ℕ → Set α
n : ℕ
s : Set α
x✝ : ∃ S, ↑S ⊆ memPartition t n ∧ s = ⋃₀ ↑S
S : Finset (Set α)
hS_subset : ↑S ⊆ memPartition t n
hS_eq : s = ⋃₀ ↑S
⊢ MeasurableSet s
state_after: case refine_2
α : Type u_1
β : Type u_2
t : ℕ → Set α
n : ℕ
s : Set α
x✝ : ∃ S, ↑S ⊆ memPartition t n ∧ s = ⋃₀ ↑S
S : Finset (Set α)
hS_subset : ↑S ⊆ memPartition t n
hS_eq : s = ⋃₀ ↑S
⊢ MeasurableSet (⋃ i ∈ ↑S, i)

tactic: refine MeasurableSet.biUnion ?_ (fun t ht ↦ ?_)
state_before: case refine_2
α : Type u_1
β : Type u_2
t : ℕ → Set α
n : ℕ
s : Set α
x✝ : ∃ S, ↑S ⊆ memPartition t n ∧ s = ⋃₀ ↑S
S : Finset (Set α)
hS_subset : ↑S ⊆ memPartition t n
hS_eq : s = ⋃₀ ↑S
⊢ MeasurableSet (⋃ i ∈ ↑S, i)
state_after: case refine_2.refine_1
α : Type u_1
β : Type u_2
t : ℕ → Set α
n : ℕ
s : Set α
x✝ : ∃ S, ↑S ⊆ memPartition t n ∧ s = ⋃₀ ↑S
S : Finset (Set α)
hS_subset : ↑S ⊆ memPartition t n
hS_eq : s = ⋃₀ ↑S
⊢ (↑S).Countable

case refine_2.refine_2
α : Type u_1
β : Type u_2
t✝ : ℕ → Set α
n : ℕ
s : Set α
x✝ : ∃ S, ↑S ⊆ memPartition t✝ n ∧ s = ⋃₀ ↑S
S : Finset (Set α)
hS_subset : ↑S ⊆ memPartition t✝ n
hS_eq : s = ⋃₀ ↑S
t : Set α
ht : t ∈ ↑S
⊢ MeasurableSet t

tactic: exact S.countable_toSet
state_before: case refine_2.refine_1
α : Type u_1
β : Type u_2
t : ℕ → Set α
n : ℕ
s : Set α
x✝ : ∃ S, ↑S ⊆ memPartition t n ∧ s = ⋃₀ ↑S
S : Finset (Set α)
hS_subset : ↑S ⊆ memPartition t n
hS_eq : s = ⋃₀ ↑S
⊢ (↑S).Countable
state_after: no goals

tactic: exact measurableSet_generateFrom (hS_subset ht)
state_before: case refine_2.refine_2
α : Type u_1
β : Type u_2
t✝ : ℕ → Set α
n : ℕ
s : Set α
x✝ : ∃ S, ↑S ⊆ memPartition t✝ n ∧ s = ⋃₀ ↑S
S : Finset (Set α)
hS_subset : ↑S ⊆ memPartition t✝ n
hS_eq : s = ⋃₀ ↑S
t : Set α
ht : t ∈ ↑S
⊢ MeasurableSet t
state_after: no goals