* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download complete lecture notes in a pdf file - Mathematics
Wiles's proof of Fermat's Last Theorem wikipedia , lookup
List of important publications in mathematics wikipedia , lookup
Foundations of mathematics wikipedia , lookup
History of the function concept wikipedia , lookup
Karhunen–Loève theorem wikipedia , lookup
List of first-order theories wikipedia , lookup
Functional decomposition wikipedia , lookup
Fundamental theorem of algebra wikipedia , lookup
Big O notation wikipedia , lookup
Laws of Form wikipedia , lookup
Large numbers wikipedia , lookup
Structure (mathematical logic) wikipedia , lookup
Fundamental theorem of calculus wikipedia , lookup
Abuse of notation wikipedia , lookup
Non-standard analysis wikipedia , lookup
Hyperreal number wikipedia , lookup
Elementary mathematics wikipedia , lookup
Non-standard calculus wikipedia , lookup
Proofs of Fermat's little theorem wikipedia , lookup
Quasi-set theory wikipedia , lookup
Foundations of Abstract Mathematics 2011 W??? ?? ? f ?? ?? ?? g◦f (h◦g)◦f X ??? ?? ?? g ?? ?? ?? ? ) h◦(g◦f ) h◦g Y ??? ?? ?? h??? ?? ?? / Z A preliminary edition (18 March 2012): lecture notes for Foundations of Abstract Mathematics 2011. Department of Mathematical Sciences, Stellenbosch University. The material, written by Zurab Janelidze, forms part of a Stellenbosch University FINLO project, authored by Karin Howell, Zurab Janelidze, and Ingrid Rewitzky. The material is typeset with amsbook LATEXpackage. Contents Introduction iv Book I. Variables and Formulas 1 Chapter 1. An introduction to the mathematical language 1.1. Foreword 1.2. Variables 1.3. The three layers of the mathematical language 2 2 2 3 Chapter 2. Conjunction and disjunction 2.1. The connective “and” 2.2. The connective “or” 2.3. Dual and equivalent formulas 6 6 7 8 Chapter 3. Quantification 3.1. The quantifiers 3.2. Quantified letters 3.3. Quantification over an empty set 9 9 10 11 Chapter 4. Negation and implication 4.1. Negation 4.2. Implication 4.3. Exercises 13 13 14 15 Book II. Partitions and Correspondences 19 Chapter 5. 5.1. Abstraction 5.2. Partition of a set 5.3. Exercises 20 20 20 21 Chapter 6. 6.1. Set-theoretic notation and terminology 6.2. Specifying subsets 6.3. Exercises 24 24 24 25 Chapter 7. 27 i ii CONTENTS 7.1. Correspondences 7.2. Mappings 7.3. Exercises 27 28 29 Chapter 8. 8.1. Endocorrespondences 8.2. Equivalences 8.3. Exercises 31 31 32 32 Book III. Sets and Universes 37 Chapter 9. 9.1. Small sets 9.2. Pairs as sets 9.3. Exercises 38 38 39 40 Chapter 10.1. 10.2. 10.3. 10. The language for sets Interpreting ∈ as < Exercises 41 41 42 43 Chapter 11.1. 11.2. 11.3. 11. Basic set theory axioms Existence of powersets and unions Exercises 45 45 46 46 Chapter 12.1. 12.2. 12.3. 12. The constructive language of set theory Universes Exercises 48 48 49 50 Book IV. Operations and Functions 53 Chapter 13.1. 13.2. 13.3. 13. Intersection and the empty set Union and difference Exercises 54 54 55 55 Chapter 14.1. 14.2. 14.3. 14. Product Relations Exercises 58 58 58 59 Chapter 15. 15.1. Functions 61 61 CONTENTS 15.2. Composition 15.3. Exercises Chapter 16.1. 16.2. 16.3. 16. Exponentiation Addition Exercises iii 62 64 68 68 68 69 Book V. Infinities and Numbers 71 Chapter 17.1. 17.2. 17.3. 17. Injections and surjections Bijections Exercises 72 72 73 74 Chapter 18.1. 18.2. 18.3. 18. Bijective sets Infinities Exercises 76 76 77 78 Chapter 19.1. 19.2. 19.3. 19. Cardinal numbers Natural numbers Exercises 79 79 80 81 Chapter 20.1. 20.2. 20.3. 20. Mathematical induction Counting systems Exercises 83 83 84 85 Index 88 Introduction The aim of these notes is to introduce some foundational topics of contemporary mathematics to a beginner. The material is based on well-known deep ideas, but the presentation is highly non-standard (among other things, some of the notation and terminology used appears here for the first time). The present version of these notes is essentially an identical copy of the one the author used in his lectures in 2010-2011. Apart from the typographic mistakes that need to be corrected, the index requires a revision and some historical notes are to be added in the future. The material is divided in five parts, called “books”. The aim of Book I is to introduce the language of mathematics. We assume no prior knowledge of any specific area of mathematics, except very elementary arithmetic. Book II begins by giving a precise mathematical interpretation of “abstraction”, as a process of partitioning a given set of “concrete” objects. After introducing very basic set-theoretic notation and terminology, we define a correspondence from a set X to a set Y as an element of a particular partition of the set of all mathematical expressions about objects x and y. Then a mapping is defined as a correspondence such that for each x in X there is a unique y in Y which corresponds to x. Thus, correspondences capture the idea of a relation between two sets, while mappings — that of a function. Relations and functions will be formally introduced in Book IV, after developing little bit more of set-theoretic intuition in Book III. At the end of Book II we discuss basic relational properties — reflexivity, symmetry, antisymmetry and transitivity. Each chapter concludes with a list of questions for practice, for students of different levels: “exercises” are intended for a beginner, “problems” are intended for those who already have certain mathematical maturity, while questions labeled as “application” or “research” are intended for those students who have a substantial knowledge of mathematics — often answers to such a question can be quite lengthy and iv INTRODUCTION v can constitute either entire or part of a third year project in mathematics. Occasionally, there are also “computer projects” for students who are able to program. The aim of Book III is to introduce an axiomatic approach to set theory. Notice however that we do not include all axioms of set theory: instead, we only discuss several of the most basic axioms and focus on practicing how to form and prove simple formulas in “the language of set theory”. We also discuss the idea of a “universe of small sets” — a world of sets within a world of sets. Some attention is paid to interpreting the language of set theory in a non set-theoretical context (specifically, we investigate the case when we interpret sets as natural numbers and “x ∈ y” is interpreted as “x < y”). In Book IV we explore basic operations for sets, such as union, intersection, difference, product, exponentiation, and then we define and study relations and functions between sets, which model correspondences and mappings within set theory. The ideas introduced in Book IV are essential in every area of modern mathematics. Book V begins with a study of special types of functions — injections, surjections and bijections. These functions are then used to introduce the concept of infinity, and to discover that there can be infinities of different sizes. This naturally leads to cardinal numbers, which allow to “count” elements in both finite and infinite sets. Then, natural numbers are introduced as cardinal numbers of a special type, and the principle of mathematical induction is obtained. Finally, the universal property of the natural number system is established, with some applications given in the form of problems. Book I Variables and Formulas CHAPTER 1 An introduction to the mathematical language 1.1. Foreword 1.1.1. Mathematical reasoning is so precise that its validity does not depend on the opinion of a particular person. 1.1.2. Such precise reasoning is carried out via symbols which represent joints such as “... and ...”, “... or ...”, “if ... then ...”, “not ...”, “for each ... we have ...”, “there exists ... such that ...”. 1.1.3. The collection of these symbols, together with rules telling us how we can form sentences using them, constitutes the mathematical language. 1.1.4. The mathematical language is universal: every mathematician in the world understands it! 1.2. Variables 1.2.1. It is common to represent numbers, which are “unknown” at the time of discussion, by letters — we then call these letters variables. 1.2.2. For instance, when we write x + 1, the letter x (a variable) represents a number — we might not know which specific number does x represent, but whatever it represents, we should add one to it and we will get the number represented by x + 1. 1.2.3. There can be different reasons for using variables. For example, it might be that we write a variable x because we do not know yet what number it is, but using the given information, we are going to determine what is x — we encounter this situation when we want to solve a problem such as the following one: 1.2.4. John had two apples. He gave a certain number of apples to Mary, after which John is left with one apple. How many apples did John give to Mary? 2 1.3. THE THREE LAYERS OF THE MATHEMATICAL LANGUAGE 3 1.2.5. The standard way to start solving such problem is to denote, by x, the unknown — in this case, it is the number of apples that John gave to Mary. Then, the information that is provided gives rise to the equation 2 − x = 1. Solving the equation we get x = 1. 1.2.6. Another reason why we might want to use variables is to state general principles which hold true no matter what is the value of x. 1.2.7. For example: The equality x + 1 = 1 + x holds true for any number x. 1.2.8. In Book I, we will use variables more for the latter purpose. Further, we will use variables not only for representing numbers, but also for representing statements — expressions that could be true or false. 1.2.9. Typically, we use letters from the Greek alphabet to represent statements. Here is an example: The statement (claim) “α and α” is true exactly when α is true, whatever the statement α is. 1.2.10. The above sentence simply says that, for instance, the claim “sky is blue” is true whenever the claim “sky is blue, and, sky is blue” is true. 1.2.11. Here, α is the statement “sky is blue”, but even if α was any other statement, the same principle applies: “α and α” is true exactly when “α” is true. 1.3. The three layers of the mathematical language 1.3.1. The mathematical language has three “layers”: • The first layer consists of variables, usually they are Latin letters in italic typeset (a, b, ..., A, B, ...), which are supposed to represent objects that we want to talk about: these can be numbers, statements, or any other predefined class of objects; • The second layer consists of expressions (statements / claims) involving these objects, which are called formulas, and which are usually represented by Greek letters α, β, γ, ...; formulas describe a meaningful connection between objects; 4 1. AN INTRODUCTION TO THE MATHEMATICAL LANGUAGE • And the third layer consists of the so-called connectives ∧, ∨, ¬, ⇒ and the quantifiers ∀, ∃, each of which has a specific meaning and use (that will be explained as we proceed), that allow to combine the formulas to form new formulas. 1.3.2. In the ordinary language, we can talk about anything we like, and we may not care to specify in the beginning of conversation exactly what are we going to be talking about. In mathematics, we do not have such freedom: it is important to assume an initial agreement as to which objects can the Latin letters represent. 1.3.3. As an illustration, suppose we agree that we want to talk about cats. Then, upon this agreement, Latin letters will always represent cats. This describes the first layer of the language in which we will talk about cats. 1.3.4. Now, the second layer: let us list some examples of formulas, i.e. expressions about cats: x has yellow fur. x is a kitten. x enjoys drinking milk in the company of y. x, y and z always fight with each other. 1.3.5. Suppose α represents the first formula above. To indicate the fact that there is a first-layer variable x used in the formula α, we can write α(x) for α. 1.3.6. Then, putting α(y) would mean substituting y in the place of x in the formula α, so that α(y) would represent the following formula: y has yellow fur. 1.3.7. When there are two variables in a formula, like in the third expression about cats above, we write β(x, y). 1.3. THE THREE LAYERS OF THE MATHEMATICAL LANGUAGE 5 1.3.8. Then, β(x, x) would mean substituting x in the place of y, so that the formula becomes x enjoys drinking milk in the company of x which is quite different from the original formula, as now it only talks about one cat x, and previously it talked about possibly two different cats x, y. 1.3.9. Indeed, while β(x, y) is very rarely true, β(x, x) is probably always true. The rest of Book I describes the third layer of the mathematical language. CHAPTER 2 Conjunction and disjunction 2.1. The connective “and” 2.1.1. We are now ready to start introducing the symbols from the third layer of the mathematical language. In this section we will introduce the first symbol — the connective ∧, which is called conjunction. 2.1.2. If α and β are formulas, then we can form a statement α and β which combines in a particular way these two formulas. 2.1.3. This statement is a formula which will be written as follows: α∧β 2.1.4. The precision of mathematical reasoning lies in the fact that we should make a fixed agreement as to when would such a combined formula be true and when would it be false, provided we know in advance exactly whether each of α, β is true or false. 2.1.5. In the case of the formula α ∧ β, the accepted agreement is as follows: α ∧ β is true when both α is true and β is true; as soon as one of them (or both of them) is false, α ∧ β is false. 2.1.6. One can describe this in short by the following truth table: ∧ t f t t f f f f 2.1.7. If we want to use ∧ repeatedly, as, for instance when we want to state “α and β” and γ we use brackets (instead of the quotes above): (α ∧ β) ∧ γ. 6 2.2. THE CONNECTIVE “OR” 7 2.1.8. In principle, it is possible to avoid using brackets, if we do not write the symbol ∧ between two variables, but rather to the left: instead of α ∧ β, write ∧αβ. Then ∧ ∧αβγ does not cause the same confusion as α ∧β ∧γ does. However, the bracket notation above seems to be more clear to the eye. 2.1.9. If α is a formula involving x and β is a formula involving y, then α ∧ β is a formula involving both x and y. 2.1.10. If γ represents the formula α ∧ β, then writing γ(x, y) is the same as writing α(x) ∧ β(y). 2.2. The connective “or” 2.2.1. In the previous section we discussed the meaning of the logical connective ∧. This meaning was in some sense completely determined by the table ∧ t f t t f f f f 2.2.2. Similarly, the meaning of the connective ∨, called disjunction, is given by the table ∨ t f t t t f t f We read “∨” as “or”. 2.2.3. So, if α and β are arbitrary formulas, α ∨ β (read as “α or β”) is a new formula which is true only when at least one of α, β is true (not excluding the case when both α and β are true at the same time). 2.2.4. This is very different from the ordinary usage of “or”, where, depending on the context, sometimes it excludes the possibility of both α and β being true at the same time, and sometimes it does not. 2.2.5. In mathematics, however, we have a prior agreement about the usage of “or”, which is the one stated above. 2.2.6. Knowing the truth tables for ∧ and ∨ we are able to construct truth tables for any formula formed using these two connectives. 8 2. CONJUNCTION AND DISJUNCTION 2.2.7. For example, consider the formula α ∧ (β ∨ γ). The truth table for this formula is as follows (notice that since there are three variables involved in the formula, it is no longer possible to have a square table): α β γ α ∧ (β ∨ γ) t t t t t t f t t f t t t f f f f t t f f t f f f f t f f f f f 2.3. Dual and equivalent formulas 2.3.1. Notice that the connectives ∧ and ∨ are dual to each other in the sense that if in the truth table of ∧ we swap the roles of t and f, then we get a truth table of ∨ (and vice versa). 2.3.2. In a similar way, the formula α ∨ (β ∧ γ) would be dual to α ∧ (β ∨ γ), which can be verified easily by drawing the truth table of α ∨ (β ∧ γ). 2.3.3. On the other hand, the formula (α∧β)∨(α∧γ) is equivalent to the formula α ∧ (β ∨ γ), by which we simply mean that they have the same truth tables. 2.3.4. It is easy to see that if two formulas are equivalent, then their dual formulas will also be equivalent. 2.3.5. So, after observing that (α ∨ β) ∧ (α ∨ γ) is dual to (α ∧ β) ∨ (α ∧ γ) we can dualize the previous remark and conclude that (α ∨ β) ∧ (α ∨ γ) is equivalent to α ∨ (β ∧ γ). CHAPTER 3 Quantification 3.1. The quantifiers 3.1.1. Let α be an expression about an object x. 3.1.2. Recall that x represents an object from the class of those objects that we agreed to talk about (whatever the agreement was). 3.1.3. Recall also that we can write α(x) instead of α. 3.1.4. In general, whether the formula α(x) is true or not might depend on which particular object is x. The following two situations are important in mathematics: • first, when α(x) holds for any object x in the class (i.e. whatever x is, α(x) should be true); in this case we might say that α(x) is globally true; • and second, when there exists at least one object x in the class for which α(x) is true; in this case we might say that α(x) is locally true. 3.1.5. The meaning of ∀x α(x) (read as “for all x, α(x)”) is that α(x) holds true globally, and the meaning of ∃x α(x) (read as “there exists x such that α(x)”) is that α(x) holds true locally. 3.1.6. More precisely, the formula ∀x α(x) is true when for every object x (in the predefined class of objects) the formula α(x) is true, and it is false when this is not the case, i.e. at least for one object x the formula α(x) is false. 3.1.7. Similarly, the formula ∃x α(x) is true when there exists an object x such that the formula α(x) is true, and it is false when for any object x the formula α(x) is false. 3.1.8. This describes the usage of the quantifiers ∀ and ∃. 9 10 3. QUANTIFICATION 3.1.9. Let us consider an example. Suppose we agreed to talk about natural numbers 0, 1, 2, 3, 4, .... 3.1.10. Consider the following formula: x + 2 = 2x Question: is this formula globally true or locally true (or perhaps both)? 3.1.11. If we let x = 2 then the formula is true, so we know that the formula is locally true, i.e. the formula ∃x (x + 2 = 2x) is true. 3.1.12. Now, if we let x = 1 then the formula is false — so, it is not globally true, i.e. the formula ∀x (x + 2 = 2x) is false. 3.2. Quantified letters 3.2.1. Let α(x) be a formula which does not involve a quantifier. 3.2.2. When we form a new formula using a quantifier — ∀x α(x) or ∃x α(x) — the letter x looses its status of a variable in ∀x α(x) and also in ∃x α(x). 3.2.3. Instead, it becomes part of the quantifying symbol — it becomes what we call a quantified letter (more commonly known as a bounded variable). 3.2.4. Thus for instance, in the formula ∃x (x + y = 2) the letter x is a quantified letter, so y is the only variable (in the standard mathematical terminology, x would be called a bounded variable, while y would be called a free variable). 3.2.5. Then, the meaning of ∀x (∃x (x + y = 2)) is the same as the meaning of ∀x (∃z (z + y = 2)) because in ∃x (x + y = 2) the letter x does not appear as a variable, just as it does not appear in ∃z (z + y = 2). 3.3. QUANTIFICATION OVER AN EMPTY SET 3.2.6. 11 On the other hand, the meaning of ∀x ((∃x (x + y = 2)) ∧ x + y = 1) is not the same as the meaning of ∀x ((∃z (z + y = 2)) ∧ z + y = 1) since in x + y = 1 the letter x does appear as a variable, while in z + y = 1 it does not. 3.2.7. Instead, the meaning of the former formula is the same as the meaning of ∀x ((∃z (z + y = 2)) ∧ x + y = 1) 3.2.8. In mathematics, good style of writing quantified formulas is when we write quantified formulas where the same letter does not appear both as a quantified letter and as a variable, and neither it is quantified more than once. 3.2.9. For instance, the formula ∀x ((∃x (x + y = 2)) ∧ x + y = 1) we had above is written in bad style, while the expression ∀x ((∃z (z + y = 2)) ∧ x + y = 1) which has the same meaning, is written in good style. 3.3. Quantification over an empty set 3.3.1. Let us now consider quantified formulas, ∀x α or ∃x α, where the quantified letter x does not appear as a variable in the formula α that is being quantified: for instance, consider the formula ∃x (1 + 1 = 2) 3.3.2. The meaning of this formula is the following: we can actually find a number x and at the same time the expression 1 + 1 = 2 is true. 3.3.3. Thus, if the set of those numbers that we agreed to talk about is empty, i.e. we can never find a number x among the numbers we agreed to talk about, then ∃x (1 + 1 = 2) is automatically false (even though 1 + 1 = 2 is true). 3.3.4. At the same time, in this case the formula ∀x (1 + 1 = 2) is true since its meaning is understood as follows: if we can find x, then 1 + 1 = 2 is true. The formula is then true because we cannot find x. 12 3. QUANTIFICATION 3.3.5. It would be true even if instead of 1 + 1 = 2 we write 1 + 1 = 3. 3.3.6. In other words, when the set of objects that we agreed to talk about is empty, the formula ∀x α is always true, no matter whether α is true or not, and the expression ∃x α is always false, no matter whether α is true or not — this, irrespective of whether the variable x appears in the formula α or not. 3.3.7. On the other hand, if this set is not empty (i.e. it contains at least one object), and α does not involve the variable x, then ∀x α is true exactly when α is true, and also ∃x α is true exactly when α is true. CHAPTER 4 Negation and implication 4.1. Negation 4.1.1. If ϕ is a formula, then ¬ϕ is a new formula which is true when ϕ is false, and vice versa, is false when ϕ is true. 4.1.2. follows: In other words, the truth table for the negation “¬” is as ϕ ¬ϕ t f f t 4.1.3. Notice that ¬(¬(ϕ)) is equivalent to ϕ, and notice also that the dual of ¬ϕ is ¬ϕ itself. 4.1.4. Knowing truth tables for the connectives ∧, ∨, ¬, it is easy to derive truth tables for the formulas formed using these connectives. 4.1.5. For example, the truth table for ¬(α ∨ β) can be obtained as follows, working from left to right: α t t f f β α ∨ β ¬(α ∨ β) t t f f t f t t f f f t 4.1.6. If we produce a truth table for (¬α) ∧ (¬β), we will see that the expressions ¬(α ∨ β) and (¬α) ∧ (¬β) are in fact equivalent to each other. 4.1.7. Similarly, ¬(α ∧ β) is equivalent to (¬α) ∨ (¬β). 4.1.8. This shows how negation interacts with “and” and “or”. We now describe how negation interacts with the quantifiers. 4.1.9. Let α be a formula and form the formula ¬(∀x α). 13 14 4. NEGATION AND IMPLICATION 4.1.10. Recall that expression ∀x α is true when α is true globally. 4.1.11. ¬(∀x α) negates global truth of α: it says that it is not true that for every x the formula α is true. 4.1.12. In other words, this means that there exists x such that the formulas α is false. 4.1.13. So we see that ¬(∀x α) has the same meaning as ∃x (¬α). 4.1.14. In the same way, ¬(∃x α) negates the fact that there exists x such that α is true, which should mean that α must be false for every x, so we see that ¬(∃x α) has the same meaning as ∀x (¬α). 4.2. Implication 4.2.1. Finally, we introduce the implication connective “⇒” which reads “implies”. 4.2.2. If α and β are formulas, then α ⇒ β is a new formula “α implies β”, whose meaning is “if α then β”. 4.2.3. When we say “if α then β” what we mean in the mathematical language is that if α is true then β must also be true, but if α is not true then β does not need to be either true or false. 4.2.4. So the expression “if α then β” can be false only in the case when α is true, but at the same time β is false — in all other cases the expression “if α then β” is true. 4.2.5. Thus, the truth table for α ⇒ β is as follows: ⇒ t f t t f f t t 4.2.6. It is easy to verify that this is at the same time the truth table for (¬α) ∨ β. 4.2.7. In other words, the formulas α ⇒ β and (¬α) ∨ β are equivalent. 4.2.8. It is often difficult to understand why is the above truth table the right choice for α ⇒ β — when this is the case, one can always think of α ⇒ β as an “abbreviation” for (¬α) ∨ β (i.e. think of α ⇒ β as a formula which has exactly the same meaning as (¬α) ∨ β). 4.2.9. Perhaps, solving the following problem will help to understand the truth table for implication: 4.3. EXERCISES 15 4.2.10. Problem. Two brothers were playing ball in the house and broke a vase. Mother asked them: Which of you broke the vase? The older brother said: If I did it, then my brother also did it. The younger brother said the same thing about the older brother: If I did it, then my brother also did it. According to their father, what the older brother says never implies what the younger brother says. Which of the two brothers broke the vase? Solution: To construct the truth table for this problem, we represent expressions that will be involved in the truth table by Greek letters. Let α represent what the older brother said, and let β represent what the younger brother said. Let γ represent the expression which says that the older brother broke the vase. Similarly, let δ represent the expression that the younger brother broke the vase. Then the expression α is equivalent to γ ⇒ δ and similarly, the expression β is equivalent to δ ⇒ γ. We know that α does not imply β, which can be written as ¬(α ⇒ β). Now we can use all this information to produce the following truth table: γ t t f f δ γ ⇒ δ δ ⇒ γ α ⇒ β ¬(α ⇒ β) t t t t f f f t t f t t f f t f t t t f So, from this truth table we can see that there is only one case when we have value t for ¬(α ⇒ β), and in this case γ is false and δ is true. Hence, the vase was broken by the younger brother. 4.3. Exercises 4.3.1. Exercise. Let variables represent human beings. Consider the following formulas: α(x) : “x does not have a sibling” β(x, y) : “x and y have the same parents” γ(x, y, z) : “z is a parent of x and of y” (a) Translate each of the sentences in the following paragraph, into formulas in the mathematical language, expressed in terms of the formulas α, β, γ defined above. 16 4. NEGATION AND IMPLICATION Any person for which there exists a person, other than that person, such that these two persons have the same parents, has a sibling. For any named person who does not have a sibling, it is possible to name a person who has the same parents as the formerly named person. If two persons have at least one common parent, this does not imply, in general, that they have both parents same. (b) Which of the sentences above are correct? (c) Express β via γ. (d) Negate each of the formulas in the answer to (a). 4.3.2. Problem. A magician has two boxes — a black box and a white box; and he has two assistants — Euclid and Einstein. Einstein often says new things, but sometimes what he says is false. Euclid almost never says anything new, but what he says is always true. The magician also has some rabbits, who sometimes hide in the boxes. During his show, he forgot whether there is a rabbit in the white box and asks Einstein: Is there a rabbit in the white box? Einstein replies: That I would not know, but I know that if there is a rabbit in the black box, then there is a rabbit in the white box. Then the magician turns to Euclid and asks him: Is there a rabbit in the white box? Euclid replies: That I would not know, but I know that if what Einstein said is true then there isn’t a rabbit in the white box. After this, does the magician know whether there is a rabbit in the white box? What about the black box, in which case can we be sure that there is a rabbit in the black box? 4.3.3. Problem. D’Artagnan has three friends: Athos, Parthos and Aramis, two of which always tell the truth and one always lies. D’Artagnan begins to investigate which one of them is the liar. Aramis says: If I lie then Parthos also lies. Parthos says the same thing about Aramis: If I lie then Aramis also lies. 4.3. EXERCISES 17 While Athos says: What Aramis says implies what Parthos says. Does D’Artagnan have enough information to conclude who is the liar? 4.3.4. Problem. Teacher wants to find out which of the three twin girls in her class is called Mathie, and so she asks them: Which one of you is Mathie? One of the three says: I am Mathie or my sister is not. The twin of whom she spoke said about her: If I am Mathie then she is too. The third twin, however, says: What my sisters told you contradict each other. The teacher knows that either all three twins lie or all three say the truth. However, she does not know whether only one of them is called Mathie or two or three of them. Can she still determine who of the twins are called Mathie? Book II Partitions and Correspondences CHAPTER 5 5.1. Abstraction 5.1.1. Consider a process when we organize objects into nonintersecting groups, and give the objects in the same group one name, thus deciding not to distinguish between objects which are in the same group and think of them as one object. 5.1.2. Such one object, which is in fact a collection of objects, is then what we can call an abstract object, while the objects inside that group can be regarded as concrete objects. 5.1.3. Thus, whether something is abstract or concrete depends on the context in which we consider it. 5.1.4. We illustrate this on an example: “dog”, which can be defined as the collection of all specific dogs, is abstract relative to any specific dog, which is then concrete. 5.1.5. On the other had, “animal”, which can be defined as the collection of all specific types of animals (e.g. dogs, cats, etc.) is abstract relative to a specific type of animal, say, “dog”, which is then concrete. 5.2. Partition of a set 5.2.1. To study abstraction in general, let us consider any set C of objects, who will play the role of concrete objects. 5.2.2. Now, let us give a precise definition of what do we mean by a “grouping” of objects in C, and let us adopt a specific term “partition” to represent a grouping in the precise sense as introduced below. 5.2.3. Definition. A partition P of C is a set satisfying the following conditions: (a) Each member of P is a set such that its each member is a member of C. (b) Each member of C is a member of exactly one member of P . 20 5.3. EXERCISES 21 (c) Each member of P contains at least one member of C. 5.2.4. To group objects, we need a “rule” that tells us when do two objects belong to the same group. 5.2.5. Such “rule” must be a formula %(x, y) in the mathematical language, about two objects x and y. 5.2.6. Now, we want to describe the process of forming a partition P based on the formula %. 5.2.7. Recall that members of the corresponding partition P are the groups we form using the formula %. 5.2.8. So we can say that P is the set of all such groups. But then, we need to define what do we mean by “such group”. 5.2.9. Definition. A %-class in C is a set X satisfying the following conditions: (a) For each member x of X and each member y of X, %(x, y) is true. (b) For each member x of C and each member y of C, if %(x, y) is true, then x is a member of X if and only if y is a member of X. (c) X has at least one member, and each member of X is a member of C. 5.2.10. Now, we can construct P from R as follows (note that we also introduce a special notation for such construction): 5.2.11. Definition. Let C% denote the set of all %-classes in the given set C. When C% is a partition of C, we call it the partition of C induced by %. 5.3. Exercises 5.3.1. Exercise. Let C be the set having only two members, number 0 and number 1. Describe all possible partitions of C. 5.3.2. Exercise. Let C be the set whose members are the natural numbers 1, 2, 3. Consider the set P which has two members, a and b, where a is the set whose members are 1, 2 and b is the set with only one member 3. Prove that P satisfies all conditions (a),(b),(c) of Definition 5.2.3, and hence is a partition of C. 22 5 5.3.3. Exercise. Let C be the set of all human beings. Let %(x, y) be the expression “x is a mother of y”, about human beings x, y. Prove that there does not exist a %-class. 5.3.4. Exercise. (a) Consider the following example: • C is the set of those students who attend one of the first period classes every Monday. • %(x, y) is the formula “x and y attend the same class every Monday in the first period”. Describe all %-classes. Verify that C% is a partition of C. (b) If instead we take C above to be the set of all students, then would C% still be a partition of C, for the same formula %? 5.3.5. Exercise. Give an example of a set C and a set P , such that from the conditions (a),(b),(c) of Definition 5.2.3, only the condition (a) is not satisfied. Do the same for (b) and for (c). 5.3.6. Exercise. If each member of a partition P of a set C has exactly 5 members, and the set C has 20 members. Then, how many members does P have? 5.3.7. Problem. Give an example of a set C, a formula %(x, y) and a set X, such that from the conditions (a),(b),(c) of Definition 5.2.9, only the condition (a) is not satisfied. Do the same for (b) and for (c). What consequence does the fact that for each (a), (b), and (c) we can find such example, bear on the logical connection between the conditions (a), (b), (c)? 5.3.8. Problem. Give an example of a set C and a formula %, such that C% is a partition of C, and prove that this is so. 5.3.9. Problem. Rewrite each of the three conditions that define a partition in a mathematical language where objects we agree to talk about are sets, and where we write x ∈ y to express “x is a member of y”. 5.3.10. Problem. Do the same as in Problem 5.3.9 for the conditions that define a %-class. 5.3.11. Problem. For any given set C, characterize those rules % for which C% is a partition of C. S 5.3.12. Problem. For a set P of sets, define P to be the set whose members are all members of members of P . Prove that if P is a S partition of a set C, then P = C. 5.3. EXERCISES 23 5.3.13. Problem. Give an example of a situation when the converse of the statement in Problem 5.3.12 fails: that is, give S an example of a set P of sets, such that P is not a partition of C = P . 5.3.14. Computer project. In an object-oriented programming language, introduce an object set, and write a program which can determine whether an input set P is a partition of an input set C. 5.3.15. Application: measuring angles. Describe the scale of measuring angles as a partition of the set of real numbers. 5.3.16. Application: natural numbers. Construct the natural number system as a partition of a set C of sets of “physical objects”. CHAPTER 6 6.1. Set-theoretic notation and terminology 6.1.1. When x is a member of a set X, we write x ∈ X, and say that x is an element of X. 6.1.2. When every element of a set X is an element of a set Y , we write X ⊆ Y , and we say that X is a subset of Y . 6.1.3. When two sets X and Y are equal, i.e. when X ⊆ Y and Y ⊆ X, we write X = Y . 6.1.4. For a list x1 , x2 , ... of objects, the set whose elements are the objects in the list will be denoted by {x1 , x2 , ...}. 6.1.5. Note that the above notation is little bit misleading, since, for instance, the set {1, 2, 2} is the same as the set {2, 1}, as neither the order, nor repetitions in the list effect the set. 6.1.6. by ∅. The empty set is the set with no elements, and it is denoted 6.1.7. Theorem. A set is a subset of every set if and only if it is the empty set. 6.1.8. Proof. Let X be a set which is a subset of every set. Then, in particular, X is a subset of ∅. This implies X = ∅ (for, if X has at least one element x, that x must also be an element of ∅, which is impossible). Conversely, the empty set ∅ is a subset of every set X. Indeed, ∅ does not have elements and so ∅ ⊆ X trivially holds true for any set X. 6.2. Specifying subsets 6.2.1. Let σ(x) be a formula. 6.2.2. Then, for each given set C the expression σ(x) defines a subset S of C — the subset of those elements x ∈ C for which σ(x) holds true. 24 6.3. EXERCISES 6.2.3. 25 This subset will be denoted by S = {x ∈ C | σ(x)}. 6.2.4. For each specific σ(x), we read the above equality as follows: S is the set of all those elements x in C such that σ(x). 6.2.5. Let us consider an example: let C = {1, 2, 3, 4} and let σ(x) be the expression “x is a sum of two numbers in C”. Then, the former equality reads: S is the set of all those elements x in C such that x is a sum of two numbers in C. 6.2.6. Thus, in this case, the set S defined by the above equality is the set S = {2, 3, 4}. 6.3. Exercises 6.3.1. Exercise. Prove that if X ⊆ Y and Y ⊆ Z, then X ⊆ Z. 6.3.2. Exercise. Use set-theoretic notation to write down a set which has only one element, who is itself a set having only one element, where that unique element is itself the set which has two elements — the empty set and the set whose unique element is the empty set. 6.3.3. Exercise. (a) How many elements does the set {0, 1, 0, 1, 0, {{0, 1}}, {{1, 1, 0}}} have? (b) List all possible subsets of the above set. 6.3.4. Exercise. Rephrase Definition 5.2.3 using set-theoretic notation and terminology. 6.3.5. Exercise. Rephrase Definition 5.2.9 using set-theoretic notation and terminology. 6.3.6. Exercise. Using set-theoretic notation, list all possible partitions of the set {0, 1, 2}. 6.3.7. Exercise. Come up with a formula σ(x) such that the subset S = {x ∈ {0, 1, ..., 1000000} | σ(x)} of the set of all number from 0 to 1000000 is equal to S = {1, 3, 6, 2, 8, 101, 12567}. 26 6 6.3.8. Problem. Define an ordered pair (x, y) of two objects x and y to be (x, y) = {{x, y}, {x}}. Prove that two ordered pairs are equal (as sets) if and only if their components are equal, i.e. (x, y) = (a, b) ⇔ x = a ∧ y = b. 6.3.9. Problem. For a set X, by P(X)Swe denote the set whose elements are S all subsets of X. Prove that P(X) = X (where the operator “ ” is defined in the same way as in Problem 5.3.12 of Chapter 5). 6.3.10. Problem. Prove that there does not exist a set X such that P(X) ⊆ X (where P(X) is defined in the same way as in Problem 6.3.9). (Hint: consider the subset {x ∈ X | ¬(x ∈ x)} of X.) 6.3.11. Research: discovering the concept of infinity. Define what does it mean for a set X to have infinitely many elements and prove that no set of the form X = {x1 , ..., xn } is such. 6.3.12. Research: comparing infinities. Define what does it mean for a set X to have less or equal number of elements than a set Y (the case of infinitely many elements should not be excluded). (a) Show that X has less or equal number of elements than P(X) (see Problem 6.3.9). (b) Prove that the converse is not true, i.e. P(X) does not have less number of elements than X. (Hint: use argument similar to the one in the solution of Problem 6.3.10.) (c) Conclude from the above that there does not exist largest set: there is no set X such that every other set has less number of elements than X. 6.3.13. Research: axiomatic foundation of mathematics. Consider a set U equipped with an arbitrary formula ε(x, y), where x, y can be arbitrary elements x, y ∈ U . Formulate axioms on ε which would be needed to reproduce the content of the present chapter, by replacing “sets” with elements of U , and replacing the expression “x ∈ y” with ε(x, y). CHAPTER 7 7.1. Correspondences 7.1.1. Let X and Y be sets. We say that an element b ∈ Y corresponds to an element a ∈ X by the formula %(x, y), when %(a, b) holds true. 7.1.2. For example, let X = {0}, Y = {0, 1} and let the formula %(x, y) be “y = x + 1”. Then, 1 corresponds to 0 by the formula %(x, y) since 1 = 0 + 1, but 0 does not correspond to 0 since 0 6= 0 + 1. 7.1.3. Notice in this example, that if for the same X and Y as above, we consider the formula σ(x, y) : “y 6= x”, then again, 1 corresponds to 0 by the formula σ, but 0 does not correspond to 0. Thus, both rules % and σ give the same correspondence between elements of X and Y . 7.1.4. We now want to use this idea to give a mathematical definition of a “correspondence”. 7.1.5. Let X and Y be sets. Let Γ be an expression Γ(%, σ) about two rules %(x, y) and σ(x, y), stating the following: Γ(%, σ) : “∀x ∀y ((x ∈ X ∧ y ∈ Y ) ⇒ (%(x, y) ⇔ σ(x, y)))” Then Γ defines a partition CΓ of the set C of all formulas involving x and y. 7.1.6. Definition. An element of a partition CΓ referred to above will be called a correspondence from X to Y . If c is such a correspondence, and %(x, y) is its element, then we say that the correspondence c is given by (or is defined by) the formula %. 7.1.7. Notice that for any element x ∈ X and any element y ∈ Y we have that %(x, y) holds true if and only if σ(x, y) holds true, for any two formulas % and σ which define the same correspondence c from X to Y . When x ∈ X and y ∈ Y and %(x, y) holds true (or, 27 28 7 equivalently, σ(x, y) holds true) we say that y corresponds to x under the correspondence c, and we display this as c : x 7→ y or as x / c y When the correspondence c has been fixed in advance, we sometimes omit the label “c” above. 7.1.8. Thus, in the example considered previously, the two formulas “y = x + 1” and “y 6= x” define the same correspondence, which is completely described by the display 0 / 1 7.2. Mappings 7.2.1. Definition. A correspondence c from a set X to a set Y is said to be a mapping from X to Y , when to each element x ∈ X corresponds exactly one element y ∈ Y , i.e. the following conditions are satisfied: (a) ∀x (x ∈ X ⇒ ∃y (c : x 7→ y)) (b) ∀x ∀y1 ∀y2 (((c : x 7→ y1 ) ∧ (c : x 7→ y2 )) ⇒ (y1 = y2 )) When c is a mapping and c : x 7→ y, we say that x is mapped to y under the mapping c. 7.2.2. For example, the correspondence from the set {0, 1, 2, 3} to the same set {0, 1, 2, 3}, given by y = x − 1, is not a mapping, because there is no natural number corresponding to the number 0 (i.e. we cannot find y ∈ {0, 1, 2, 3} such that y = 0 − 1). 7.2.3. On the other hand, the same formula y = x − 1 defines a mapping from the set {1, 2, 3} to {0, 1, 2, 3}. 7.2.4. Now, consider another example. The formula %(x, y) : “x > 0 ⇒ y > 0” again does not define a mapping from {0, 1, 2, 3} to {0, 1, 2, 3}. Indeed, for instance, %(0, y) holds true for all y ∈ {0, 1, 2, 3}, and so we get that several numbers correspond to the same number 0, which contradicts the definition of a mapping. 7.2.5. However, the above formula does define a mapping from the set {1, 2, 3} to the set {0, 1}. Indeed, for any x ∈ {1, 2, 3} there is a unique y ∈ {0, 1} such that %(x, y) holds true — namely, y = 1. Thus, under this mapping, all elements in {1, 2, 3} are mapped to 1. 7.3. EXERCISES 29 7.3. Exercises 7.3.1. Exercise. Give a full graphical description (using the display notation introduced in 7.1.7) of the correspondence c, from the set {1, 2, 3} to the set {1, 2, 3}, defined by the formula “y > x”. 7.3.2. Exercise. Give a full graphical description (using the display notation introduced in 7.1.7) of the correspondence c, from the set {1, 2, 3, 4, 5} to the set {1, 2, 3, 4, 5}, defined by the formula “(x > 1 ⇒ y < 4) ∧ (y = 3 ⇒ x > y)”. 7.3.3. Exercise. Describe all possible mappings from the set {0, 1} to the set {0, 1, 2}. 7.3.4. Exercise. Verify that the condition (b) in the definition of a partition (see Definition 5.2.3 in Chapter 5) is equivalent to the following condition: the correspondence from C to P , defined by the formula x ∈ y, is a mapping. 7.3.5. Exercise. Prove that there does not exist a mapping from a nonempty set to the empty set. 7.3.6. Exercise. Let X be any set. (a) Give an example of a formula %(x, y) which defines a mapping from the empty set ∅ to X. (b) How many mapping are there from the empty set ∅ to X? 7.3.7. Problem. Characterize those mappings from a given set C to itself, which can be defined by formula %(x, y) such that C% is a partition of C. 7.3.8. Problem. Using the solution to Problem 5.3.11 in Chapter 5, prove the claim in 7.1.5 above that CΓ is a partition of C. 7.3.9. Research: relations and functions. Using the notion of a pair (see Problem 6.3.8 in Chapter 6), represent each correspondence from a set X to a set Y uniquely, as a concrete set, and call such a set a relation from X to Y . Then, define a function from a set X to Y as a particular type of a relation (in a similar style as a mapping is a particular type of a correspondence). Finally, argue that conceptually a relation is the same thing as a correspondence, and a function is the same thing as a mapping. 7.3.10. Application: sequences. Use the notion of a mapping to give a set-theoretic definition of a sequence x1 , ..., xn of objects in a given set X. 30 7 7.3.11. Application: exponentiation. Give a set-theoretic definition of exponentiation mn for natural numbers m, n, using the notion of a mapping. Conclude from this that 00 = 1. CHAPTER 8 8.1. Endocorrespondences 8.1.1. By an endocorrespondence on a set X we mean a correspondence c from X to X. Below we exhibit different types of endocorrespondences on a set X: 8.1.2. Definition. Let X be a set. An endocorrespondence on X is said to be (a) a reflexive endocorrespondence on X, when ∀x (x ∈ X ⇒ c : x 7→ x), (b) a symmetric endocorrespondence on X, when ∀x ∀y (({x, y} ⊆ X) ⇒ (c : x 7→ y ⇒ c : y 7→ x)), (c) an antisymmetric endocorrespondence on X, when ∀x ∀y (({x, y} ⊆ X) ⇒ ((c : x 7→ y ∧ c : y 7→ x) ⇒ (x = y))), (d) a transitive endocorrespondence on X, when ∀x ∀y ∀z (({x, y, z} ⊆ X) ⇒ ((c : x 7→ y ∧ c : y 7→ z) ⇒ (c : x 7→ z))). 8.1.3. examples. The above notions can be well illustrating with real-life 8.1.4. For instance, let X be the set of all human beings and consider the endocorrespondence c on X defined by the formula “x is a child of y”. Then, c is neither reflexive, nor symmetric, nor transitive, but it is antisymmetric. 8.1.5. Notice that the c above is also neither a mapping: every human being has a parent, but not a unique one. 8.1.6. Let X be a set. The formula y = x defines an endocorrespondence on X, which we call equality endocorrespondence on X. 8.1.7. Notice that equality endocorrespondence is a mapping, and moreover, it is reflexive, symmetric, antisymmetric and transitive. 31 32 8 8.1.8. Theorem. An endocorrespondence on a set X is at the same time reflexive, symmetric and antisymmetric, if and only if it is the equality endocorrespondence on X. 8.1.9. Proof. We have already observed above that the equality endocorrespondence is reflexive, symmetric and antisymmetric. Conversely, suppose an endocorrespondence c on a set X is reflexive, symmetric and antisymmetric. We have to show that the formula y = x defines the correspondence c, which is to show that for arbitrary x, y ∈ X we have: y = x if and only if c : x 7→ y. First, we show that y = x implies c : x 7→ y. Indeed, by reflexivity of c, we have x 7→ x, and since y = x, we get x 7→ y. Next, we show that c : x 7→ y implies y = x. Indeed, if c : x 7→ y then by symmetry we get c : y 7→ x. Now, applying antisymmetry, we conclude x = y which is the same as y = x. This completes the proof. 8.2. Equivalences 8.2.1. Definition. An endocorrespondence c on a set X is said to be an equivalence if it is reflexive, symmetric and transitive. 8.2.2. A primary example of equivalence is the equality endocorrespondence. 8.2.3. Any partition P of a set C gives rise to an equivalence, defined by the formula: ∃p (p ∈ P ∧ {x, y} ⊆ p). 8.2.4. This gives a mapping from the set of partitions of C to the set of equivalences on C. This mapping is a one-to-one correspondence, which means that each equivalence on C corresponds to exactly one partition P . 8.3. Exercises 8.3. EXERCISES 33 8.3.1. Exercise. Let X = {1, 2, 3, 4, 5, 6, 7}. An endocorrespondence c on X can be given by a table of the form c 1 2 3 4 5 6 7 1 2 3 4 5 6 7 where a blank cell is filled with a bullet • provided i 7→ j where i is the number in the row which contains the given cell, and j is the number in the column which contains the same cell. For each of the following tables, state whether the correspondence defined by it is or is not reflexive, symmetric, antisymmetric, transitive, and whether it is or not a mapping: c 1 2 3 4 5 6 7 1 • • 2 • • 3 • • 4 • 5 • • 6 • • 7 • • d 1 2 3 4 5 6 7 1 • • 2 • • • 3 • • 4 • • • 5 • • 6 • • • 7 • • e 1 2 3 4 5 6 7 1 2 • • • 3 • • 4 • • • 5 • • 6 • • • 7 f 1 2 3 4 5 6 7 1 • • • • • • • 2 • 3 • 4 • • • • 5 • • • • 6 • • • • 7 • 34 8 g 1 2 3 4 5 6 7 1 • 2 • 3 • 4 • 5 • 6 • 7 • h 1 2 3 4 5 6 7 1 2 3 4 5 6 7 8.3.2. Exercise. Represent by a table (see Exercise 8.3.1) the endocorrespondence c on the set X = {0, 1, 2, 3, 4, 5, 6, 7}, defined by the formula y − x3 − 7x2 + 12x = 0. Deduce from the table whether c is reflexive, symmetric, antisymmetric, transitive. Is c a mapping? 8.3.3. Exercise. Let c be an endocorrespondence on the set X = {0, 1, 2, 3} defined by the formula (x < 3 ⇒ y − x + 1 = 0) ∧ (x = 3 ⇒ y = 0) (a) Represent c by a table (see Exercise 8.3.1). Deduce from the table whether c is reflexive, symmetric, antisymmetric, transitive. Is c a mapping? (b) A correspondence is a set of formulas, and in particular, so is the correspondence c defined above. Is the formula y − x2 + 4x − 3 = 0 an element of the set c? 8.3.4. Exercise. Give various examples of endocorrespondences encountered in life, investigating in each case the properties of the endocorrespondence (i.e. whether it is reflexive, symmetric, antisymmetric, transitive, a mapping). 8.3.5. Exercise. Give the formal definition of one-to-one correspondence, motivated by the example considered in Section 8.2. 8.3.6. Problem. Let c be any set of formulas which is an endocorrespondence on a set X. Let d be any set of formulas which is an endocorrespondence on a set Y . Prove that if c = d then necessarily X =Y. 8.3.7. Problem. Is there a set X and a set c of formulas such that there exist two different sets Y1 6= Y2 , for which the set c of formulas is a correspondence from X to Y1 and at the same time c is a correspondence from X to Y2 ? 8.3. EXERCISES 35 8.3.8. Problem. Give a graphical method of how to determine whether tables as in Exercise 8.3.1 represent a transitive endocorrespondence or not. 8.3.9. Problem. Prove all claims in Section 8.2. 8.3.10. Computer project. Write a computer program for the game described below. If possible, teach the computer to win against any human Player B (in other words, if possible, find a winning strategy for Player C). 8.3.11. Game. Players B and C take turns to fill an empty cell in the table 1 2 3 1 2 3 where Player B fills an empty cell with a bullet • and Player C with a circle ◦. Player B makes the first turn. At each turn, Player B is only allowed to fill an empty cell provided after his turn the bullets define a transitive endocorrespondence on the set {1, 2, 3}. If he cannot fill an empty cell in this way, then he skips his turn. Game ends when all cells have been filled. Whoever managed to fill more cells wins the game. 8.3.12. Research. Consider the endocorrespondence c of “inequality” (i.e. the endocorrespondence c defined by x 6 y), on the set {0, 1, 2, 3, 4, ...} of natural numbers. Establish whether c is reflexive, symmetric, antisymmetric, transitive, and also, discover some further properties of c. 8.3.13. Application: axiomatic description of the natural numbers. Give an axiomatic description of the system of natural numbers, via conditions which are about an endocorrespondence s on a set N (where N is supposed to play the role of the set of natural numbers, and s is supposed to play the role of the mapping x 7→ x + 1). Then, use s to define addition of natural numbers as a correspondence. Hint: mathematical induction should appear as one of the axioms. 8.3.14. Research: discovering the structure formed by subsets of a set. Consider the set P(X), where X is any set (see Problem 6.3.9 in Chapter 6). Define an endocorrespondence c on P(X) by the formula A ⊆ B (in other words, A 7→ B exactly when A ⊆ B). Discover properties of the correspondence c. Which of these properties is shared by the endocorrespondence considered in Problem 8.3.12? Book III Sets and Universes CHAPTER 9 9.1. Small sets 9.1.1. Following the general principal mentioned in Book I, that we must specify in advance objects we are going to work with, we begin a formal treatment of sets by specifying a set U of those sets that we are going to work with. 9.1.2. Obviously, we want U to contain as many sets as possible. However, it turns out that it cannot contain simply every set: 9.1.3. Theorem. The subset X = {x ∈ U |¬(x ∈ x)} of U is not an element of U . 9.1.4. Proof. We begin by observing that exactly one of X ∈ X and ¬(X ∈ X) can be true. If X ∈ X is true, then this would imply that ¬(X ∈ X) is also true by the definition of X, so X ∈ X cannot be true. Hence, ¬(X ∈ X) is true. But then, X ∈ U cannot be true as it would imply that X ∈ X is true by the definition of X. This completes the proof. 9.1.5. However, U can contain its own subsets which have finite number of elements, and specifically, we want to impose the following condition on U : 9.1.6. Axiom. ∀x ∀y ({x, y} ⊆ U ⇒ {x, y} ∈ U ) 9.1.7. For any set X which is an element of U , we want the set of all subsets of X to be also an element of U . This set is called the powerset of X, and is denoted by P(X). Thus we have: 9.1.8. Axiom. ∀X (X ∈ U ⇒ P(X) ∈ U ) 9.1.9. Gradually, we will impose more axioms on the set U . Henceforth, the elements of the set U we have chosen will be called small sets and we will refer to U as the universe of small sets. 38 9.2. PAIRS AS SETS 39 9.1.10. Theorem 9.1.3 can be interpreted as follows: there exist sets which are too large to fit in the universe of small sets. 9.2. Pairs as sets 9.2.1. Theorem. For any two small sets x and y, the set {{x, y}, {x}} is also small. 9.2.2. Proof. By Axiom 9.1.6, the set {x, y} is small. Again by Axiom 9.1.6, the set {x} is also small. Using Axiom 9.1.6 once again for the small sets {x, y} and {x}, we get that {{x, y}, {x}} is small. 9.2.3. Definition. A pair of objects x and y is defined as the set (x, y) = {{x, y}, {x}}. 9.2.4. Thus, in this new terminology, the above theorem states that any ordered pair of small sets is a small set (i.e. it is an element of the universe U ). 9.2.5. Theorem. For arbitrary objects x, y, a, b we have: (x, y) = (a, b) ⇔ (x = a ∧ y = b) 9.2.6. Proof. First we prove (x, y) = (a, b) ⇒ (x = a ∧ y = b). The equality (x, y) = (a, b) means the following equality of sets: {{x, y}, {y}} = {{a, b}, {b}} (1) Suppose we have this equality. If ¬(x = y), then {x, y} has two elements and so the set {b} which must be an element of the set (1), is forced to be equal to {y}. This in turn implies b = y. Now, by the equality (1), we must have {x, y} = {a, b}, and since b = y, this gives x = a. Now, if x = y, then {x, y} = {y} and therefore, by (1), we have {a, b} = {b}. In other words, a = b. Then, the equality (1) forces x = a (or, equivalently, y = b). Next, we prove (x = a ∧ y = b) ⇒ (x, y) = (a, b). Indeed, if x = a and y = b then clearly we have (1), which is the same as (x, y) = (a, b). The proof is now complete. 40 9 9.3. Exercises 9.3.1. Exercise. Give a simpler proof of Theorem 9.1.3 under the assumption that the universe satisfies the following additional axiom: for any small set x we have ¬(x ∈ x). 9.3.2. Exercise. How many elements are there in the powerset P(X) of a set X having n = 4 elements? What if n is any other natural number? 9.3.3. Exercise. List the two elements of the pair ({1, 2, {1, 2}}, {{{1}}}). 9.3.4. Exercise. Define a triple (x, y, z), and formulate and prove a result analogous to Theorem 9.2.5. 9.3.5. Problem. Is there a universe U of small sets such that Axiom 9.1.6 holds true but Axiom 9.1.8 fails? 9.3.6. Problem. Is there a universe U of small sets such that Axiom 9.1.8 holds true but Axiom 9.1.6 fails? 9.3.7. Problem. Let c be a correspondence from a set X to a set Y . Define the graph of c to be the set of all pairs (x, y) such that c : x 7→ y. Prove that each correspondence from X to Y is uniquely determined by its graph (i.e. two correspondences from X to Y are equal if and only if their graphs are equal). 9.3.8. Research: ordered sets. Define an ordered set to be a pair (X, c) where X is a set and c is an endocorrespondence on X which is reflexive, transitive and antisymmetric. Give examples of ordered sets and study their properties. 9.3.9. Research: set theory. Define set theory as a pair (U, ε) where U is a set and ε is an endocorrespondence on U , satisfying suitable axioms. 9.3.10. Research: natural number system. Define a natural number system as a pair (N, s) where N is a set and s is an endocorrespondence on N , satisfying suitable axioms. CHAPTER 10 10.1. The language for sets 10.1.1. In the previous chapter we started to develop set theory by agreeing that we would study only those sets which belong to a given set U satisfying suitable axioms. 10.1.2. This said, we are assuming that we understand the concept of a set. However, notice that we never gave a precise definition of what is a set. 10.1.3. In fact, it is not possible to give such a definition, unless we first adopt other undefined notions. 10.1.4. However, it is possible to describe very accurately all rules that we will use to make conclusions about sets, so that even if we do not have an initial understanding of what are sets, we will always be certain whether any proof of a claim about sets is correct or not. 10.1.5. Set theory is a study of objects that we agreed to talk about, via the mathematical language that, in addition to having usual symbols such as connectives and quantifiers, and in addition to having the equality symbol “=” with its usual meaning, also has the symbol “∈” which is used to form a formula x ∈ y from any two given objects x and y. Mathematical language comprising only of these symbols is called the language of set theory. 10.1.6. We read the formula x ∈ y as follows: x is an element of y (or, x belongs to y). 10.1.7. Those objects that we study in set theory are called sets. They are denoted by small letters, e.g. x, y, z, and also by capital letters, e.g. X, Y , Z. To distinguish them from the formulas we form using them, we will use Greek letters for representing formulas. 41 42 10 10.1.8. We introduce the following abbreviation in the language of set theory: we write X ⊆ Y in the place of the formula ∀x (x ∈ X ⇒ x ∈ Y ) and we read the above formula as follows: ‘X is a subset of Y ’. 10.1.9. To study sets we need to assume something about them, i.e. we need to assume that certain formulas in the language of set theory hold true. Such formulas are called axioms of set theory. 10.1.10. In this section we only present one very basic axiom: 10.1.11. Axiom of equality of sets. ∀X ∀Y ((X ⊆ Y ∧ Y ⊆ X) ⇔ X = Y ) 10.1.12. In other words, the above axiom states that sets X and Y are equal if and only if X is a subset of Y and at the same time Y is a subset of X. 10.1.13. We write [X : x, y] for the formula ∀z (z ∈ X ⇔ (z = x ∨ z = y)) which we read as follows: ‘X is the set of x and y’. 10.1.14. As an illustration of how we can use the above axiom to draw conclusions about sets, let us prove the following basic fact, which states that if each of X and Y is a set of x and y, then X and Y are equal: 10.1.15. Theorem. ∀x ∀y ∀X ∀Y ([X : x, y] ∧ [Y : x, y] ⇒ X = Y ) 10.1.16. Proof. Let x, y, X, Y be arbitrary sets. Suppose we have [X : x, y] and [Y : x, y]. By the axiom of equality of sets, to show X = Y it suffices to show that for any z we have z ∈ X if and only if z ∈ Y . Indeed, z ∈ X ⇔ z = x ∨ z = y by [X : x, y] ⇔ z∈Y by [Y : x, y] 10.2. Interpreting ∈ as < 10.2.1. When we develop set theory, we do not work with specific objects, but instead, we say that we assume to be given an arbitrary collection of objects, and we assume that we know what is the meaning of “=” and of “∈” for such objects. 10.3. EXERCISES 43 10.2.2. So, for instance, we could choose natural numbers 0, 1, 2, 3, ... as those objects, for which “=” is the usual equality of natural numbers, while “∈” is the strict inequality, i.e. x ∈ y means x < y. 10.2.3. Thus, in this case, sets are simply natural numbers, while the formula “x is an element of y” translates to “x is strictly less than y”. 10.2.4. It is easy to see that the axiom of equality of sets holds true, so that as an application of our work in the previous section, we get that Theorem 10.1.15 is true, which, in the usual language of natural numbers states that if X is a number such that only x and y are strictly less than X, and Y is a number having the same property, then X = Y . 10.2.5. In general, when the choice of a specific collection of objects, together with a specific interpretation of the symbol “∈” is given, so that axioms of set theory hold true, we say that the given data is a model of set theory. 10.2.6. Note however that the above case of natural numbers only gives a model of set theory with just the axiom of equality of sets: some other axioms of set theory would fail. 10.3. Exercises 10.3.1. Exercise. Using the axiom of equality of sets, prove the following: ∀x ∀y ∀X ([X : x, y] ⇔ [X : y, x]) 10.3.2. Exercise. (a) List all elements of the number 5 in the interpretation of the language of set theory described in Section 10.2. (b) List all natural numbers X which satisfy [X : x, y] for some x, y. 10.3.3. Exercise. (a) Write a formula in the language of set theory which would express the fact that a set X is an empty set. (b) Prove that if X and Y are both empty sets, then X = Y . (c) Explain why is the number 0 the empty set in the interpretation of the language of set theory described in Section 10.2. 10.3.4. Exercise. Formulate further axioms in the language of set theory which hold true in the interpretation discussed in Section 10.2. 44 10 10.3.5. Problem. What is the meaning of X ⊆ Y in the interpretation of the language of set theory discussed in Section 10.2? Use the answer to this question to conclude that the axiom of equality of sets holds true for that interpretation. 10.3.6. Problem. Let c be an endocorrespondence on a set X. Consider the interpretation of the language of set theory, where sets are interpreted as elements of X, equality is interpreted in the usual way, and “x ∈ y” is interpreted as “c : x 7→ y”. Suppose X = {0, 1, 2, 3} is the set of natural numbers. Give an example of c which is not a mapping and for which the axiom of equality of sets holds true. 10.3.7. Research. The language of set theory can be further enriched as follows: for any given objects x and y we are allowed to write {x, y}, which refers to a set X such that [X : x, y] holds true (i.e. we impose the axiom ∀x ∀y [{x, y} : x, y]). Similarly, for any set X we allow to write P(X) which to refers to a set, for which we have the axiom ∀Y (Y ∈ P(X) ⇔ Y ⊆ X). Follow this style and introduce more ingredients into the language of set theory. 10.3.8. Application: a formal approach to small sets. In the language of set theory, reproduce the content of Section 9.1 of the previous chapter. CHAPTER 11 11.1. Basic set theory axioms 11.1.1. In the previous chapter we presented the axiom of equality of sets. In this section we list some further basic axioms of set theory. 11.1.2. Axiom of forming sets of two elements. ∀x ∀y ∃X ([X : x, y]) 11.1.3. we write For any formula ϕ(x, y, z) in the language of set theory, [X : z | ϕ(x, y, z)] to abbreviate the formula ∀z (z ∈ X ⇔ ϕ(x, y, z)) 11.1.4. Thus, for instance, if ϕ(x, y, z) is the formula z = x ∨ z = y, then [X : z | ϕ(x, y, z)] becomes [X : z | z = x ∨ z = y] which abbreviates the same formula as does [X : x, y]. 11.1.5. We read [X : z | ϕ(x, y, z)] as follows: X is the set of those z’s for which ϕ(x, y, z) holds true. 11.1.6. Axiom system of forming subsets. For any formula α(x, z) in the language of set theory, we have: ∀x ∀Y ∃X ([X : z | z ∈ Y ∧ α(x, z)]) 11.1.7. Note that the above is not a single axiom but an infinite collection of axioms — one axiom for each choice of formula α. 11.1.8. Axiom of uniformly transforming subsets into elements. ∀X ∃Y ∀Z (Z ⊆ X ⇒ Z ∈ Y ) 11.1.9. Axiom of uniformly transforming elements into subsets. ∀X ∃Y ∀Z (Z ∈ X ⇒ Z ⊆ Y ) 45 46 11 11.2. Existence of powersets and unions 11.2.1. The following theorem states that for any set X, there exists a set P whose elements are precisely all subsets of X (in other words, any set has a powerset): 11.2.2. Theorem. ∀X ∃P [P : Z | Z ⊆ X] 11.2.3. Proof. Let X by any set. We must show that there exists a set P such that [P : Z | Z ⊆ X]. (2) By axiom of uniformly transforming subsets into elements we know that there exists a set Y such that ∀Z (Z ⊆ X ⇒ Z ∈ Y ). (3) Now, applying axiom of forming subsets for the formula α(X, Z) which states Z ⊆ X, we get that there exists a set P such that [P : Z | Z ∈ Y ∧ Z ⊆ X]. (4) By (3), for any Z we have Z ⊆ X ⇒ Z ∈ Y , and therefore Z ∈ Y ∧ Z ⊆ X is equivalent to Z ⊆ X. Then, (4) becomes equivalent to (2), which completes the proof. 11.2.4. The following theorem states that for any set X, there exists a set V which is a “union” of all subsets of X: 11.2.5. Theorem. ∀X ∃V [V : z | ∃Z (z ∈ Z ∧ Z ⊆ X)] 11.3. Exercises 11.3.1. In the exercises below we consider the interpretation of the language of set theory where sets are interpreted as numbers, and the symbol “∈” is interpreted as strict inequality “<” (see Section 10.2 of Chapter 10): 11.3.2. Exercise. Prove that the axiom of forming sets of two elements fails. 11.3.3. Exercise. Give an example of a formula α for which the formula in 11.1.6 fails. 11.3.4. Exercise. Prove that Axiom 11.1.8 holds true. 11.3.5. Exercise. Prove that Axiom 11.1.9 holds true. 11.3. EXERCISES 47 11.3.6. Problem. To prove Theorem 11.2.2 we used Axiom 11.1.6, which fails in the interpretation of the language of set theory where sets are interpreted as numbers, and the symbol “∈” is interpreted as strict inequality “<” (see Section 10.2 of Chapter 10). Explain why, in this interpretation, the proof of Theorem 11.2.2 is still valid. 11.3.7. Problem. Prove Theorem 11.2.5. 11.3.8. Problem. Formulate in the language of set theory and prove (under the axioms given in the present section) the result “empty set exists”. 11.3.9. Research: mathematical modeling. Develop a mathematical language suitable to study any area of life/science of your choice. Then, formulate necessary axioms and give a list of theorems which can be proved using these axioms. CHAPTER 12 12.1. The constructive language of set theory 12.1.1. The language of set theory that we have been developing in the last two chapters has a major inconvenience: it does not allow us to easily introduce the notation such as {x, y} or P(X), as we had in the very first chapter. 12.1.2. Although one does not really need to use such notation, and everything we can express and prove using them, can be still expressed and proved in the language of set theory, it is nevertheless very convenient to have such notation as it helps to express our ideas more elegantly. 12.1.3. For example, by the axiom of forming sets of two elements we can show that for any two sets x and y, there exists a set whose only elements are {x, y} and {y}. Now, in the language of set theory we have developed so far, to express this fact we need to write ∀x ∀y ∃X ∀Y ∀Z ([Y : x, y] ∧ [Z : y, y] ⇒ [X : Y, Z]) which otherwise using the above notation we could have written as ∀x ∀y ∃X ([X : {x, y}, {y}]) 12.1.4. So we revise the language of set theory, incorporating in it the ability to “construct” those sets whose existence is claimed in the axioms of set theory. Such a revised language of set theory will be called the constructive language of set theory. We now describe this language: 12.1.5. For any two sets x and y, we can form a term {x, y} which represents a set such that ∀x ∀y [{x, y} : x, y] holds true. We call {x, y} the set of x and y. 48 12.2. UNIVERSES 49 12.1.6. For any formula α(x, z) and for any set Y we can form a term {y ∈ Y | α(x, y)} which represents a set such that ∀x ∀Y [{y ∈ Y | α(x, y)} : z | z ∈ Y ∧ α(x, z)] holds true. Thus, {y ∈ Y | α(x, y)} is the subset of Y consisting of all those elements y ∈ Y for which α(x, y) holds true. S 12.1.7. For any set X we can form a term X which represents a set such that h[ i ∀X X : z | ∃x (z ∈ x ∧ x ∈ X) S holds true. Thus, X is the union of all sets which are elements of X. 12.1.8. For any set X we can form a term P(X) which represents a set such that ∀X [P(X) : Y | Y ⊆ X] holds true. We call P(X) the powerset of X. 12.2. Universes 12.2.1. Now that we have a better understanding of the world of sets, we revisit the concept of a universe of small sets. 12.2.2. Definition. A universe is a set U satisfying the following conditions: (a) If x ∈ U and y ∈ U then {x, y} ∈ U . (b) If Y ∈ U and XS⊆ Y then X ∈ U . (c) If X ∈ U then X ∈ U . (d) If X ∈ U then P(X) ∈ U . Once a universe U has been fixed, its elements are called small sets, to distinguish them from sets. 12.2.3. In some sense, a universe of small sets is an “enclosed” world of sets within the world of all sets. 12.2.4. When a universe of small sets is fixed in advance, often the small sets are called simply sets, and then, those sets which are not necessarily small, are called classes. 12.2.5. set. One often says large set to call a class which is not a small 50 12 12.2.6. There are other axioms of set theory one usually imposes, which we did not include in this book. They imply, in particular, that no set can be an element of itself. Then, the set X constructed in Theorem 9.1.3 of Chapter 9 becomes equal to the set U , and so Theorem 9.1.3 states that the universe U itself is a large set. 12.2.7. Sometimes in mathematics it becomes necessary to have not just two types of sets — small and large — but a whole hierarchy of different sizes of sets. This can be formalized by having a list U1 , U2 , U3 , ... (whether infinite or finite) of universes, where each universe Ui is an element of the universe Ui+1 . 12.3. Exercises 12.3.1. Exercise. Use the constructive language of set theory for the following: (a) From a given a set X, construct a set which does not have elements, denote it by ∅, and call it the empty set. Hint: not having elements means that ∀x ¬(x ∈ ∅) holds true. (b) Formulate and prove a mathematical formula which states that if Y is any other set which does not have elements, then Y = ∅, where ∅ the set constructed in (a). 12.3.2. Exercise. Let X and Y be any two sets. Use the constructive language of set theory to construct (a) a set X ∩ Y that would satisfy [X ∩ Y : z | z ∈ X ∧ z ∈ Y ]. (b) a set X \ Y that would satisfy [X \ Y : z | z ∈ X ∧ ¬(z ∈ Y )]. 12.3.3. Exercise. Prove that if X and Y are small sets, then also X ∩ Y and X \ Y are small sets (see Exercise 12.3.2). 12.3.4. Problem. Let X and Y be any two sets. Use the constructive language of set theory to construct (a) a set X ∪ Y that would satisfy [X ∪ Y : z | z ∈ X ∨ z ∈ Y ]. (b) a set X∆Y that would satisfy [X∆Y : z | (z ∈ X ∧ ¬(z ∈ Y )) ∨ (¬(z ∈ X) ∧ z ∈ Y )]. 12.3. EXERCISES 51 12.3.5. Problem. Formulate and prove a theorem which states the following: for any two sets X and Y we have X ∩ (Y ∪ Z) = (X ∩ Y ) ∪ (X ∩ Z) (see Exercise 12.3.2 and Problem 12.3.4). 12.3.6. Problem. Let X and Y be any two sets. Use the constructive language of set theory to construct a set X × Y that would satisfy [X × Y : z | ∃x ∃y (z = (x, y) ∧ x ∈ X ∧ y ∈ Y )]. 12.3.7. Problem. Prove that if X and Y are small sets, then X ∪ Y , X∆Y and X × Y are small sets too (see Problems 12.3.4 and 12.3.6). 12.3.8. Problem. Is the empty set a small set? 12.3.9. Research: set theory. Discover and prove results in set theory which have not been formulated in this book. Book IV Operations and Functions CHAPTER 13 13.1. Intersection and the empty set 13.1.1. Definition. Let X and Y be sets. Their intersection X ∩ Y is the set X ∩ Y = {x ∈ X|x ∈ Y } 13.1.2. In other words, the term {x ∈ X|x ∈ Y } will be abbreviated as X ∩ Y and thus, since we have {x ∈ X|x ∈ Y } = {x ∈ X|x ∈ Y } we can also write X ∩ Y = {x ∈ X|x ∈ Y }. 13.1.3. The empty set is defined as a new term ∅ in the language of set theory which represents a set for which the following axiom holds true: ∀x (¬(x ∈ ∅)) 13.1.4. Theorem. ∀X ( X ∩ ∅ = ∅ ) 13.1.5. Proof. Let X be a set. The empty set is a subset of every set. So to prove X ∩ ∅ = ∅ it suffices to prove X ∩ ∅ ⊆ ∅. By the definition of intersection, X ∩ ∅ = {x ∈ X|x ∈ ∅}. Thus, for any set z, we have z ∈ X ∩ ∅ if and only if we have (z ∈ X) ∧ (z ∈ ∅). So, to prove X ∩ ∅ ⊆ ∅, we have to prove that for any set z we have (z ∈ X) ∧ (z ∈ ∅) ⇒ z ∈ ∅ which is trivially true. 13.1.6. Theorem (associativity of intersection). ∀X ∀Y ∀Z ( (X ∩ Y ) ∩ Z = X ∩ (Y ∩ Z) ) 54 13.3. EXERCISES 55 13.1.7. Proof. Let X, Y and Z be arbitrary sets. For any set z, we have z ∈ (X ∩ Y ) ∩ Z if and only if we have z ∈ (X ∩ Y ) ∧ z ∈ Z. Since z ∈ (X ∩ Y ) itself is equivalent to z ∈ X ∧ z ∈ Y for any z, we get that z ∈ (X ∩ Y ) ∩ Z is equivalent to (z ∈ X ∧ z ∈ Y ) ∧ z ∈ Z. But the above is equivalent to z ∈ X ∧ (z ∈ Y ∧ z ∈ Z) which itself is equivalent to z ∈ X ∩ (Y ∩ Z). This shows (X ∩ Y ) ∩ Z = X ∩ (Y ∩ Z). 13.1.8. Proof of the following two results is left as an exercise: 13.1.9. Theorem (commutativity of intersection). ∀X ∀Y ( X∩ Y =Y ∩X ) 13.1.10. Theorem (idempotency of intersection). ∀X ( X ∩ X=X) 13.2. Union and difference 13.2.1. Definition. Let X and Y be sets. Their union X ∪ Y is the set [ X ∪ Y = {X, Y }. 13.2.2. Similarly to intersection, union is associative, commutative and idempotent. 13.2.3. Union distributes over intersection, i.e. we have X ∪ (Y ∩ Z) = (X ∪ Y ) ∩ (X ∪ Z) for any X, Y , Z. 13.2.4. Similarly, intersection distributes over union, i.e. we have X ∩ (Y ∪ Z) = (X ∩ Y ) ∪ (X ∩ Z) for any X, Y , Z. 13.2.5. Definition. Let X and Y be sets. Their difference X \ Y is the set X \ Y = {x ∈ X|¬(x ∈ Y )}. 13.2.6. Unlike intersection and union, difference is neither associative, nor commutative and nor it is idempotent. 13.3. Exercises 13.3.1. Exercise. Construct five different sets from the empty set. 56 13 13.3.2. Exercise. Compute the intersection P(P(P(∅))) ∩ P(P(∅)). 13.3.3. Exercise. Compute the set (P(P(P(∅))) ∩ P(P(∅))) \ P(∅). 13.3.4. Exercise. Compute the set (P(P(P(∅))) ∪ P(P(∅))) \ P(∅). 13.3.5. Exercise. Prove commutativity of intersection. 13.3.6. Exercise. Prove idempotency of intersection. 13.3.7. Exercise. Formulate and prove associativity of union. 13.3.8. Exercise. Formulate and prove commutativity of union. 13.3.9. Exercise. Formulate and prove idempotency of union. 13.3.10. Exercise. Prove that for arbitrary sets X and Y the following three conditions are equivalent to each other: (a) X ⊆ Y (b) X = X ∩ Y (c) Y = X ∪ Y 13.3.11. Exercise. Prove that union distributes over intersection. 13.3.12. Exercise. Prove that intersection distributes over union. 13.3.13. Problem. Prove that difference is not associative, is not commutative and that neither it is idempotent. 13.3.14. Problem (symmetric difference). Define symmetric difference of two sets X and Y to be X∆Y = (X \ Y ) ∪ (Y \ X). Prove that the symmetric difference is both associative and commutative. Is it idempotent? 13.3.15. Problem. Prove that there does not exist a set Y such that X ∪ Y = Y for any set X. Compare this result with Theorem 13.1.4. 13.3. EXERCISES 57 13.3.16. Research: topological spaces. Let X be a set. A topology τ on X is an element τ ∈ P(P(X)), satisfying the following three conditions: (a) ∅ ∈ τ ∧ X ∈ S τ (b) ∀S (S ⊆ τ ⇒ S ∈ τ) (c) ∀U ∀V ((U ∈ τ ∧ V ∈ τ ) ⇒ U ∩ V ∈ τ ) Notice that elements of a topology τ on a set X are subsets of X. Call these subsets τ -open sets. Then, the conditions above state the following: (a) The empty set, and the whole set X are τ -open sets. (b) Union of an arbitrary set of τ -open sets is a τ -open set. (c) Intersection of two τ -open sets is a τ -open set. Each set X can have several topologies. For example, for every set X, there are two canonically associated topologies: the discrete topology, where every subset of X is τ -open (i.e. τ = P(X)), and the indiscrete topology, where only X and ∅ are τ -open (i.e. τ = {∅, X}). A topological space is a pair (X, τ ) where X is a set and τ is a topology on X. Elements of X are then called “points” of the space, and elements of τ are called simply “open sets” (of the space). Discover topological spaces. CHAPTER 14 14.1. Product 14.1.1. Given two sets X and Y , we want to construct a set, which we will denote by X × Y , and which will satisfy ∀z (z ∈ X × Y 14.1.2. ⇔ ∃x ∃y (x ∈ X ∧ y ∈ Y ∧ z = (x, y))). The problem is, that we cannot just write X × Y = {(x, y) | x ∈ X ∧ y ∈ Y } since our language of set theory does allow us to write the term on the right hand side of the equality above. 14.1.3. Recall that a pair (x, y) is defined as the set (x, y) = {{x, y}, {x}} and therefore, it is an element of P(P{x, y}). 14.1.4. So, we can construct X × Y as follows: X × Y = {z ∈ P(P(X ∪ Y )) | ∃x ∃y (x ∈ X ∧ y ∈ Y ∧ z = (x, y))} This time, we are allowed to write the term appearing on the right hand side of the equality (see Chapter IV in Book III). 14.1.5. X × Y is called the (cartesian) product of X and Y . 14.2. Relations 14.2.1. Definition. A relation R is a pair R = (R, (X, Y )), where R, X, Y are sets with R being a subset of X × Y . The set X is said to be the domain of the relation (R, (X, Y )), the set Y is said to be its codomain, and the set R its graph. 58 14.3. EXERCISES 14.2.2. 59 We use the display X R / Y to indicate that R is a relation with domain X and codomain Y . We then say that R is a relation from X to Y . When a pair (x, y) is an element of the graph of R, we write xRy and say x is related to y (under the relation R). 14.2.3. relation The empty set ∅, being a subset of every set, defines a (∅,(X,Y )) /Y X which is called the empty relation from X to Y . 14.2.4. Notice that under the empty relation, no element of X is related to any element of Y , and moreover, this property can be used to define the empty relation. 14.2.5. Another obvious example of a relation from a set X to a set Y is the one whose graph is the product X × Y ; under this relation, every element of x is related to every element of y. 14.2.6. A relation from X to X is called a relation on X. A natural example of such a relation is the equality relation, i.e. the relation from X to X with graph R = {z ∈ X × X | ∃x (z = (x, x))}. In other words, under this relation, x is related to y if and only if x = y. 14.3. Exercises 14.3.1. Exercise. List all elements of {1, 2, 3} × {4, 5}. 14.3.2. Exercise. List all elements of P(∅) × P(P(∅)). 14.3.3. Exercise. If a set X has 200 elements, and a set Y has 300 elements, then how many elements does the set X × Y have? 14.3.4. Exercise. What is X × ∅ equal to? Prove your answer. 14.3.5. Exercise. Prove that for arbitrary set X and Y we have (((X × ∅) \ X) ∪ (∅ × Y )) ∩ (X × Y ) = ∅ 14.3.6. Exercise. Prove the following: ∃X (¬(X × X = X)) 60 14 14.3.7. Exercise. Prove that for arbitrary sets X, Y and Z, if X ⊆ Y then X × Z ⊆ Y × Z. 14.3.8. Exercise. Give five different examples of a relation from X = {1, 2, 3} to Y = {4, 5}. 14.3.9. Exercise. Prove that for arbitrary sets X and Y , and for any subset R of X × Y , there exists a relation from X to Y whose graph is R. 14.3.10. Exercise. Specify three different relations, all of which have the same graph R = {(0, 0), (1, 1), (1, 2)}. 14.3.11. Exercise. Give two different examples of an empty relation. 14.3.12. Exercise. Can a nonempty set be a graph of two different relations having two different domains? 14.3.13. Problem. Prove that for any set X and for any set Y , the formula in 14.1.1 is true. 14.3.14. Problem. How many relations are there from a set X with 2 elements to a set Y with 4 elements? 14.3.15. Application: modeling correspondences and constructing partitions. Explain in what sense do relations model correspondences within set theory. Define equivalence relations as relational counterparts of equivalences introduced in Book II. Describe the link between equivalence relations on a set C and partitions of a set C. The partition of C induced by an equivalence relation E on C is called a quotient of C and is often denoted by C/E. Give a formal construction of the quotient set C/E. 14.3.16. Research: ordered sets. An order on a set X is a relation 6 /X X satisfying the following three conditions: (a) ∀x (x ∈ X ⇒ x 6 x) (b) ∀x ∀y ((x 6 y ∧ y 6 x) ⇒ (x = y)) (c) ∀x ∀y ∀z ((x 6 y ∧ y 6 z) ⇒ x 6 z) An ordered set is a pair (X, 6) where X is a set and 6 is a relation from X to X which is an order. Describe all possible orders on the set X = {0, 1, 2, 3}. CHAPTER 15 15.1. Functions 15.1.1. Definition. A function is a relation X f / Y whose graph F satisfies the following conditions: (a) ∀x ((x ∈ X) ⇒ ∃y (xF y)) (b) ∀x ∀y ∀z ((xF y ∧ xF z) ⇒ (y = z)) 15.1.2. When, under a function, x is related to y, we say that the function assigns y to x, or, maps x to y. Thus, we could say that the two conditions defining a function together ensure nothing but that each element x of X is mapped to exactly one element y of Y . When x is mapped to y by a function f , we write this as f : x 7→ y. 15.1.3. For a symbol f which represents a pair (F, (X, Y )), we write f (x) to abbreviate the following: [ f (x) = {y ∈ Y | (x, y) ∈ F } We are going to use this abbreviation only in the case when f is a function and x ∈ X. Then, the set {y ∈ Y | (x, y) ∈ F } has exactly one element, and so f (x) is that unique element. In fact, f (x) is nothing but the element y ∈ Y which is assigned to x under the function f . 15.1.4. The equality relation from a set X to itself is clearly a function from X to X. It is called the identity function and is denoted by 1X . In other words, 1X is a function 1X : X → X satisfying ∀x (x ∈ X ⇒ 1X (x) = x). 15.1.5. A function, just as any relation, consists of its graph, domain and codomain. Thus, to specify a function we have to specify each of these three sets. 61 62 15 15.1.6. as, say The graph of a function can be specified by formulas, such f (x) = x + 5 which specifies the graph of a function f with domain {1, 2, 3}. 15.1.7. In particular, the above formula tells us that the graph R of f is the following set: R = {(1, 6), (2, 7), (3, 8)}. Indeed, by the above formula, we have: 6 is assigned to 1; 7 is assigned to 2; 8 is assigned to 3. 15.1.8. The term f (x) is often called the value of f at x. Two functions are equal precisely when they have the same domain, the same codomain and the same values. 15.1.9. Thus, in particular, if X is the domain of both f and g and Y is their codomain, then to show f = g is the same as to show that for any x in X we have f (x) = g(x). 15.2. Composition 15.2.1. Let f and g be functions, as in the following display: X f / Y g / Z 15.2.2. In other words, X is the domain of f , Y is the codomain of f and at the same time, it is the domain of g, and Z is the codomain of g. Here, we assume that X, Y and Z are arbitrary sets. 15.2.3. Then, the composite g ◦ f of the two functions is defined as the function from X to Z whose values are given as follows: (g ◦ f )(x) = g(f (x)) 15.2.4. We can use the following display, to show domains and codomains of all three functions f, g, g ◦ f : X f / Y g /4 Z g◦f 15.2.5. as the pair It is possible to explicitly construct the composite g ◦ f (C, (X, Z)), where C represents the set C = {c ∈ X × Z | ∃x ( c = (x, g(f (x))) )} 15.2. COMPOSITION 63 15.2.6. Notice that the same construction would define the meaning of a term g ◦ f even when f and g represent pairs (F, (X, Y )) and (G, (Y, Z)) which are not necessarily functions. However, we use the term g ◦ f only in those contexts where g and f are indeed functions. 15.2.7. Theorem. For any function f : X → Y we have f ◦ 1X = f ∧ 1Y ◦ f = f. 15.2.8. Proof. First we show f ◦ 1X = f . By the definition of composition we see that both f ◦ 1X and f have the same domain and the same codomain. This can be also directly verified from the following display: 1X X / f X /4 Y f ◦1X So now, to show f ◦1X = f all it remains to show is that for any element x in X we have (f ◦ 1X )(x) = f (x). Indeed, applying the definition of composition, we get: f ◦ 1X (x) = f (1X (x)) = f (x). The second equality 1Y ◦ f = f can be proved in a similar way. 15.2.9. Theorem (Associativity of composition). For any three functions f, g, h as in the display W f / g X / Y h / h / Z the outer composites in the display (h◦g)◦f h◦g W f / g X / 8 Y & AZ g◦f h◦(g◦f ) are equal, i.e. we have h ◦ (g ◦ f ) = (h ◦ g) ◦ f . 64 15 15.2.10. Proof. The fact that the two composites h ◦ (g ◦ f ) and (h ◦ g) ◦ f have the same domain and codomain can be seen from the above display. The following direct calculation shows that these two composites have the same values and hence are equal: (h ◦ (g ◦ f ))(w) = h((g ◦ f )(w)) = h(g(f (w))) = (h ◦ g)(f (w)) = ((h ◦ g) ◦ f )(w). 15.3. Exercises 15.3.1. Exercise. List all functions whose domain is the empty set ∅, and whose codomain is Y = {1, 2}. In other words, find all functions f : ∅ → {1, 2} 15.3.2. Exercise. How many functions are there from the set Y = {1, 2, 3, 4} to the empty set X = ∅? In other words, count the number of functions f : {1, 2, 3, 4} → ∅ 15.3.3. Exercise. Find a set Y such that there is exactly one function f : {1, 2} → Y . 15.3.4. Exercise. Let X and Y be any two sets. Consider the relation / X ×Y X whose graph is R = {z ∈ X × (X × Y ) | ∃x ∃y ( z = (x, (x, y)) )}. Suppose X = {1, 2, 3}. (a) Give an example of a set Y for which the above relation is a function. (b) Give an example of a set Y for which the above relation is not a function. 15.3.5. Exercise. Let X be any set. Consider the function π1 : X × X → X whose values are given by the formula π1 (x, y) = x. Does there exist a function δ : X → X × X such that π1 ◦ δ = 1X ? 15.3.6. Exercise. For any given set X, is it possible to find a set Y and functions f : X → Y and g : Y → X such that g ◦ f = 1X ? 15.3. EXERCISES 65 15.3.7. Exercise. Given an example of two functions f, g : {1, 2} → {1, 2} such that ¬(f ◦ g = g ◦ f ). 15.3.8. Exercise. Given an example of two functions f, g : {1, 2, 3} → {1, 2, 3} such that f ◦ g = g ◦ f , but neither of the two functions is the identity function. 15.3.9. Exercise. Prove that for any five functions as in the display U d / V e / W f / X g / Y h / Z we have: (h ◦ (g ◦ f )) ◦ (e ◦ d) = h ◦ (g ◦ (f ◦ (e ◦ d))) 15.3.10. Exercise. Let f : {1, 2} → {1, 2, 3} and g : {1, 2, 3} → {1, 2, 3, 4, 5} be functions defined as follows: f (x) = x + 1, g(y) = y + 2. Compute g ◦ f . 15.3.11. Exercise. Let f : {1, 2, 3} → {0, 1, 2} and g : {0, 1, 2} → {0, 1, 2, 3, 4, 5} be functions defined as follows: f (x) = x − 1, g(y) = y + 2 − f (y + 1). Compute g ◦ f . 15.3.12. Exercise. Let f : {0, 1, 2} → {0, 1, 2} be a function defined as follows: f (x) = 2 − x. Prove that (f ◦ f ) ◦ ((f ◦ f ) ◦ f ) = f ◦ (f ◦ f ). 15.3.13. Exercise. Complete the proof of Theorem 15.2.7: prove 1Y ◦ f = f . 15.3.14. Problem. Do Exercises 15.3.1 and 15.3.2, but for an arbitrary set Y . 15.3.15. Problem. Do Exercise 15.3.4, but for an arbitrary set X. 15.3.16. Problem. Characterize those sets X such that for any two functions f, g : X → X we have f ◦ g = g ◦ f . 66 15 15.3.17. Problem. For any set X, characterize those functions f : X → X such that f ◦ f = f . 15.3.18. Problem. Let X and Y be sets. Consider functions π1 : X × Y → X and π2 : X × Y → Y defined as follows: π1 (x, y) = x, π2 (x, y) = y. Prove that for any set C and for any two functions f : C → X and g : C → Y , there exists unique function h : C → X × Y such that π1 ◦ h = f and π2 ◦ h = g. Draw a diagram of arrows displaying all of the above mentioned functions. 15.3.19. Application: functions model mappings. Describe in what sense do functions model mappings within set theory. 15.3.20. Research project: Constructing addition of natural numbers. A natural number system is a pair (N, (s, 0)), where N is a set, s is a function s : X → X and 0 is an element of X, such that the following three conditions are satisfied: • For any element n in N , we have: ¬(s(n) = 0). • For all m, n ∈ N we have: s(n) = s(m) ⇒ n = m. • For any subset M ⊆ N , we have: if 0 ∈ M ∧ ∀n (n ∈ M ⇒ s(n) ∈ M ) then M = N . For a given natural number system (N, (s, 0)), elements of N are called natural numbers. For a natural number n, the natural number s(n) is called its successor . The last condition above is called the principle of mathematical induction. The numbers 1, 2, 3, ... can be defined as 1 = s(0), 2 = s(1), 3 = s(2), etc. The second condition above will ensure that numbers introduced in this way are all different from each other (as an exercise, prove that 2 is not equal to 3). Define addition of natural numbers in a natural number system, as a function N ×N + / N (whose values are written as x + y instead of +(x, y)), by explicitly constructing this function. Hint: first consider relations N ×N R / N that satisfy (n, 0)Rn, and (n, m)Rk ⇒ (n, s(m))Rs(k) 15.3. EXERCISES 67 for all n, m, k ∈ N . Then, construct the graph of + as the intersection of graphs of such relations, and using the principle of mathematical induction, prove that the relation + so obtained is in fact a function. CHAPTER 16 16.1. Exponentiation 16.1.1. If a set X has 2 elements and a set Y has 3 elements, then X × Y has 2 × 3 = 6 elements. Thus, the cartesian product of sets in some sense mimics multiplication of natural numbers. 16.1.2. What mimics, in a similar way, exponentiation of natural numbers? It turns out that Y X should be defined as the set of all functions with domain X and codomain Y . 16.1.3. A function from a set X to a set Y is a particular kind of a pair (R, (X, Y )), and thus it is an element in P(X × Y ) × (P(X) × P(Y )). 16.1.4. Let ϕ(f, F ) be the formula stating that if F = (A, B) for some sets A and B, then f is a function from A to B. 16.1.5. Then, we can construct the set Y X of all functions from X to Y as follows: Y X = {f ∈ P(X × Y ) × (P(X) × P(Y )) | ϕ(f, (X, Y ))} 16.2. Addition 16.2.1. We now ask a similar question as above for addition of natural numbers. Unfortunately, union of two sets does not give the right answer as exhibited by the following example: X = {1, 2} and Y = {1, 3} both have 2 elements, but their union X ∪ Y = {1, 2, 3} has three elements. 16.2.2. Notice that if above X and Y did not share any common element, then X ∪ Y would have 4 elements. 16.2.3. The sum X + Y of two sets X and Y is defined as the set X + Y = (X × {∅}) ∪ (Y × {{∅}}). 68 16.3. EXERCISES 69 16.2.4. No element of X ×{∅} can be equal to an element of Y × {{∅}}, since an element of X × {∅} is a pair whose second component is ∅ and an element of Y × {{∅}} is a pair whose second component is {∅} (which si not equal to ∅). 16.2.5. Thus, the number of elements of X + Y should be the sum of the number of elements in X and the number of elements in Y . 16.2.6. In mathematics, the sum X + Y is more commonly know as the disjoint union of X and Y and is often written as X t Y . 16.3. Exercises 16.3.1. Exercise. List all elements of Y X where X = {1, 2, 3} and Y = {0, 1}. 16.3.2. Exercise. List all elements of X+(X X ) where X = {1, 2}. 16.3.3. Exercise. Find a set X such that X = ∅ + X. 16.3.4. Exercise. Use the set-theoretic insight to exponentiation to conclude how should 00 be defined. 16.3.5. Problem. Prove that if X + Y = A + B then X = A and Y = B. 16.3.6. Problem. Let X and Y be sets. Consider the functions ι1 : X → X + Y and ι2 : Y → X + Y defined as follows: ι1 (x) = (x, 1), ι2 (y) = (y, 2) Prove that for any set C and for any two functions f : X → C and g : Y → C, there exists unique function h : X + Y → C such that h◦ι1 = f and h◦ι2 = g. Draw a diagram of arrows displaying all of the above mentioned functions, and compare it with the diagram arising in Problem 15.3.18. 16.3.7. Research: Monoids. A monoid is a pair (M, (m, i)) where M is a set, m is a function m : M × M → M , and i is an element of M such that the following conditions hold: (a) For any element x in M we have m(x, i) = x and m(i, x) = x. (b) For arbitrary elements x, y and z in M we have m(x, m(y, z)) = m(m(x, y), z). 70 16 Any set A gives rise to a monoid where M = AA , the function m is defined by m(f, g) = f ◦ g, and i = 1A . Such a monoid is called a monoid of endofunctions. Give a full description of any specific monoid (M, (m, i)) of endofunctions, such that M has exactly four elements. Find other monoids having exactly four elements. Book V Infinities and Numbers CHAPTER 17 17.1. Injections and surjections 17.1.1. Definition. A function f : X → Y is said to be injective if for any two elements a and b of X we have f (a) = f (b) ⇒ a = b. Equivalently, f is injective when ¬(a = b) implies ¬(f (a) = f (b)) (that is, distinct elements of X are mapped to distinct elements in Y ). An injection is an injective function. 17.1.2. Injectivity of a function can be also defined “without mentioning elements”: 17.1.3. Theorem. A function f : X → Y is injective if and only if for any set C and for any two functions a, b as in the display C a // X f / Y b we have f ◦ a = f ◦ b ⇒ a = b. 17.1.4. Proof. Suppose f is injective. Let a and b be two functions as in the theorem. To prove a = b we have to prove a(c) = b(c) for any element c in C. By assumption, f ◦ a = f ◦ b, and so f (a(c)) = f (b(c)). Then, injectivity of f gives a(c) = b(c). Now, suppose f satisfies the stated condition. To show that f is injective, suppose f (a) = f (b) for some a and b in X. We want to prove that a = b. For this, take C = {∅} and defined two functions u and v from C to X by setting u(∅) = a and v(∅) = b. Then, f ◦ u = f ◦ v. The assumption on f implies u = v. Hence a = b. 17.1.5. The “dual” of the above theorem, which is obtained by a formal procedure of reversing arrows in the above theorem, and accordingly, swapping around the order in which these arrows are composed, will give a characterization of “surjective functions” in the following sense: 72 17.2. BIJECTIONS 73 17.1.6. Definition. A function f : X → Y is said to be surjective if for any element y in Y there exists an element x in X such that f (x) = y. A surjection is a surjective function. 17.2. Bijections 17.2.1. A function f : X → Y is said to be invertible when there exists a function g : Y → X such that g ◦ f = 1X and f ◦ g = 1Y . Such function g is called an inverse of f . 17.2.2. Each invertible function has unique inverse. Indeed, suppose g and g 0 are two inverses of f . Then g = g ◦ 1Y = g ◦ f ◦ g 0 = 1X ◦ g 0 = g 0 . 17.2.3. The unique inverse of an invertible function f is often denoted by f −1 . 17.2.4. Note that when f is invertible, its inverse f −1 is also invertible and moreover, (f −1 )−1 = f. 17.2.5. Definition. A function which is both injective and surjective at the same time, is said to be bijective. A bijection is a bijective function. 17.2.6. Theorem. A function f : X → Y is invertible if and only if it is a bijection. 17.2.7. Proof. Suppose first that f is invertible. Then for any a, b ∈ X we have f (a) = f (b) ⇒ f −1 (f (a)) = f −1 (f (b)) ⇒ a = b. This shows that f is injective. To show that f is surjective, let y be an arbitrary element of Y . We need to find an element x ∈ X such that f (x) = y. Take x = f −1 (y). Then f (x) = f (f −1 (y)) = y. This shows that f is bijective. Suppose now that f is bijective. Then define a relation g : Y → X by taking its graph to be G = {z ∈ Y × X | ∃x (z = (f (x), x))} The fact that the relation g is in fact a function is equivalent to the fact that f is bijective. It is now easy to verify that this function g is the inverse of f . 74 17 17.3. Exercises 17.3.1. Exercise. Let X be any set. Prove that the function δ : X → X × X defined by δ(x) = (x, x) is injective. 17.3.2. Exercise. Let X be any set. Prove that the function π1 : X × X → X defined by π1 (x, y) = x is surjective. 17.3.3. Exercise. Give an example of sets X and Y such that the function π1 : X × Y → X defined by π1 (x, y) = x is not surjective. 17.3.4. Exercise. State the dual of Theorem 17.1.3. 17.3.5. Exercise. When is the empty function ∅ → Y injective / surjective / bijective? 17.3.6. Exercise. (a) Prove that if functions f : X → Y and g : Y → Z are injective, then so is their composite g ◦ f . (b) Prove that the same is true when “injective” above is replaced with “surjective”. (c) Conclude from above that if functions f : X → Y and g : Y → Z are bijective, then so is their composite g ◦ f . 17.3.7. Exercise. Derive 17.3.6(b) above from the dual of Theorem 17.1.3. 17.3.8. Exercise. Let U be a universe of small sets. Prove that the function U → U which assigns to each element x ∈ U the set {x} is an injective function. 17.3.9. Problem. Give the details of the last step in the proof of Theorem 17.2.6 (i.e. verify that the relation g is indeed a function, and moreover, that g is the inverse of f ). 17.3.10. Problem. Prove that any function f : X → Y can be represented as a composite f = gh where g is an injective function and h is a surjective function. 17.3. EXERCISES 75 17.3.11. Problem. Consider a composite f g of two functions. Prove that if any one of these functions is a bijection, then the second function is injective / surjective if and only if so is the composite f g. 17.3.12. Problem. Solve the previous problem by an immediate application of Theorem 17.1.3 and its dual (Exercise 17.3.4). 17.3.13. Application: representation of monoids. Define an “isomorphism” of monoids as a structure-preserving bijection between mon-oids, and prove that from any monoid there exists an isomorphism to a “submonoid” of the monoid of endofunctions on some set. 17.3.14. Research: discovering the notion of a group. Endofunctions on a set form a monoid under composition. Describe a structure obtained by invertible endofunctions, calling such a structure a group. Obtain representation of groups: prove that from any group there exists an isomorphism to a “subgroup” of the group of invertible endofunctions on some set. CHAPTER 18 18.1. Bijective sets 18.1.1. Given two sets X and Y , we write X ≈ Y , and say that X is bijective to Y , when there exists a bijection from X to Y . 18.1.2. Intuitively, we can think of X ≈ Y as X having the same number of elements as Y , since existence of a bijection X → Y means that we can pair distinct elements from X with distinct elements from Y in such a way that exhausts both sets. 18.1.3. The correspondence X ≈ Y has the following properties: For all sets X, Y , Z we have: X≈X (reflexivity) X≈Y ⇒ Y ≈X (symmetry) X ≈ Y ∧ Y ≈ Z ⇒ X ≈ Z (transitivity) 18.1.4. It is also not difficult to show that if X ≈ X 0 and Y ≈ Y 0 then 0 X × Y ≈ X 0 × Y 0 , X + Y ≈ X 0 + Y 0 , Y X ≈ Y 0X . 18.1.5. Bijections often arise when objects of a given type can be ‘nicely’ described in terms of objects of another type. 18.1.6. For example, specifying a subset of a set X amounts to specifying for each element x ∈ X whether x is included in the subset or not. Thus, a subset of X can be described by a function from X to a two-element set. This gives: 18.1.7. Theorem. For any set X, P(X) ≈ {∅, {∅}}X 18.1.8. Proof. We can construct a bijection f : {∅, {∅}}X → P(X) as follows: for each function a : X → {∅, {∅}} define f (a) = {x ∈ X | a(x) = {∅}}. 76 18.2. INFINITIES 77 18.1.9. In mathematics one often solves a problem for a given set A by first transferring the problem to a bijective set B where the problem may become easier. 18.1.10. For example, suppose we want to count the number of elements in A = P(X) where X is a set with 16 elements. By the above result, A has the same number of elements as B = {∅, {∅}}X . But the number of elements in B is 216 , which is witnessed by the fact that specifying a single function X → {∅, {∅}} amounts to making 16 independent choices between the two elements of {∅, {∅}}. 18.2. Infinities 18.2.1. Definition. A set X is said to be infinite if there exists an injection f : X → X which is not a surjection. 18.2.2. For example, the universe U of small sets is an infinite set. Indeed, the function f : U → U defined by f (x) = {x} is injective but non-surjective since the empty set ∅ can never be of the from {x}. 18.2.3. We apply Exercise 17.3.6 from the previous chapter to prove the following 18.2.4. Theorem. If X ≈ Y and X is an infinite set, then Y is an infinite set. 18.2.5. Proof. Let f : X → X be a non-surjective injection (it exists since X is infinite). Since X ≈ Y there exists a bijection g : X → Y . Consider the composite h = g ◦ f ◦ g −1 : Y → Y . Since the functions g, f , and g −1 are all injective, we get that h is injective. Next, we note that g −1 ◦ h ◦ g = f . So, since both g and g −1 are surjective, if h was surjective then f would have been surjective. Since we know that f is not surjective, we get that h is not surjective. 18.2.6. The following theorem shows that there can be infinities of different sizes: 18.2.7. Theorem. If X is an infinite set then P(X) is also infinite. Moreover, X is never bijective to P(X). 78 18 18.2.8. Proof. Let X be an infinite set. Then there exists a nonsurjective injection f : X → X. From f we construct a non-surjection injection g : P(X) → P(X) as follows: g(A) = {x ∈ X | ∃a (a ∈ A ∧ f (a) = x)}. To prove that X is not bijective to P(X) we show that any function f : X → P(X) is non-surjective. For this, given f , we construct an element A ∈ P(X) such that for any x ∈ X we have f (x) 6= A. Let A be the set A = {x ∈ X | x ∈ / f (x)} Now take any element x ∈ X. We prove that f (x) 6= A. For this we consider two cases: when x ∈ / f (x) and when x ∈ f (x). First, suppose x∈ / f (x). Then x ∈ A and so f (x) 6= A. Now suppose x ∈ f (x). Then x∈ / A and so again f (x) 6= A. 18.3. Exercises 18.3.1. Exercise. Prove that we always have X + Y ≈ Y + X. 18.3.2. Exercise. Prove that we always have X × Y ≈ Y × X. 18.3.3. Exercise. Prove that we always have X × (Y + Z) ≈ (X × Y ) + (X × Z). 18.3.4. Exercise. Establish any one of the bijections in 18.1.3. 18.3.5. Exercise. Establish any one of the bijections in 18.1.4. 18.3.6. Problem. Construct the inverse of the function f defined in the proof of Theorem 18.1.7. 18.3.7. Problem. Prove that the set of all small sets X which are not bijective to the set {∅} is infinite. 18.3.8. Problem. Prove that the function g constructed in the proof of Theorem 18.2.7 is indeed a non-surjective injection. 18.3.9. Problem. Prove that we always have (X Y )Z ≈ X Y ×Z . 18.3.10. Problem. Prove that we always have X Y +Z ≈ X Y ×X Z . 18.3.11. Problem. Prove that we always have X Z × Y Z ≈ (X × Y )Z . 18.3.12. Research: ordering infinities. Introduce a relation 6 on the set U of all small sets so that the intuitive meaning of X 6 Y would be that X has less or equal number of elements than Y . Study properties of this relation. CHAPTER 19 19.1. Cardinal numbers 19.1.1. mula We can partition a universe U of (small) sets by the for%(X, Y ) : “X ≈ Y ”. 19.1.2. bers. Elements of such partition of U are called cardinal num- 19.1.3. Each cardinal number is a set which consists of (small) sets having equal amount of elements. The cardinal number itself can then be thought as the number which gives a measure to this amount. Thus, we can intuitively think of cardinal numbers as numbers obtained by counting elements in sets. 19.1.4. Given a small set X, we write |X| for the cardinal number |X| = {Y ∈ U | X ≈ Y } which we call the cardinality of X. 19.1.5. Addition, multiplication and exponentiation of cardinal numbers can be defined via addition, multiplication and exponentiation for sets. 19.1.6. For example, given two cardinal numbers n and m, to define their sum n + m we set n + m = {A ∈ U | ∃X ∃Y (X ∈ n ∧ Y ∈ m ∧ A ≈ X + Y )} after which we should of course verify that the set n + m is indeed a cardinal number. 19.1.7. In other words, we have to check that n + m is a valid %-class, which is a routine work left as an exercise (see Problem 19.3.5). 79 80 19 19.1.8. Multiplication and exponentiation of cardinal numbers are defined similarly: n · m = {A ∈ U | ∃X ∃Y (X ∈ n ∧ Y ∈ m ∧ A ≈ X × Y )} mn = {A ∈ U | ∃X ∃Y (X ∈ n ∧ Y ∈ m ∧ A ≈ Y X )} 19.1.9. Theorem. For any two cardinal numbers n and m we have n+1=m+1 ⇒ n=m where 1 denotes the cardinal number 1 = |{∅}|. 19.1.10. Proof. Suppose n + 1 = m + 1. Let X be a set having cardinality n and let Y be a set having cardinality m. Consider the sets X 0 = X × {∅} and Y 0 = Y × {∅}. Then X ≈ X 0 and Y ≈ Y 0 , which implies |X 0 | = n and |Y 0 | = m. Notice that since X 0 is a set of pairs, we have ¬(∅ ∈ X 0 ). Similarly, ¬(∅ ∈ Y 0 ). Then, X 0 +{∅} ≈ X 0 ∪{∅} and Y 0 +{∅} ≈ Y 0 ∪{∅}. So, |X 0 ∪{∅}| = n+1 and |Y 0 ∪{∅}| = m+1. Now, if n + 1 = m + 1 then there is a bijection f : X 0 ∪ {∅} ≈ Y 0 ∪ {∅}. Using f we construct a function g : X 0 → Y 0 . For x ∈ X 0 we define g(x) as follows: f (x) if f (x) 6= ∅, g(x) = f (∅) if f (x) = ∅. A simple case-study will show that g is a bijection. The existence of a bijection g : X 0 → Y 0 implies n = m. 19.2. Natural numbers 19.2.1. We can individually define natural numbers, say, 0, 1, 2, 3, 4, 5, to be the cardinal numbers 0 = |∅|, 1 = |{∅}|, 2 = 1 + 1, 3 = 2 + 1, 4 = 3 + 1, 5 = 4 + 1. We can see here a pattern that can allow us to define larger numbers, but we would never be able to define all natural numbers this way, and in particular, this means that we might not be able to construct the set N of all natural numbers. However, it turns out that it is still possible to define all natural numbers at once, using an intermediate notion of an inductive set. 19.2.2. A subset B ⊆ C of the set C of cardinal numbers is said to be inductive if for any cardinal number b in B we have b + 1 ∈ B, where 1 denotes the cardinal number 1 = |{∅}|. 19.3. EXERCISES 81 19.2.3. Definition. A natural number is a cardinal number which is an element of every inductive set of cardinal numbers that contains the number 0 = |∅|. 19.2.4. The above definition gives a way to express the idea that a natural number should be defined as a cardinal number which can be obtained from the number 0 by repeatedly adding 1 to it. 19.2.5. Lemma. The set N of natural numbers contains 0 and is inductive. 19.2.6. Proof. 0 trivially satisfies the definition of a natural number, and so 0 ∈ N. Next, we prove that N is inductive. Suppose n is a natural number. To prove that n + 1 is a natural number, we must prove that n + 1 is an element of every inductive set B that contains 0. Let B be any such set. Since n is a natural number, n ∈ B. Since B is inductive, n + 1 ∈ B. 19.2.7. Theorem. The set N of natural numbers is an infinite set. 19.2.8. Proof. Consider the function f : N → N defined by f (n) = n + 1 where 1 denotes the cardinal number 1 = |{∅}|. By Theorem 19.1.9, f is injective. On the other hand, f (n) can never be equal to 0 and so f is not surjective. This shows that N is an infinite set. 19.3. Exercises 19.3.1. Exercise. Prove that the numbers 2 and 3 as defined in 19.2.1, are natural numbers. 19.3.2. Exercise. Prove that 2 × 2 = 2 + 2. 19.3.3. Exercise. Prove that for any cardinal number n we have n + 0 = n. 19.3.4. Exercise. Prove that for any cardinal number n we have n 6= 2n . 19.3.5. Problem. Check that for any two given cardinal numbers n and m, the sets n + m, n · m and mn (which were defined in the first section) are indeed cardinal numbers. 19.3.6. Research: cardinal arithmetic. Establish properties of the addition, multiplication and exponentiation of cardinal numbers. 82 19 19.3.7. Research: finite sets. Define finite sets as those sets which are not infinite, and study whether finite sets are the same as those sets whose cardinality is a natural number. CHAPTER 20 20.1. Mathematical induction 20.1.1. The principle of mathematical induction states that given a formula ϕ(n), if we can show that ϕ(0) holds true and for any natural number n we have ϕ(n) ⇒ ϕ(n + 1), then we can conclude that ϕ(n) holds true for any natural number n. 20.1.2. From the way we defined natural numbers, the above principle can be easily verified: 20.1.3. Proof of mathematical induction. Consider the set F = {n ∈ N | ϕ(n)}. When ϕ(0) holds true, 0 ∈ F . When we have ∀n (n ∈ N ⇒ (ϕ(n) ⇒ ϕ(n + 1))), the set F is inductive. Indeed, for any natural number n we have the following chain of implications: n ∈ F ⇒ ϕ(n) ⇒ ϕ(n + 1) ⇒ n + 1 ∈ F. Now, by definition of natural numbers, every natural number must be an element of F , which means that ϕ(n) holds for every natural number. 20.1.4. To illustrate a proof by mathematical induction, we prove the following basic result: 20.1.5. Theorem. For any two natural numbers m and n, their sum m + n is also a natural number. 20.1.6. Proof. For any fixed natural number m, let ϕ(n) denote the expression m+n ∈ N, where N is the set of all natural numbers. We prove that ϕ(n) holds true for any n. By the principle of mathematical induction it suffices to prove that ϕ(0) holds true and ϕ(n) ⇒ ϕ(n+1) for any natural number n. We have: m + 0 = m ∈ N which proves ϕ(0). To prove ϕ(n) ⇒ ϕ(n + 1) assume that ϕ(n) holds true. Then 83 84 20 n + m ∈ N. We have: m + (n + 1) = (m + n) + 1 ∈ N since N is inductive, which proves ϕ(n + 1). This completes the proof. 20.2. Counting systems 20.2.1. Definition. A counting system is a pair (X, (f, i)) where X is a set, f is a function f : X → X and i ∈ X. The set X in (X, (f, i)) is called the underlying set of the counting system. Given two counting systems X = (X, (f, i)) and Y = (Y, (g, j)), a translation from X to Y is a function T : X → Y between the underlying sets, such that T ◦ f = g ◦ T and T (i) = j. 20.2.2. Intuitively, elements of the set X in a counting system (X, (f, i)) represent figures we can assign to those objects that we intend to count, the value f (x) represents the increment of x (i.e. f (x) represents the figure we will use immediately after we already used figure x), whereas i represents the first figure we use when we begin counting. 20.2.3. Then, translation from one counting system to another can be seen as a way to replace figures from the “old” counting system with figures of the “new” counting system, in such a way that the counting “structure” is preserved: the initial figure i from the old system must be replaced with the initial figure j in the new system; further, if a figure y succeeds a figure x in the old counting system, then the figure that replaces y must still succeed the figure that replaces x in the new counting system. 20.2.4. The set N of natural numbers gives rise to a counting system (N, (s, 0)) where s : N → N is defined by s(n) = n + 1. The counting system (N, (s, 0)) is called the natural number system. According to the following theorem the natural number system is a “universal” counting system: 20.2.5. Theorem. The natural number system has the following universal property: for any counting system (X, (f, i)), there is a unique translation from the natural number system (N, (s, 0)) to (X, (f, i)). 20.2.6. Proof (Sketch). Consider the set A = {a ∈ P(N×X) | (0, i) ∈ a ∧ ∀n ∀x ((n, x) ∈ a ⇒ (s(n), f (x)) ∈ a)} Now consider the intersection of all elements of A: \ [ B= A = {b ∈ A | ∀a (a ∈ A ⇒ b ∈ a)} 20.3. EXERCISES 85 Notice that B ⊆ N × X. Consider the formula ϕ(n) which states that there exists a unique x ∈ X such that (n, x) ∈ B. We use the principle of mathematical induction to show that ϕ(n) holds true for any natural number n ∈ N. For this first we need to show that ϕ(0) holds true. Indeed, it is easy to show that (0, i) ∈ B. Now, for any x 6= i we have B\{(0, x)} ∈ A. This implies that B ⊆ B\{(0, x)} and so (0, x) cannot be an element of B. Thus, x = i is unique with the property (0, x) ∈ B which proves ϕ(0). Next step in the mathematical induction is to assume that ϕ(n) holds true and deduce from it that ϕ(n+1) holds true. Suppose ϕ(n) holds true and let x be the unique element of X such that (n, x) ∈ B. Then it is easy to see that (n + 1, f (x)) = (s(n), f (x)) ∈ B. Now we can apply a similar argument as before to show that for any y 6= f (x) we have (s(n), y) ∈ / B, which makes y = f (x) the unique y such that (n + 1, y) ∈ B. This would prove ϕ(n + 1) and hence would complete proof by induction. Since ϕ(n) holds true for any n ∈ N we get that T = (B, (N, X)) is a function from N to X. It is easy to see that in fact this function is a translation from the counting system (N, (s, 0)) to the counting system (X, (f, i)). We can use mathematical induction to prove that any two translations must be equal to each other, thus proving that T is the unique translation. 20.3. Exercises 20.3.1. Exercise. Use Theorem 20.1.5 and the mathematical induction to prove that if n and m are natural numbers, then their product n · m is also a natural number. 20.3.2. Exercise. An even number is a natural number n such that there exists a natural number m for which 2 · m = n. Prove by mathematical induction that for any natural number n we have: n is even or n + 1 is even. 20.3.3. Exercise. Prove that for any three natural numbers l, m, n, the equality m + l = n + l always implies m = n. 20.3.4. Exercise. Given an example of a counting system (X, (f, i)) such that |X| = 3. 20.3.5. Problem. Prove that if n and m are natural numbers, then mn is also a natural number (Hint: use Exercise 20.3.1 and the mathematical induction). 86 20 20.3.6. Problem. For natural numbers n and m, set m 6 n when there exists a natural number k such that m + k = n. Use Exercise 20.3.3 to prove that if m 6 n and n 6 m then n = m. Further, prove that for any two natural numbers n and m we have: n 6 m or m 6 n. 20.3.7. Problem: multiplication via addition. Using Application 20.3.9 below, express rigorously and then prove the intuitive fact that if we add a natural number m to itself n times then we get the number m · n: m·n=m · · + m} . | + ·{z n 20.3.8. Problem. Use mathematical induction to prove that for any natural number n we have 2 · (1 + · · · + n) = n · (n + 1). For the definition of the sum 1 + · · · + n, see Application 20.3.10. 20.3.9. Application: powers of functions. Let X be a set, and let a be a function a : X → X. Consider the counting system (X X , (f, 1X )) where f : X X → X X is defined as follows: f (b) = a ◦ b. Let T denote the unique translation T : (N, (s, 0)) → (X X , (f, 1X )) from the natural number system to the counting system (X X , (f, 1X )). For a natural number n define an to be the function an = T (n) : X → X. The intuitive understanding of an is that an is the “n-fold composite” of a with itself: an = a · · ◦ a} | ◦ ·{z n Show that for any two natural numbers n and m we have an+m = an ◦ am . 20.3.10. Application: sum of a sequence of consecutive numbers. Use a similar idea as in Application 20.3.9 to define the sum of all natural numbers starting from 1 and ending with a given natural number n, n X m = 1 + · · · + n. m=1 20.3. EXERCISES 87 (Hint: use the counting system (N × N, (f, (0, 0))) where f : N × N → N × N is defined by f (n, m) = (n + (m + 1), m + 1).) 20.3.11. Research: elementary number theory. Study further the natural number system. Index Inductive set, 80 Infinite set, 77 Injection, 72 Intersection, 54 Inverse of a function, 73 Invertible function, 73 Bijection, 73 Bijective sets, 76 Cardinal number, 79 Cardinality, 79 Cartesian product, 58 Class, 21, 49 Codomain, 58 Conjunction, 6 Constructive language, 48 Correspondence, 27 Counting system, 84 Large set, 49 Mapping, 28 Mathematical induction, 66 Mathematical language, 3 Model, 43 Monoid, 69 Difference, 55 Disjoint union, 69 Disjunction, 7 Distributivity, 55 Domain, 58 Dual formulas, 8 Natural number, 66, 81 Natural number system, 40, 66, 84 Negation, 13 Notation and symbols +, 68 [X : ...], 45 ∆, 56 ⇒, S 14 X, 49 ∩, 54 ∃, 9 ∀, 9 ∈, 24 P(X), 49 ¬, 13 \, 55 ⊆, 24 ×, 58 ∅, 54 ∨, 7 ∧, 6 {x, y}, 48 Element, 24, 41 Empty relation, 59 Empty set, 24, 50, 54 Endocorrespondence, 31 Equality relation, 59 Equivalence, 32 Equivalence relation, 60 Equivalent formulas, 8 Even number, 85 Formula, 3 Function, 61 Graph, 40, 58 Group, 75 Identity function, 61 Implication, 14 88 INDEX f (x), 61 One-to-one correspondence, 32 Open set, 57 Order, 60 Ordered set, 40, 60 Pair, 26, 39 Partition, 20 Powerset, 38, 49 Quantified letter, 10 Quantifiers, 9 Quotient, 60 Reflexivity, 76 Relation, 58 Set, 41, 49 Set theory, 40, 41 Small set, 38, 49 Subset, 24, 42, 49 Successor, 66 Surjection, 73 Symbol ∩, 55 ∅, 50 Symmetric difference, 56 Symmetry, 76 Term, 48 Topological space, 57 Topology, 57 Transitivity, 76 Translation, 84 Truth table, 6 Union, 49 Union of the sets, 55 Universe, 38, 49 Value of a function, 62 89