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

tactic: refine le_antisymm (generateFrom_le fun u hu ↦ ?_) (generateFrom_le fun u hu ↦ ?_)
state_before: α : Type u_1
β : Type u_2
t : ℕ → Set α
⊢ generateFrom (⋃ n, memPartition t n) = generateFrom (range t)
state_after: case refine_1
α : Type u_1
β : Type u_2
t : ℕ → Set α
u : Set α
hu : u ∈ ⋃ n, memPartition t n
⊢ MeasurableSet u

case refine_2
α : Type u_1
β : Type u_2
t : ℕ → Set α
u : Set α
hu : u ∈ range t
⊢ MeasurableSet u

tactic: simp only [mem_iUnion] at hu
state_before: case refine_1
α : Type u_1
β : Type u_2
t : ℕ → Set α
u : Set α
hu : u ∈ ⋃ n, memPartition t n
⊢ MeasurableSet u
state_after: case refine_1
α : Type u_1
β : Type u_2
t : ℕ → Set α
u : Set α
hu : ∃ i, u ∈ memPartition t i
⊢ MeasurableSet u

tactic: obtain ⟨n, hun⟩ := hu
state_before: case refine_1
α : Type u_1
β : Type u_2
t : ℕ → Set α
u : Set α
hu : ∃ i, u ∈ memPartition t i
⊢ MeasurableSet u
state_after: case refine_1.intro
α : Type u_1
β : Type u_2
t : ℕ → Set α
u : Set α
n : ℕ
hun : u ∈ memPartition t n
⊢ MeasurableSet u

tactic: simp only [Nat.zero_eq, memPartition_zero, mem_insert_iff, mem_singleton_iff] at hun
state_before: case refine_1.intro.zero
α : Type u_1
β : Type u_2
t : ℕ → Set α
u : Set α
hun : u ∈ memPartition t 0
⊢ MeasurableSet u
state_after: case refine_1.intro.zero
α : Type u_1
β : Type u_2
t : ℕ → Set α
u : Set α
hun : u = univ
⊢ MeasurableSet u

tactic: rw [hun]
state_before: case refine_1.intro.zero
α : Type u_1
β : Type u_2
t : ℕ → Set α
u : Set α
hun : u = univ
⊢ MeasurableSet u
state_after: case refine_1.intro.zero
α : Type u_1
β : Type u_2
t : ℕ → Set α
u : Set α
hun : u = univ
⊢ MeasurableSet univ

tactic: exact MeasurableSet.univ
state_before: case refine_1.intro.zero
α : Type u_1
β : Type u_2
t : ℕ → Set α
u : Set α
hun : u = univ
⊢ MeasurableSet univ
state_after: no goals

tactic: simp only [memPartition_succ, mem_setOf_eq] at hun
state_before: case refine_1.intro.succ
α : Type u_1
β : Type u_2
t : ℕ → Set α
n : ℕ
ih : ∀ u ∈ memPartition t n, MeasurableSet u
u : Set α
hun : u ∈ memPartition t (n + 1)
⊢ MeasurableSet u
state_after: case refine_1.intro.succ
α : Type u_1
β : Type u_2
t : ℕ → Set α
n : ℕ
ih : ∀ u ∈ memPartition t n, MeasurableSet u
u : Set α
hun : ∃ u_1 ∈ memPartition t n, u = u_1 ∩ t n ∨ u = u_1 \ t n
⊢ MeasurableSet u

tactic: obtain ⟨v, hv, huv⟩ := hun
state_before: case refine_1.intro.succ
α : Type u_1
β : Type u_2
t : ℕ → Set α
n : ℕ
ih : ∀ u ∈ memPartition t n, MeasurableSet u
u : Set α
hun : ∃ u_1 ∈ memPartition t n, u = u_1 ∩ t n ∨ u = u_1 \ t n
⊢ MeasurableSet u
state_after: case refine_1.intro.succ.intro.intro
α : Type u_1
β : Type u_2
t : ℕ → Set α
n : ℕ
ih : ∀ u ∈ memPartition t n, MeasurableSet u
u v : Set α
hv : v ∈ memPartition t n
huv : u = v ∩ t n ∨ u = v \ t n
⊢ MeasurableSet u

tactic: rcases huv with rfl | rfl
state_before: case refine_1.intro.succ.intro.intro
α : Type u_1
β : Type u_2
t : ℕ → Set α
n : ℕ
ih : ∀ u ∈ memPartition t n, MeasurableSet u
u v : Set α
hv : v ∈ memPartition t n
huv : u = v ∩ t n ∨ u = v \ t n
⊢ MeasurableSet u
state_after: case refine_1.intro.succ.intro.intro.inl
α : Type u_1
β : Type u_2
t : ℕ → Set α
n : ℕ
ih : ∀ u ∈ memPartition t n, MeasurableSet u
v : Set α
hv : v ∈ memPartition t n
⊢ MeasurableSet (v ∩ t n)

case refine_1.intro.succ.intro.intro.inr
α : Type u_1
β : Type u_2
t : ℕ → Set α
n : ℕ
ih : ∀ u ∈ memPartition t n, MeasurableSet u
v : Set α
hv : v ∈ memPartition t n
⊢ MeasurableSet (v \ t n)

tactic: exact (ih v hv).inter (measurableSet_generateFrom ⟨n, rfl⟩)
state_before: case refine_1.intro.succ.intro.intro.inl
α : Type u_1
β : Type u_2
t : ℕ → Set α
n : ℕ
ih : ∀ u ∈ memPartition t n, MeasurableSet u
v : Set α
hv : v ∈ memPartition t n
⊢ MeasurableSet (v ∩ t n)
state_after: no goals

tactic: exact (ih v hv).diff (measurableSet_generateFrom ⟨n, rfl⟩)
state_before: case refine_1.intro.succ.intro.intro.inr
α : Type u_1
β : Type u_2
t : ℕ → Set α
n : ℕ
ih : ∀ u ∈ memPartition t n, MeasurableSet u
v : Set α
hv : v ∈ memPartition t n
⊢ MeasurableSet (v \ t n)
state_after: no goals

tactic: simp only [iUnion_singleton_eq_range, mem_range] at hu
state_before: case refine_2
α : Type u_1
β : Type u_2
t : ℕ → Set α
u : Set α
hu : u ∈ range t
⊢ MeasurableSet u
state_after: case refine_2
α : Type u_1
β : Type u_2
t : ℕ → Set α
u : Set α
hu : ∃ y, t y = u
⊢ MeasurableSet u

tactic: obtain ⟨n, rfl⟩ := hu
state_before: case refine_2
α : Type u_1
β : Type u_2
t : ℕ → Set α
u : Set α
hu : ∃ y, t y = u
⊢ MeasurableSet u
state_after: case refine_2.intro
α : Type u_1
β : Type u_2
t : ℕ → Set α
n : ℕ
⊢ MeasurableSet (t n)

tactic: exact generateFrom_mono (subset_iUnion _ _) _ (measurableSet_generateFrom_memPartition t n)
state_before: case refine_2.intro
α : Type u_1
β : Type u_2
t : ℕ → Set α
n : ℕ
⊢ MeasurableSet (t n)
state_after: no goals