Sets#
Definition: Set
A set is a collection of well-defined objects, called elements.
Notation
The notation \(a \in A\) means that \(a\) is an element of the set \(A\).
The notation \(a \notin A\) means that \(a\) is not an element of the set \(A\).
Note
- A set can contain pretty much anything - numbers, letters, cars, sentences, people, colours and even other sets.
- A set can contain either finitely many or infinitely many elements.
Definition: Singleton
A singleton is a set with exactly one element.
Definition: Equality
Two set are equal if they contain the same elements.
Axiom: Existence of an Empty Set
There exists a set with no elements.
Notation
Theorem: Uniqueness of the Empty Set
There is only one empty set.
Proof
Let \(A\) and \(B\) be two empty sets. They have no elements and so the statement
is vacuously true. Therefore, \(A = B\).
Theorem: Empty Set as Subset of all Sets
The empty set is a subset of all set.
Proof
Let \(A\) be a set.
Suppose that the empty set \(\varnothing\) is not a subset of \(A\). Then there must exist an element \(e \in \varnothing\) which is not an element of \(A\), i.e. \(e \notin A\). This is a contradiction, since the empty set contains no elements.
There are three main ways to represent and define sets.
The descriptive form uses words to describe a set. For example, the set \(S\) is the set of all odd natural numbers which are less than 12.
The set-builder form defines a set by specifying a condition that all of its members satisfies and looks like this:
The placeholder is simply there so you can use it to more easily write the condition. The | character can be read as "such that". For example, specifying the aforementioned set \(S\) using set-builder notation will look like the following.
The final way to define a set is simply by listing all of its elements or listing enough of them, so that whoever is reading the definition can easily establish the pattern they follow. For example, the aforementioned set will be written as
Subsets#
Definition: Subset
A set \(A\) is a subset of another set \(B\) if all elements of \(A\) are also elements of \(B\).
Notation
If \(A\) is a subset of \(B\), we write \(A \subseteq B\). Some people also write \(A \subset B\), but this notation can be ambiguous.
If \(A\) is not a subset of \(B\), we write \(A \not\subseteq B\) or \(A \not \subset B\).
Definition: True Subset
A set \(A\) is a true subset / strict subset of another set \(B\) \(B\) if \(A \subseteq B\) and \(A \ne B\).
Notation
If \(A\) is a true subset of \(B\), we write \(A \subsetneq B\). Some people also write \(A \subset B\), but this notation can be ambiguous.
Definition: (Strict) Superset
A set \(A\) is a (strict) superset of another set \(B\) if \(B\) is a (strict) subset of \(A\).
Notation
Definition: Power Set
The power set of a set \(M\) is the collection of all subsets of \(M\).
Notation
Definition: Indicator Function
Let \(S\) be a subset of a set \(X\).
The indicator function of \(S\) is the function \(\mathbf{1}_S: X \to \{0, 1\}\) defined as
Operations#
Definition: Union
The union of two sets \(A\) and \(B\) is the set which contains exactly the elements which are in \(A\), in \(B\) or in both \(A\) and \(B\).
Notation
Definition: Intersection
The intersection of two sets \(A\) and \(B\) is the set of all elements which are both in \(A\) and in \(B\).
Notation
Definition: Disjoint Sets
We say that \(A\) and \(B\) are disjoint if their intersection is the empty set.
Definition: Set Difference
The set difference \(A \setminus B\) of two sets \(A\) and \(B\) is the set which contains exactly the elements in \(A\) which are not elements of \(B\).
Notation
Definition: Complement
Let \(B\) be a subset of a set \(A\).
The complement of \(B\) in \(A\) is the difference \(A \setminus B\).
Definition: Symmetric Difference
The symmetric difference of two sets \(A\) and \(B\) is the set of all elements which are only in \(A\) and those elements which are only in \(B\):
Notation
Definition: Cartesian Product
Let \(A_1, \dotsc, A_n\) be non-empty sets.
The Cartesian product \(A \times \cdots \times A_n B\) is the set of all ordered pairs \((a_1, \dotsc, a_n)\) such that \(a_i \in A_i\):
Theorem: Cardinality of the Set Union
The union of two finite sets \(A\) and \(B\) has cardinality
Proof
TODO
Theorem: Commutativity of the Set Union
The union of two sets \(A\) and \(B\) is commutative:
Proof
TODO
Theorem: Commutativity of Set Intersection
The intersection of two sets \(A\) and \(B\) is commutative:
Proof
TODO
Theorem: Associativity of Set Intersection
The intersection of sets is associative:
Proof
TODO
Theorem: Cardinality of the Cartesian Product
The Cartesian product of two finite sets \(A\) and \(B\) has cardinality
Proof
TODO
Theorem: Distributive Laws for Set Operations
The set operations have the following properties:
Proof
TODO