Lecture 3
Set operations
Let and be sets. We define their union to contain exactly the things that are in one set or the other (or both):
That notation is called a set comprehension: the thing on the left of the vertical bar are the things we want to put in the set, and the things on the right of the vertical bar are the conditions under which we put them in. We’ll use them a lot.
Similarly, we define the intersection to contain exactly the things that are in both sets:
Lastly, we define the difference to be the things which are in but not in :
Equality
Two sets and are equal if they have the same members.
A straightforward way of proving this is often to show that and . That is, in words, two sets and are equal if every element of is an element of and every element of is an element of .
Here’s an example of this proof strategy:
Proposition
1 Let , and be three sets. We have
Proof
We’ll show that each side is contained in the other: first we’ll prove that and then that
For the first one, suppose that ; we must prove that .
Since , we have both and , which in turn means that or . In either case, the desired result holds:
If , then since also, then , and so .
If , then, similarly, since , we have , and hence .
So we’ve proved that containment.
Now let’s prove the other containment: that . We suppose that and must prove that .
Since , we have either or . In either case, we get what we want.
If , then and . From the latter, we get that and hence .
If , then, as before, but now . But we still have , and so .
That was the first example of a formal proof in this course. You’ll have to write many proofs like this yourself, in assessed homework and in the exam. Though we’ll discuss it in depth later, it may be worth observing the style from the beginning. One big mistake that many beginner mathematicians make is not using words to explain the flow of the argument.
A warning
What we are practising here is called naı̈ve set theory. What’s so naı̈ve about it?
The Welsh mathematician Bertrand Russell realised in 1901 that there are serious problems with being allowed to form sets carelessly:
Paradox
Suppose there is a set of all sets which are not elements of themselves: This creates a contradiction.
Proof
Is a member of itself? If , then by the definition of , we have . On the other hand, if , then again by the definition of we have .
As a result of this paradox, modern set theorists impose strict rules on what sets can be formed, with the aim of banning this particular beast and everything like it.
However, you probably won’t need to worry about this, unless you take a course in set theory later in your mathematical careers.
Functions
A function is to be thought of as a machine that takes an element of one set and gives you an element of another. Here’s a formal definition:
Definition: Given sets and , a function (sometimes called a map) gives for each element a unique element .
Examples include:
the function defined by .
the function defined by
The set is called the domain of , and is called the codomain of . We call the value of at , or the image of under .
Consider the “age in years” function from the set of people watching this lecture to the natural numbers.
The domain of this function is the set of values you’re permitted to apply it to. This is the set of people watching the lecture, because I said so.
The codomain of this function is the set of values it is permitted to take. This is the set of natural numbers, because I said so.
Some people like to talk about the image of this function, being the set of values it actually takes in practice. This might (perhaps) be the set
The range is not a phrase that’s used consistently:
some people use it to mean the codomain;
some people use it to mean the image;
some (confused) people, who don’t know the difference, use it inconsistently to mean both.
In this course, we’ll be numbering results by lecture, so that Theorem 15.3 will be the third result in the 15th lecture.↩︎