Erasing an element from a finite set #
Main declarations #
Finset.erase
: For anya : α
,erase s a
returnss
with the elementa
removed.
Tags #
finite sets, finset
erase #
@[simp]
theorem
Finset.erase_val
{α : Type u_1}
[DecidableEq α]
(s : Finset α)
(a : α)
:
(s.erase a).val = s.val.erase a
@[simp]
theorem
Finset.eq_of_mem_of_not_mem_erase
{α : Type u_1}
[DecidableEq α]
{s : Finset α}
{a b : α}
(hs : b ∈ s)
(hsa : b ∉ s.erase a)
:
b = a
An element of s
that is not an element of erase s a
must bea
.
@[simp]
theorem
Finset.erase_eq_of_not_mem
{α : Type u_1}
[DecidableEq α]
{a : α}
{s : Finset α}
(h : a ∉ s)
:
s.erase a = s
@[simp]
theorem
Finset.erase_subset_erase
{α : Type u_1}
[DecidableEq α]
(a : α)
{s t : Finset α}
(h : s ⊆ t)
:
s.erase a ⊆ t.erase a
@[simp]
theorem
Finset.erase_idem
{α : Type u_1}
[DecidableEq α]
{a : α}
{s : Finset α}
:
(s.erase a).erase a = s.erase a
theorem
Finset.erase_right_comm
{α : Type u_1}
[DecidableEq α]
{a b : α}
{s : Finset α}
:
(s.erase a).erase b = (s.erase b).erase a