Skip to content

Commit

Permalink
feat(data/finset): erase is empty iff (#11838)
Browse files Browse the repository at this point in the history
  • Loading branch information
b-mehta committed Feb 5, 2022
1 parent 31f5688 commit 612ca40
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/data/finset/basic.lean
Expand Up @@ -1272,6 +1272,9 @@ lemma union_eq_sdiff_union_sdiff_union_inter (s t : finset α) :
s ∪ t = (s \ t) ∪ (t \ s) ∪ (s ∩ t) :=
sup_eq_sdiff_sup_sdiff_sup_inf

lemma erase_eq_empty_iff (s : finset α) (a : α) : s.erase a = ∅ ↔ s = ∅ ∨ s = {a} :=
by rw [←sdiff_singleton_eq_erase, sdiff_eq_empty_iff_subset, subset_singleton_iff]

end decidable_eq

/-! ### attach -/
Expand Down

0 comments on commit 612ca40

Please sign in to comment.