Difference of finite sets #
Main declarations #
Finset.instSDiffFinset
: Defines the set differences \ t
for finsetss
andt
.Finset.instGeneralizedBooleanAlgebra
: Finsets almost have a boolean algebra structure
Tags #
finite sets, finset
sdiff #
s \ t
is the set consisting of the elements of s
that are not in t
.
@[simp]
@[simp]
@[simp]
Equations
- Finset.instGeneralizedBooleanAlgebra = GeneralizedBooleanAlgebra.mk ⋯ ⋯
theorem
Finset.not_mem_sdiff_of_mem_right
{α : Type u_1}
[DecidableEq α]
{s t : Finset α}
{a : α}
(h : a ∈ t)
:
a ∉ s \ t
theorem
Finset.not_mem_sdiff_of_not_mem_left
{α : Type u_1}
[DecidableEq α]
{s t : Finset α}
{a : α}
(h : a ∉ s)
:
a ∉ s \ t
theorem
Finset.sdiff_union_of_subset
{α : Type u_1}
[DecidableEq α]
{s₁ s₂ : Finset α}
(h : s₁ ⊆ s₂)
:
@[deprecated Finset.inter_sdiff_assoc]
@[simp]
@[simp]
@[simp]
theorem
Finset.sdiff_subset_sdiff
{α : Type u_1}
[DecidableEq α]
{s t u v : Finset α}
(hst : s ⊆ t)
(hvu : v ⊆ u)
:
@[simp]
@[simp]
@[simp]
theorem
Finset.union_sdiff_cancel_left
{α : Type u_1}
[DecidableEq α]
{s t : Finset α}
(h : Disjoint s t)
:
theorem
Finset.union_sdiff_cancel_right
{α : Type u_1}
[DecidableEq α]
{s t : Finset α}
(h : Disjoint s t)
:
@[simp]
@[simp]
theorem
Finset.insert_sdiff_cancel
{α : Type u_1}
[DecidableEq α]
{s : Finset α}
{a : α}
(ha : a ∉ s)
:
theorem
Finset.insert_sdiff_insert'
{α : Type u_1}
[DecidableEq α]
{s : Finset α}
{a b : α}
(hab : a ≠ b)
(ha : a ∉ s)
:
theorem
Finset.cons_sdiff_cons
{α : Type u_1}
[DecidableEq α]
{s : Finset α}
{a b : α}
(hab : a ≠ b)
(ha : a ∉ s)
(hb : b ∉ s)
:
Finset.cons a s ha \ Finset.cons b s hb = {a}
theorem
Finset.sdiff_insert_of_not_mem
{α : Type u_1}
[DecidableEq α]
{s : Finset α}
{x : α}
(h : x ∉ s)
(t : Finset α)
:
@[simp]
theorem
Finset.sdiff_ssubset
{α : Type u_1}
[DecidableEq α]
{s t : Finset α}
(h : t ⊆ s)
(ht : t.Nonempty)
:
theorem
Finset.Nontrivial.sdiff_singleton_nonempty
{α : Type u_1}
[DecidableEq α]
{c : α}
{s : Finset α}
(hS : s.Nontrivial)
:
(s \ {c}).Nonempty
@[deprecated Finset.sdiff_eq_self_iff_disjoint]
Alias of Finset.sdiff_eq_self_iff_disjoint
.
theorem
Finset.sdiff_eq_self_of_disjoint
{α : Type u_1}
[DecidableEq α]
{s t : Finset α}
(h : Disjoint s t)
: