-- Mathlib/MeasureTheory/MeasurableSpace/Basic.lean
lemma MeasurableSet.measurableAtom_of_countable [Countable β] (x : β) :
    MeasurableSet (measurableAtom x)

Proof state:
case h₁
β : Type u_2
inst✝¹ : MeasurableSpace β
inst✝ : Countable β
x : β
s : β → Set β
hs : ∀ y ∉ measurableAtom x, x ∈ s y ∧ MeasurableSet (s y) ∧ y ∉ s y
z : β
hz : z ∈ measurableAtom x
⊢ z ∈ ⋂ y ∈ (measurableAtom x)ᶜ, s y

Tactic:
simp only [mem_iInter, mem_compl_iff]

Result:
case h₁
β : Type u_2
inst✝¹ : MeasurableSpace β
inst✝ : Countable β
x : β
s : β → Set β
hs : ∀ y ∉ measurableAtom x, x ∈ s y ∧ MeasurableSet (s y) ∧ y ∉ s y
z : β
hz : z ∈ measurableAtom x
⊢ ∀ i ∉ measurableAtom x, z ∈ s i

Proof state:
β : Type u_2
inst✝¹ : MeasurableSpace β
inst✝ : Countable β
x : β
s : β → Set β
hs : ∀ y ∉ measurableAtom x, x ∈ s y ∧ MeasurableSet (s y) ∧ y ∉ s y
⊢ measurableAtom x = ⋂ y ∈ (measurableAtom x)ᶜ, s y

Tactic:
apply Subset.antisymm

Result:
case h₁
β : Type u_2
inst✝¹ : MeasurableSpace β
inst✝ : Countable β
x : β
s : β → Set β
hs : ∀ y ∉ measurableAtom x, x ∈ s y ∧ MeasurableSet (s y) ∧ y ∉ s y
⊢ measurableAtom x ⊆ ⋂ y ∈ (measurableAtom x)ᶜ, s y

case h₂
β : Type u_2
inst✝¹ : MeasurableSpace β
inst✝ : Countable β
x : β
s : β → Set β
hs : ∀ y ∉ measurableAtom x, x ∈ s y ∧ MeasurableSet (s y) ∧ y ∉ s y
⊢ ⋂ y ∈ (measurableAtom x)ᶜ, s y ⊆ measurableAtom x

Proof state:
case h₁
β : Type u_2
inst✝¹ : MeasurableSpace β
inst✝ : Countable β
x : β
s : β → Set β
hs : ∀ y ∉ measurableAtom x, x ∈ s y ∧ MeasurableSet (s y) ∧ y ∉ s y
z : β
hz : z ∈ measurableAtom x
⊢ ∀ i ∉ measurableAtom x, z ∈ s i

Tactic:
intro i hi

Result:
case h₁
β : Type u_2
inst✝¹ : MeasurableSpace β
inst✝ : Countable β
x : β
s : β → Set β
hs : ∀ y ∉ measurableAtom x, x ∈ s y ∧ MeasurableSet (s y) ∧ y ∉ s y
z : β
hz : z ∈ measurableAtom x
i : β
hi : i ∉ measurableAtom x
⊢ z ∈ s i

Proof state:
β : Type u_2
inst✝¹ : MeasurableSpace β
inst✝ : Countable β
x : β
⊢ MeasurableSet (measurableAtom x)

Tactic:
have : ∀ (y : β), y ∉ measurableAtom x → ∃ s, x ∈ s ∧ MeasurableSet s ∧ y ∉ s :=
  fun y hy ↦ by simpa [measurableAtom] using hy

Result:
β : Type u_2
inst✝¹ : MeasurableSpace β
inst✝ : Countable β
x : β
this : ∀ y ∉ measurableAtom x, ∃ s, x ∈ s ∧ MeasurableSet s ∧ y ∉ s
⊢ MeasurableSet (measurableAtom x)

Proof state:
case h₂
β : Type u_2
inst✝¹ : MeasurableSpace β
inst✝ : Countable β
x : β
s : β → Set β
hs : ∀ y ∉ measurableAtom x, x ∈ s y ∧ MeasurableSet (s y) ∧ y ∉ s y
⊢ (measurableAtom x)ᶜ ⊆ (⋂ y ∈ (measurableAtom x)ᶜ, s y)ᶜ

Tactic:
intro z hz

Result:
case h₂
β : Type u_2
inst✝¹ : MeasurableSpace β
inst✝ : Countable β
x : β
s : β → Set β
hs : ∀ y ∉ measurableAtom x, x ∈ s y ∧ MeasurableSet (s y) ∧ y ∉ s y
z : β
hz : z ∈ (measurableAtom x)ᶜ
⊢ z ∈ (⋂ y ∈ (measurableAtom x)ᶜ, s y)ᶜ

Proof state:
case h₂
β : Type u_2
inst✝¹ : MeasurableSpace β
inst✝ : Countable β
x : β
s : β → Set β
hs : ∀ y ∉ measurableAtom x, x ∈ s y ∧ MeasurableSet (s y) ∧ y ∉ s y
z : β
hz : z ∈ (measurableAtom x)ᶜ
⊢ ∃ i ∉ measurableAtom x, z ∉ s i

Tactic:
exact ⟨z, hz, (hs z hz).2.2⟩

Result:
no goals

Proof state:
case h₂
β : Type u_2
inst✝¹ : MeasurableSpace β
inst✝ : Countable β
x : β
s : β → Set β
hs : ∀ y ∉ measurableAtom x, x ∈ s y ∧ MeasurableSet (s y) ∧ y ∉ s y
z : β
hz : z ∈ (measurableAtom x)ᶜ
⊢ z ∈ (⋂ y ∈ (measurableAtom x)ᶜ, s y)ᶜ

Tactic:
simp only [compl_iInter, mem_iUnion, mem_compl_iff, exists_prop]

Result:
case h₂
β : Type u_2
inst✝¹ : MeasurableSpace β
inst✝ : Countable β
x : β
s : β → Set β
hs : ∀ y ∉ measurableAtom x, x ∈ s y ∧ MeasurableSet (s y) ∧ y ∉ s y
z : β
hz : z ∈ (measurableAtom x)ᶜ
⊢ ∃ i ∉ measurableAtom x, z ∉ s i

Proof state:
β : Type u_2
inst✝¹ : MeasurableSpace β
inst✝ : Countable β
x y : β
hy : y ∉ measurableAtom x
⊢ ∃ s, x ∈ s ∧ MeasurableSet s ∧ y ∉ s

Tactic:
simpa [measurableAtom] using hy

Result:
no goals

Proof state:
β : Type u_2
inst✝¹ : MeasurableSpace β
inst✝ : Countable β
x : β
s : β → Set β
hs : ∀ y ∉ measurableAtom x, x ∈ s y ∧ MeasurableSet (s y) ∧ y ∉ s y
this : measurableAtom x = ⋂ y ∈ (measurableAtom x)ᶜ, s y
⊢ MeasurableSet (⋂ y ∈ (measurableAtom x)ᶜ, s y)

Tactic:
exact MeasurableSet.biInter (to_countable (measurableAtom x)ᶜ) (fun i hi ↦ (hs i hi).2.1)

Result:
no goals

Proof state:
β : Type u_2
inst✝¹ : MeasurableSpace β
inst✝ : Countable β
x : β
s : β → Set β
hs : ∀ y ∉ measurableAtom x, x ∈ s y ∧ MeasurableSet (s y) ∧ y ∉ s y
this : measurableAtom x = ⋂ y ∈ (measurableAtom x)ᶜ, s y
⊢ MeasurableSet (measurableAtom x)

Tactic:
rw [this]

Result:
β : Type u_2
inst✝¹ : MeasurableSpace β
inst✝ : Countable β
x : β
s : β → Set β
hs : ∀ y ∉ measurableAtom x, x ∈ s y ∧ MeasurableSet (s y) ∧ y ∉ s y
this : measurableAtom x = ⋂ y ∈ (measurableAtom x)ᶜ, s y
⊢ MeasurableSet (⋂ y ∈ (measurableAtom x)ᶜ, s y)

Proof state:
β : Type u_2
inst✝¹ : MeasurableSpace β
inst✝ : Countable β
x : β
this : ∀ y ∉ measurableAtom x, ∃ s, x ∈ s ∧ MeasurableSet s ∧ y ∉ s
⊢ MeasurableSet (measurableAtom x)

Tactic:
choose! s hs using this

Result:
β : Type u_2
inst✝¹ : MeasurableSpace β
inst✝ : Countable β
x : β
s : β → Set β
hs : ∀ y ∉ measurableAtom x, x ∈ s y ∧ MeasurableSet (s y) ∧ y ∉ s y
⊢ MeasurableSet (measurableAtom x)

Proof state:
case h₁
β : Type u_2
inst✝¹ : MeasurableSpace β
inst✝ : Countable β
x : β
s : β → Set β
hs : ∀ y ∉ measurableAtom x, x ∈ s y ∧ MeasurableSet (s y) ∧ y ∉ s y
z : β
hz : z ∈ measurableAtom x
i : β
hi : i ∉ measurableAtom x
⊢ z ∈ s i

Tactic:
exact mem_of_mem_measurableAtom hz (hs i hi).2.1 (hs i hi).1

Result:
no goals

Proof state:
case h₂
β : Type u_2
inst✝¹ : MeasurableSpace β
inst✝ : Countable β
x : β
s : β → Set β
hs : ∀ y ∉ measurableAtom x, x ∈ s y ∧ MeasurableSet (s y) ∧ y ∉ s y
⊢ ⋂ y ∈ (measurableAtom x)ᶜ, s y ⊆ measurableAtom x

Tactic:
apply compl_subset_compl.1

Result:
case h₂
β : Type u_2
inst✝¹ : MeasurableSpace β
inst✝ : Countable β
x : β
s : β → Set β
hs : ∀ y ∉ measurableAtom x, x ∈ s y ∧ MeasurableSet (s y) ∧ y ∉ s y
⊢ (measurableAtom x)ᶜ ⊆ (⋂ y ∈ (measurableAtom x)ᶜ, s y)ᶜ

Proof state:
case h₁
β : Type u_2
inst✝¹ : MeasurableSpace β
inst✝ : Countable β
x : β
s : β → Set β
hs : ∀ y ∉ measurableAtom x, x ∈ s y ∧ MeasurableSet (s y) ∧ y ∉ s y
⊢ measurableAtom x ⊆ ⋂ y ∈ (measurableAtom x)ᶜ, s y

Tactic:
intro z hz

Result:
case h₁
β : Type u_2
inst✝¹ : MeasurableSpace β
inst✝ : Countable β
x : β
s : β → Set β
hs : ∀ y ∉ measurableAtom x, x ∈ s y ∧ MeasurableSet (s y) ∧ y ∉ s y
z : β
hz : z ∈ measurableAtom x
⊢ z ∈ ⋂ y ∈ (measurableAtom x)ᶜ, s y