A set is a collection of (mathematical) objects. There is an entire field of mathematics called set theory dedicated to the study of sets and to their use as a foundation for mathematics, but in MATH0005 we are going to give only an informal introduction to sets and their properties. If you want to know more, see the further reading section at the end of this chapter.
We specify sets using logical notation: if is a property that is true or false for each thing , then
is the collection of all such that is true. 11 1 You have to be slightly careful with this kind of unrestricted comprehension because it can lead to contradictions. You can ignore this for the purposes of MATH0005, but if you want to know more then check out the Further Reading section at the end. For example, if is the property that is an even integer then is the set consisting of all the even integers
Sometimes we already have a set and a property that is true or false for each in . For example, might be the set of all real numbers, and the property . We write
(2.1) |
for the set of all things in such that is true. In the example, this set would be the set of all strictly positive real numbers, sometimes written in interval notation. The symbol means ‘is an element of.’
These two ways of specifying a set are called set builder notation.
Sometimes we want to specify a set simply by listing its elements one by one. For example, the set whose elements are 1, 2, and 3 is written , which is a short way of writing for the set builder notation
The things in a set are called its elements or members. We write to mean that is an element or member of the set , and to mean that is not an element or member of .
There is a unique set with no elements, called the empty set and written . No matter what is, .
We allow any kind of mathematical object, including sets themselves, as elements of sets. Sets can contain functions, matrices, vectors, numbers, and sets themselves.
is a set whose four elements are the empty set, the number 1, the set containing the number 2, and the set containing the set containing 3.
Let . Then , , , .
Two sets and are defined to be equal if for all things we have if and only if — that is, if and only if they have the same elements. It’s helpful to write this in terms of logical equivalence: the two sets
are equal if and only if and have the same truth value for every . This definition of set equality has some important consequences. First, if
then because these are shorthand for
and for any propositional variables and , the WFFs and are logically equivalent. The order in which we list the elements of a set doesn’t matter. Similarly, if
then , because the two definitions above are shorthand for
and the two formulas and are logically equivalent. Repetition doesn’t matter.
We need vocabulary for talking about one set being contained in another.
is a subset of , written , if and only if every element of is also an element of .
If is not a subset of we write .
is a proper subset of , written , if and only if but .
Thus being a proper subset of means that is a subset of and contains something that does not contain.
There is an important way to rephrase the definition of two sets being equal: if and only if and . This is sometimes useful as a proof technique, as you can split a proof of into first checking and then checking .
Why is the last equality true? The only things which are elements of are 1 and 2. The only things which are elements of are 1 and 2. So the two sets are equal according to our definition. There’s no concept of something being an element of a set “more than once.”
This is the way in which our definition of set equality captures the idea of sets being unordered collections of objects which disregard repetition.
The definition of subset means that the empty set is a subset of any set. for any set , because is vacuously true: there’s nothing in which could fail to be in the set in order to make false.