Theorem: Finset.memberSubfamily_union_nonMemberSubfamily
File: Mathlib/Combinatorics/SetFamily/Compression/Down.lean

tactic: ext s
state_before: α : Type u_1
inst✝ : DecidableEq α
𝒜✝ ℬ : Finset (Finset α)
s : Finset α
a✝ a : α
𝒜 : Finset (Finset α)
⊢ memberSubfamily a 𝒜 ∪ nonMemberSubfamily a 𝒜 = image (fun s => erase s a) 𝒜

tactic: simp only [mem_union, mem_memberSubfamily, mem_nonMemberSubfamily, mem_image, exists_prop]
state_before: case a
α : Type u_1
inst✝ : DecidableEq α
𝒜✝ ℬ : Finset (Finset α)
s✝ : Finset α
a✝ a : α
𝒜 : Finset (Finset α)
s : Finset α
⊢ s ∈ memberSubfamily a 𝒜 ∪ nonMemberSubfamily a 𝒜 ↔ s ∈ image (fun s => erase s a) 𝒜

tactic: constructor
state_before: case a
α : Type u_1
inst✝ : DecidableEq α
𝒜✝ ℬ : Finset (Finset α)
s✝ : Finset α
a✝ a : α
𝒜 : Finset (Finset α)
s : Finset α
⊢ insert a s ∈ 𝒜 ∧ ¬a ∈ s ∨ s ∈ 𝒜 ∧ ¬a ∈ s ↔ ∃ a_1, a_1 ∈ 𝒜 ∧ erase a_1 a = s

tactic: rintro (h | h)
state_before: case a.mp
α : Type u_1
inst✝ : DecidableEq α
𝒜✝ ℬ : Finset (Finset α)
s✝ : Finset α
a✝ a : α
𝒜 : Finset (Finset α)
s : Finset α
⊢ insert a s ∈ 𝒜 ∧ ¬a ∈ s ∨ s ∈ 𝒜 ∧ ¬a ∈ s → ∃ a_2, a_2 ∈ 𝒜 ∧ erase a_2 a = s

tactic: exact ⟨_, h.1, erase_insert h.2⟩
state_before: case a.mp.inl
α : Type u_1
inst✝ : DecidableEq α
𝒜✝ ℬ : Finset (Finset α)
s✝ : Finset α
a✝ a : α
𝒜 : Finset (Finset α)
s : Finset α
h : insert a s ∈ 𝒜 ∧ ¬a ∈ s
⊢ ∃ a_1, a_1 ∈ 𝒜 ∧ erase a_1 a = s

tactic: exact ⟨_, h.1, erase_eq_of_not_mem h.2⟩
state_before: case a.mp.inr
α : Type u_1
inst✝ : DecidableEq α
𝒜✝ ℬ : Finset (Finset α)
s✝ : Finset α
a✝ a : α
𝒜 : Finset (Finset α)
s : Finset α
h : s ∈ 𝒜 ∧ ¬a ∈ s
⊢ ∃ a_1, a_1 ∈ 𝒜 ∧ erase a_1 a = s

tactic: rintro ⟨s, hs, rfl⟩
state_before: case a.mpr
α : Type u_1
inst✝ : DecidableEq α
𝒜✝ ℬ : Finset (Finset α)
s✝ : Finset α
a✝ a : α
𝒜 : Finset (Finset α)
s : Finset α
⊢ (∃ a_1, a_1 ∈ 𝒜 ∧ erase a_1 a = s) → insert a s ∈ 𝒜 ∧ ¬a ∈ s ∨ s ∈ 𝒜 ∧ ¬a ∈ s

tactic: by_cases ha : a ∈ s
state_before: case a.mpr.intro.intro
α : Type u_1
inst✝ : DecidableEq α
𝒜✝ ℬ : Finset (Finset α)
s✝ : Finset α
a✝ a : α
𝒜 : Finset (Finset α)
s : Finset α
hs : s ∈ 𝒜
⊢ insert a (erase s a) ∈ 𝒜 ∧ ¬a ∈ erase s a ∨ erase s a ∈ 𝒜 ∧ ¬a ∈ erase s a

tactic: exact Or.inl ⟨by rwa [insert_erase ha], not_mem_erase _ _⟩
state_before: case pos
α : Type u_1
inst✝ : DecidableEq α
𝒜✝ ℬ : Finset (Finset α)
s✝ : Finset α
a✝ a : α
𝒜 : Finset (Finset α)
s : Finset α
hs : s ∈ 𝒜
ha : a ∈ s
⊢ insert a (erase s a) ∈ 𝒜 ∧ ¬a ∈ erase s a ∨ erase s a ∈ 𝒜 ∧ ¬a ∈ erase s a

tactic: rwa [insert_erase ha]
state_before: α : Type u_1
inst✝ : DecidableEq α
𝒜✝ ℬ : Finset (Finset α)
s✝ : Finset α
a✝ a : α
𝒜 : Finset (Finset α)
s : Finset α
hs : s ∈ 𝒜
ha : a ∈ s
⊢ insert a (erase s a) ∈ 𝒜

tactic: exact Or.inr ⟨by rwa [erase_eq_of_not_mem ha], not_mem_erase _ _⟩
state_before: case neg
α : Type u_1
inst✝ : DecidableEq α
𝒜✝ ℬ : Finset (Finset α)
s✝ : Finset α
a✝ a : α
𝒜 : Finset (Finset α)
s : Finset α
hs : s ∈ 𝒜
ha : ¬a ∈ s
⊢ insert a (erase s a) ∈ 𝒜 ∧ ¬a ∈ erase s a ∨ erase s a ∈ 𝒜 ∧ ¬a ∈ erase s a

tactic: rwa [erase_eq_of_not_mem ha]
state_before: α : Type u_1
inst✝ : DecidableEq α
𝒜✝ ℬ : Finset (Finset α)
s✝ : Finset α
a✝ a : α
𝒜 : Finset (Finset α)
s : Finset α
hs : s ∈ 𝒜
ha : ¬a ∈ s
⊢ erase s a ∈ 𝒜