1.2 Sets
Definition
A set is a collection of elements.
We denote sets by capital letters like X and Y. If an element x belongs to the collection X, we write x∈X. If y does not belong to X, we write y∉X. There is a special set containing no elements. This set is called an empty set and is denoted by ∅.
If you think of a set you should imagine a sack full of elements. The sack is your set and the elements in the sack are the elements belonging to the set. An empty set becomes a sack with no elements inside.
Constructors
To define a set we need to specify the elements inside the set. For doing that, we use the following notation
X={X| condition on (x}
Here, we mean that the set X consists of all elements x such that the condition on x holds.
e.g. The set of natural numbers
ℕ={x|x) is a natural number(}={0,1,2,3,⋯,n,⋯}
Operations on sets
Intersection
If we are given two sets X and Y, then we define the intersection of X and Y as follows
X∩Y={z|z∈X∧z∈Y}
If we denote the sets X and Y by discs on a plain then the intersection of X and Y is denoted as below
Union
If we are given two sets X and Y, then we define the union of X and Y as follows
X∪Y={z|z∈X∨z∈Y}
If we denote the sets X and Y by discs on a plain then the union of X and Y is denoted as below
Difference
If we are given two sets X and Y, then we define the difference between X and Y as follows
X∖Y={z|z∈X∧z∉Y}
If we denote the sets X and Y by discs on a plain then the difference between X and Y is denoted as below
Cartesian product
If we are given two sets X and Y, then their Cartesian product is defined as follows
X×Y={(x,y)|x∈X;y∈Y}
The Cartesian product is simply the set of all possible pairs (x,y) where the first element is taken from X and the second from Y.