Operations on Sets

In the Wolfram Language, sets are represented by sorted lists.

Union find the union of any number of sets

Intersection find the intersection of any number of sets

Complement find the complement with respect to a universal set

SymmetricDifference find the symmetric difference of any number of sets

Subsets find all possible subsets of a set (the powerset)

Tuples find all possible tuples of n elements from a set

Groupings find all possible groupings of elements

Testing Relations between Sets

IntersectingQ  ▪  DisjointQ  ▪  SubsetQ

Testing Set Containment

ContainsAll  ▪  ContainsNone  ▪  ContainsAny  ▪  ContainsOnly  ▪  ContainsExactly

Testing Elements in Sets

Element  ▪  MemberQ  ▪  FreeQ

Operations on Subsets

SubsetCases find subsets of elements matching a pattern

SubsetPosition  ▪  SubsetCount

SubsetReplace replace subsets of elements

Constructing Sets from Lists

DeleteDuplicates  ▪  Sort  ▪  DuplicateFreeQ  ▪  DeleteAdjacentDuplicates  ▪  UniqueElements

Symbolic Set Theory

ForAll  ▪  Exists  ▪  Resolve