The Idea of a Set
The theory of sets is deep and has many subtleties. Strictly speaking, what exactly are sets and what behaviors one should expect from them are still matters of debate in mathematical philosophy and logic. However, at the informal level — the level at which this book uses set theory — sets are conceptually simple things. They are just unordered collections of arbitrary objects. Note that when I say "unordered collections" and "objects", I do not pretend to mean anything mathematically precise by them. In fact, I cannot do so without either circular reasoning or infinite regress. Rather, I am merely appealing to one's intuitive ideas of what an "unordered collection" and an "arbitrary object" should be and hope that everyone more or less agrees on those ideas.
Moving on, a set is denoted either in explicit form where all the elements of the set are written down between curly braces or in set builder form where the condition/predicate satisfied by the elements of the set is written down between curly braces. An example of the former is , whereas as example of the latter is (pretend that is defined in the last example). Sometimes, in set builder notation, one of the conditions is snuck onto the left side of the ''. For instance, I could have equally written the last example as .
If one thinks about the two notations for a while, one will realize that the set builder form is more expressive than the explicit form. One can, for example, easily denote and manipulate infinite sets with the set builder form, while one cannot humanly write down the explicit form of an infinite set. However, the set builder form is too powerful. In general, collections of the form cannot be sets for arbitrary conditions , lest one wants to fall victim to Russell's Paradox. Some of those arbitrary collections must either not exist or be "larger" than sets, called classes. Discussing classes is outside the scope of this book. However, I mention them to motivate a special class worth keeping in mind — the universal class that contains all sets. In most set theories, this also means that contains all the mathematical objects being talked about because, in those theories, most objects of mathematical interest are sets!
Membership and Set Equality
As discussed above, sets are collections containing objects. To show that an object is inside a set , one writes . One says that is a member of . Two sets are equal if and only if they contain exactly the same members. More precisely, one says that sets and are equal if and only if given , one can show that and given , one can show that .
The Empty Set
One of the most important, if trivial, examples of sets is the empty set that contains no objects. It is either denoted by or denoted in its obvious explicit form . Interestingly, it can have many set builder forms. Inside a set theory where all objects of interest are sets, one of those forms is . This says that the empty set contains all and only those objects that are not equal to themselves. Of course, in any reasonable mathematical theory, every object is in fact equal to itself. So, this denotation is basically a roundabout way of saying that the empty set has no members.
Subsets
One calls a set a subset of a set when every object inside is also inside i.e. if , then . This fact is denoted by . If, in addition, is not the whole of , then one calls a proper subset of , denoting this fact by .
It should not be hard to see that two sets are equal if and only if each is a subset of the other. Furthermore, note the following useful observation: if , then one necessarily has an object in that is not in .
Operations on Sets
In this book, I primarily use three operations to make new sets from old ones (assuming a set theory where all objects being talked about are also sets):
- Union: Given a set of many other sets , i.e. is the set of all objects that are in at least one of the sets inside .
- Intersection: Given a set of many other sets , i.e. is the set of all objects that are common to all the sets inside . Technically, should be non-empty for to be a set; otherwise, the intersection would be the whole of which is not a set.
- Power: Given a set i.e. is the set of all subsets of .
The Cartesian Product of Sets
Even though sets are unordered, one can manually construct order out of them. For instance, the ordered pair can be defined as . Given this definition, it is not hard to show that one can tell the left element apart from the right element in i.e. one can show that if , then and . Given two sets and , the set of all ordered pairs, where the left and right elements are taken from and respectively, is denoted by . More explicitly, This set is called the Cartesian Product of and .
Functions as Sets
A function with the domain set and the codomain set is just a subset of satisfying thus:
- For every , there is exactly one such that . One says that is mapped to and denotes this fact as . This denotation is unambiguous since, as said before, there is just a single that could ever refer to.
Such a function is denoted as . Next, I present the salient concepts about functions that the reader needs to keep in his/her mind while going through this book.
Given two functions and with matching codomain and domain , their composition , defined by , is also a function. The reader should translate this definition into the language of sets and verify that the claim is indeed true.
The set of all elements of that gets mapped to by an element of a subset is denoted by . This is called the image set of . More explicitly, Obviously is always a subset of .
For a given element of , the set of all elements of that map to that element is denoted by . More explicitly, Obviously is always a subset of . Generalizing, given , the set of all elements of mapping into is denoted by i.e. . Note that .
One says that is injective iff implies . Alternatively, by logical contraposition, implies . Yet another way to phrase injectivity is this: given a , there is at most one such that . As an example, for any two sets , there is an injection such that for each . The reader can easily show that this is a well-defined injection. This injection is called the inclusion map from to .
On the other hand, one says that is surjective iff for every there is at least one such that . Using notation defined earlier, the reader can verify that surjectivity is equivalent to any of the following assertions:
- for any .
- for every
Given two sets such that and , there is a surjection . To see this, note that ; so there is some . Now, define thus: The reader can easily show that this is a well-defined surjection.
If a function is both injective and surjective, it is called bijective. Hence, if is bijective and , then there is exactly one such that . This observation allows one to define a function where is equal to that one and only satisfying . This is called a left inverse of because it cancels from the left: .
I now present some elementary results about functions in general.
Lemma RSIS
Restriction to Subset and its Image is Surjection: For any function and , restricting the function's domain and codomain to and , respectively, produces a surjection; furthermore, if is an injection, so is this restriction.
Proof: As per the theorem, let where for all , . Now, suppose . Then, by definition of , for some . But then, . Hence, every in the codomain of is the image of some in its domain i.e. is surjective. Next, let for . Then, and, since , . Thus, if is injective, then certainly , meaning is injective too.
Lemma ISSI
Image of a Subset is a Subset of the Image: For any function and , . Furthermore, if is injective and is a strict subset of , then is a strict subset of .
Proof: This is left to the reader.
Lemma LInvBijThenBij
Left Inverse of a Bijection is a Bijection: If is a left inverse of a bijection , then is bijection.
Proof: Let me first show that is injective i.e. assuming , I will proceed to prove that . Now, since is bijective, and therefore surjective, there are such that and . Thus, where the beginning and ending equalities come from the given hypothesis that is a left inverse of . So being a function, it maps equal values to exactly one value; hence, , which is the sought after result.
Next, showing the surjectivity of is very easy: for any , there is obviously an element of such that maps that element to as .
Lemma CBB
Composition of Bijections is a Bijection: Given bijections and , the composition is also a bijection.
Proof: This is left to the reader.