Summary
This lesson fixes the language in which the course speaks of numbers and functions, together with what is indispensable from the logic of quantifiers. It defines inclusion and the operations on sets, proves equality by double inclusion and De Morgan’s laws, constructs the ordered pair with its characteristic property, and defines the Cartesian product and relations with their properties. It proves that the classes of an equivalence form a partition and that every partition defines an equivalence, anticipating the construction of the integers; it studies orders with their extreme elements and their bounds; and it treats functions as relations, proving that composition is associative and preserves injectivity and surjectivity, and that a function is bijective if and only if it has an inverse, which is unique. The problems count equivalences, pair the natural numbers with the even numbers, find the day of the week of a date, and decompose every function into a surjection, a bijection and an injection.
Learning objectives
- Write statements with quantifiers in symbolic language, negate them correctly and choose the proof strategy that their logical form calls for.
- Prove equalities and inclusions between sets by double inclusion, and compute unions, intersections, differences, Cartesian products and power sets of finite sets.
- Decide whether a relation is reflexive, symmetric, antisymmetric or transitive, and recognize equivalence relations and order relations.
- Construct the classes and the quotient set of an equivalence relation, and pass from an equivalence to the partition it defines, and conversely.
- Determine the least, greatest, minimal and maximal elements and the bounds of a subset of an ordered set.
- Compute images, preimages, compositions and inverses, decide whether a function is injective, surjective or bijective, and prove properties of composition.
The language of the course
The next lesson defines the natural numbers by means of a function, the successor, which is injective and does not reach . The next unit constructs the integers and the rational numbers as classes of an equivalence relation; the lesson on combinatorics defines the number of elements by means of bijections; the order of the natural numbers is an order relation; and the third unit composes and inverts real functions. All these words belong to a single language, which should be fixed before it is used, together with the first theorems that the course will invoke later.
It is worth pointing out what is anticipated. The examples use small natural numbers with their order, their addition, their multiplication, divisibility and the remainder of a division, as they are learned at school. The next lesson defines the natural numbers by means of the Peano axioms, and the lessons of the unit define those operations and prove their properties without using any example from this one, so there is no circularity. No theorem of this lesson depends on the examples: the numbers only serve to show the theorems in action.
What is admitted
A set is a collection of objects, its elements; one writes to say that belongs to , and to deny it. Set and membership are not defined: they are primitive notions, like and the successor in arithmetic. However, not every property defines a set. If there existed the set of all sets that do not belong to themselves, the question whether belongs to would have no answer, because by the definition of one would have . This contradiction, discovered by Russell in 1901, forces a restriction on the formation of sets: a property only selects elements of a set already given.
Admitted fact (rules of naive set theory). The rules of naive set theory that this lesson uses are admitted without proof: two sets with the same elements are equal; from a given set and a property one forms the set of the elements of that satisfy it; and there exist the empty set, the set whose only elements are and , the union of the elements of a set of sets, and the set of the subsets of a set. The existence of a set with the properties of the set of natural numbers is admitted in the next lesson.
These rules are part of the axioms of Zermelo and Fraenkel, whose study belongs to set theory and goes beyond this course; that is why they are admitted, and they are stated so that it is known exactly what is used.
The logic of quantifiers
Proofs combine statements with the connectives , , , and , whose laws are studied in the complementary course Mathematical Logic I: Propositional Logic, starting from its language; here it suffices to recall that the implication is false only when is true and false, that it is equivalent to its contrapositive , and that De Morgan’s laws negate a conjunction or a disjunction:
To speak of sets one also needs statements about all elements or about some of them. If is a property of the elements of , the statement , which is read “for every in , ”, asserts that all the elements of satisfy it; the statement , “there exists an in such that ”, asserts that at least one satisfies it; and asserts that exactly one satisfies it. The symbols and are called quantifiers, universal and existential.
Admitted fact (negation of quantifiers). To deny that all elements satisfy a property is to assert that some element does not satisfy it, and to deny that some element satisfies it is to assert that none does:
These rules, which belong to first-order logic, are admitted; they extend De Morgan’s laws, because if the universal statement is and the existential one is . The order of the quantifiers matters: the statement says that every natural number has a greater one, and it is true; the statement says that there is a natural number greater than all of them, greater even than itself, and it is false.
The logical form of a statement dictates the way to prove it. The strategies that this lesson uses are the following; their logical justification is studied in the lesson on deduction techniques.
- To prove , take an arbitrary element of , assuming nothing about it beyond its membership in , and prove .
- To prove , exhibit a specific element of that satisfies ; to refute , a counterexample suffices, an element that does not satisfy it.
- To prove , assume and deduce ; or prove the contrapositive ; or assume and reach a contradiction.
- To prove , prove the two implications and .
A set of natural numbers is bounded above when there is a natural number greater than or equal to all its elements. Write the definition with quantifiers and negate it step by step.
Proof
The definition has an existential quantifier followed by a universal one: the same must work for all the elements.
We negate the whole statement.
The negation of an existential statement is the universal statement of the negation.
The negation of a universal statement is the existential statement of the negation.
By the trichotomy of the order of the natural numbers, to deny is to assert : the set is not bounded above when no natural number is an upper bound, because every candidate is exceeded by some element.
Sets
Membership, equality and inclusion
A set is described by listing, enumerating its elements between braces, as , or by set-builder notation, by means of a property, as , which is the same set. The rule of extensionality says that a set is determined by its elements:
It follows that in a description by listing neither the order nor repetitions matter: and are the same set, because they have the same elements. It also follows that there is only one set without elements, the empty set : two sets without elements have the same elements, namely none.
Definition (inclusion). A set is contained in a set , or is a subset of , when every element of is an element of :
If, moreover, , one says that is a proper subset of .
The empty set is contained in every set , because the implication always has a false antecedent and is therefore true. Membership must be distinguished from inclusion: and are true, whereas is false, because the only elements of are and , and the set is equal to neither of them: , because the set whose only element is is not to be confused with , and .
For all sets , and , inclusion is reflexive, ; transitive, if and , then ; and antisymmetric, if and , then . The last property, together with its converse, which is immediate, is the method of double inclusion: to prove that two sets are equal, one proves that each is contained in the other.
Each property reduces to a law of implication, applied to an arbitrary element. The figure represents the sets as regions of the plane.
Proof
Reflexivity: for every , the implication is true, because its consequent is its antecedent.
Transitivity: let be an arbitrary element of . By the first hypothesis, belongs to .
By the second hypothesis, belongs to . Since was arbitrary, .
Antisymmetry: the two hypotheses give, for each , the two implications between and , that is, their equivalence.
By extensionality, and are equal. Conversely, if , each is contained in the other by reflexivity.
Union, intersection and difference
Definition (operations on sets). The union of and is the set of the elements that belong to at least one of them; the intersection, the set of those that belong to both; and the difference , the set of those that belong to and not to :
If , the difference is called the complement of relative to . Two sets are disjoint when their intersection is empty.
Each operation translates a connective: union, disjunction; intersection, conjunction; difference, conjunction with a negation. If this is so, each logical law produces a law of sets: union and intersection are commutative, associative and distributive over each other because the connectives are, and all these laws are proved like the following theorem. The complement is always taken relative to a reference set, because a set of everything that is not in would rebuild Russell’s paradox.
Let be the set of the divisors of and that of the divisors of . Compute their union, their intersection and their two differences.
Proof
The common elements are the divisors of both numbers, that is, the divisors of .
The elements of that are not divisors of are those that remain after removing the common ones from .
In the same way, the divisors of that are not divisors of .
The union gathers the three parts, which are pairwise disjoint: each element appears only once, and .
For all sets , and , the complement relative to of a union is the intersection of the complements, and that of an intersection is the union of the complements:
One proves that an arbitrary element belongs to the left-hand side if and only if it belongs to the right-hand side, translating each operation into its connective. The figure shades on a Venn diagram the regions involved.
Proof
Let be arbitrary. By the definition of difference, to belong to the left-hand side is to be in and not to be in .
By the definition of union.
By De Morgan’s law of logic, the negation of a disjunction is the conjunction of the negations.
Since is equivalent to , we repeat the condition and regroup, by the associativity and commutativity of conjunction.
By the definitions of difference and intersection, this is belonging to the right-hand side. By extensionality, the first law is proved.
The second law is proved with the same chain, interchanging union with intersection and disjunction with conjunction; the logical law involved is then the other De Morgan law.
The power set
The subsets of a set in turn form a set, whose existence was admitted at the beginning. The power set of , denoted , is the set whose elements are the subsets of :
For example, the power set of has eight elements: the empty set, three sets with one element, three with two elements, and itself.
For every set , the empty set and itself are elements of , and for each in one has , whereas is not, in general, an element of . The lesson on combinatorics will prove that a set with elements has subsets.
Ordered pairs and the Cartesian product
A point of the plane, a fraction or a subtraction yet to be carried out are described by two objects in a definite order: the pair is not the pair . The set cannot represent it, because it is equal to . All that is required of an ordered pair is its characteristic property: two pairs are equal if and only if they have the same first component and the same second component. Kuratowski observed in 1921 that the notion of set suffices to construct an object with that property.
Definition (ordered pair). The ordered pair with first component and second component is the set
For all , , and , the pairs and are equal if and only if and .
If the components are equal, the pairs are the same set. For the converse, one distinguishes whether and are equal or distinct, and counts how many elements each set involved has. The figure draws each pair as a set of two sets.
Proof
Suppose that the pairs are equal. By extensionality, they have the same elements.
First case, . Then and the left-hand side has a single element, ; the two elements of the right-hand side are therefore equal to it.
Second case, . The set belongs to the left-hand side, so it is or ; it cannot be , which has two elements, and therefore it is .
Also belongs to the left-hand side. If it were , we would have , and the right-hand side would have a single element, , whereas the left-hand side has two: this is impossible. Therefore is .
Since , the element of is or ; it is not , because , and therefore it is .
In both cases, the components coincide.
Once the characteristic property is proved, Kuratowski’s construction can be forgotten: everything the course says about pairs follows from it.
Definition (Cartesian product). The Cartesian product of and is the set of the pairs whose first component belongs to and whose second component belongs to :
The expression is not by itself one of the admitted rules, which only allow one to separate elements of a set already formed. However, that set exists: if and , the sets and are contained in , and are therefore elements of ; it follows that the pair is contained in , that is, it is an element of . Therefore the Cartesian product is formed by separation inside that set, which exists by the admitted rules: is the union of the elements of , and the power set is taken twice.
The name recalls Descartes: the plane of analytic geometry is . The product is not commutative: contains only , and only , which is different by the characteristic property.
Write the product for and , and compare its number of elements with those of the factors.
Proof
We arrange the elements of on a horizontal axis and those of on a vertical one: each pair is a point of the grid.
The pairs with second component form the first row.
The pairs with second component form the second row.
The product has elements: as many rows as elements of , each with as many pairs as elements of . The multiplication principle of combinatorics generalizes this count.
Relations
To say that divides , that is less than , or that two days fall on the same day of the week is to assert that certain pairs of objects are related. If this is so, a relation is determined by the pairs it relates, and it can be defined as a set of pairs.
Definition (relation). A relation from to is a subset of the product ; a relation on is a relation from to . If , one says that is related to by .
For example, the relation “less than or equal to” on is the set of pairs . For frequently used relations one writes a symbol between the terms, as or , instead of . Four properties of a relation on a set recur throughout the course.
Definition (properties of relations). A relation on is reflexive, symmetric, antisymmetric or transitive when it satisfies, respectively, the following conditions.
- It is reflexive if every element is related to itself: ;
- It is symmetric if the relation of to implies that of to : ;
- It is antisymmetric if two elements related in both directions are equal: ;
- It is transitive if the relation of to and that of to imply that of to : .
On the grid of , a relation is a set of points. It is reflexive when it contains the whole diagonal, that of the pairs ; it is symmetric when its drawing is symmetric with respect to the diagonal; and it is antisymmetric when no point off the diagonal has its mirror image in the relation. Antisymmetric does not mean “not symmetric”: equality is both, and proposed problem 1 asks for a relation that is neither.
On consider divisibility, , and the relation “having the same parity”. Draw both on the grid of and decide which of the four properties each one satisfies.
Proof
Divisibility relates each number to its multiples within : to all of them, to , and , to and , and each of the others to itself. There are pairs.
It is reflexive, because every number divides itself: the diagonal is complete.
It is not symmetric: one counterexample suffices. On the other hand, it is antisymmetric, because if and , each is less than or equal to the other.
It is transitive: if and , then . For example, from and follows .
Same parity relates the odd numbers to one another and the even numbers to one another: there are pairs, which form two blocks symmetric with respect to the diagonal. It is reflexive, symmetric and transitive, but not antisymmetric, because it relates and , which are distinct.
Equivalence relations
The relation “having the same parity” behaves like a partial equality: it identifies the numbers that agree in one respect, their parity, and forgets the rest. The three properties that make it behave in this way receive a name.
Definition (equivalence relation). A relation on is an equivalence relation when it is reflexive, symmetric and transitive. One then writes , and says that is equivalent to . The class of is the set of the elements equivalent to , and each of them is a representative of the class:
The set of all the classes is called the quotient set and is denoted .
Equivalence relations include equality, whose classes have a single element; same parity, with two classes; having the same remainder on division by , with three; and falling on the same day of the week, with seven, which is solved problem 3. In general, if is a function defined on , the relation inherits the three properties from equality, and solved problem 5 shows that every equivalence is of this form.
Let be an equivalence relation on . For all and in : each element belongs to its class; two elements are equivalent if and only if their classes are equal; and two classes with some element in common are equal. Each assertion is obtained from one of the three properties of the equivalence, applied to an arbitrary element of a class.
Proof
By reflexivity, ; by the definition of class, belongs to , and no class is empty.
Suppose and let be in . By transitivity, from and follows ; therefore .
By symmetry, also , and the same argument gives . By double inclusion, the classes are equal.
Conversely, if , the element , which belongs to , belongs to , that is, .
If belongs to and to , by symmetry and transitivity and give , and by what precedes the classes are equal.
The classes therefore divide the set into blocks that do not overlap. This way of dividing a set deserves a definition of its own.
Definition (partition). A partition of a set is a set of subsets of , called blocks, that are nonempty, pairwise disjoint and whose union is ; equivalently, each element of belongs to exactly one block.
The classes of an equivalence relation on form a partition of . Conversely, if is a partition of , the relation “belonging to the same block” is an equivalence relation whose classes are exactly the blocks of . The first part is the preceding lemma; the second verifies the three properties using the condition that each element is in a single block. The figure follows the relation “having the same remainder on division by ” on the set from to .
Proof
By the lemma, no class is empty and each element belongs to its class, so the union of the classes is .
By the lemma, two distinct classes have no elements in common. Therefore the classes form a partition.
Conversely, let be a partition and let us write when and are in the same block. Each element is in some block, and is therefore in the same block as itself: the relation is reflexive. Symmetry is immediate, because the condition does not depend on the order in which and are named.
Transitivity: if and are in the block , and and in the block , then is in and in ; since each element is in a single block, , and and are in the same block.
Finally, if is in the block , the class of consists of the elements that share a block with , which are those of : the classes are the blocks.
Giving an equivalence on and giving a partition of are therefore two ways of saying the same thing; solved problem 4 takes advantage of this to count equivalences. The quotient set is the partition seen as a new set: on passing from to , equivalent elements merge into a single one.
On the set of pairs of natural numbers one defines when . It is an equivalence relation, as is proved in the lesson on the integers. Compute some representatives of the classes of , and , and describe the classes on the grid of pairs.
Proof
The pair represents the subtraction yet to be carried out , which may not exist among the natural numbers; the condition says that two pairs represent the same subtraction without writing any subtraction.
The class of contains the pairs that describe the difference . For example, , because .
The class of is that of the pairs with equal components, because requires : it is the diagonal of the grid.
The class of describes a difference that does not yet exist, the one that will be .
Each class is the set of the pairs on a line parallel to the diagonal, and by the theorem those lines form a partition of the grid. An integer will be, by definition, one of these classes: is the quotient set.
In the same way, in the lesson on the rational numbers two fractions and are equivalent when , and a rational number is a class; and in the lesson on congruences, the residues modulo are the classes of an equivalence between integers.
Order relations
The divisibility of the previous example is not symmetric but antisymmetric: instead of identifying elements, it orders them. Relations of this kind receive a name of their own.
Definition (order). A relation on is an order relation, or partial order, when it is reflexive, antisymmetric and transitive; one then writes , and says that precedes . The order is total when any two elements are comparable, that is, when for all and one has or .
Examples of orders are the relation between natural numbers, which is total by the trichotomy proved in the lesson on the operations on natural numbers; inclusion, by the theorem on its properties, which is not total, because and are not comparable; and divisibility between natural numbers, whose antisymmetry is proved in the lesson on divisibility, which is not total, because neither nor . A finite order is drawn with a Hasse diagram: one point per element, with higher than when precedes , and a segment when there is no other element between them; transitivity allows the other segments to be omitted.
Definition (bounds and extreme elements). Let be an order on and a subset of . The bounds and the extreme elements of are defined as follows.
- An element of is a lower bound of if it precedes all the elements of , and an upper bound if all the elements of precede it.
- A least element of is a lower bound of that belongs to , and a greatest element is an upper bound that belongs to .
- An element of is minimal if no element of other than itself precedes it, and maximal if it precedes no element of other than itself.
- The infimum of is the greatest element of the set of its lower bounds, and the supremum is the least element of the set of its upper bounds, when they exist.
If a subset of an ordered set has a least element, that least element is unique, and it is the only minimal element of . If the order is total, every minimal element of is its least element. The same holds for the greatest element and the maximal elements. Uniqueness rests on antisymmetry, and the last assertion, on comparability.
Proof
If and are least elements of , each belongs to and precedes all its elements; in particular, each precedes the other, and by antisymmetry they are equal.
The least element is minimal: if in precedes , since also , antisymmetry gives .
If is minimal, since precedes and belongs to , the definition of minimal forces : there are no other minimal elements.
If the order is total and is minimal, for each in one has or ; in the second case, since it is minimal, . In both cases , and is the least element.
On the set of the divisors of , ordered by divisibility, consider the subset . Draw the Hasse diagram and determine the minimal and maximal elements, the least and greatest elements, the bounds, the infimum and the supremum of .
Proof
In the diagram, is at the bottom, because it divides all of them; above it, and ; above them, and ; at the top, . One joins with and with ; with and with ; with ; and and with .
The minimal elements of are and : no other element of divides them. Since there are two, by the proposition has no least element; the order is not total, because and are not comparable.
The maximal elements are and , which divide no other element of ; there is no greatest element either.
The only lower bound of in is , which is therefore the infimum; the only upper bound is , which is the supremum. Neither of them belongs to .
The infimum and the supremum can therefore exist without the least and greatest elements existing. This difference distinguishes the real numbers: in the lesson on number systems it is admitted, as the axiom of completeness, that every nonempty set of real numbers bounded above has a supremum, which the rational numbers do not satisfy. The natural numbers, on the other hand, satisfy the well-ordering principle, proved in the lesson on summations and induction: every nonempty set of natural numbers has a least element.
Functions
Functions as relations
A function assigns to each element of one set exactly one element of another. If this is so, a function is determined by the pairs formed by each element and the one assigned to it, and it can be defined as a relation with a special property.
Definition (function). A function from to is a relation from to that relates each element of to exactly one element of :
That unique element is called the image of and is written ; one writes , and says that is the domain of and its codomain.
Two functions are equal when they have the same domain, the same codomain and the same image at each element. The identity of , denoted , leaves each element where it is: it is the diagonal of , and for every in .
Definition (image and preimage). Let . The image of a subset of is the set of the images of its elements, and the preimage of a subset of is the set of the elements of whose image is in :
The image of the whole domain, , is called the range of and is denoted .
The notation for the preimage does not presuppose that has an inverse: the preimage exists for any function.
Let be the function that assigns to each number the number of its divisors. Compute its values, its range and the preimage of , and compare with for and .
Proof
has one divisor; , and , two; has three, , and ; and has four, , , and .
Each element of the codomain is the image of some element: the range is the whole codomain.
The numbers with exactly two divisors are the primes of the domain.
The intersection of and is , whose image is .
On the other hand, , because and have the same image. In general only the inclusion holds, because an in serves as a witness for both images; equality fails when the witnesses are different, as here and .
Composition
If and , each in has an image in , which in turn has an image in . The composition of with is the function that applies first and then :
It is a function, because to each there corresponds a single , and to this a single . The order of writing is the reverse of the order of application: in the function on the right acts first. Composition is not commutative: if and on the natural numbers, then , which is odd, and , which is even. The identity is neutral on both sides, because and :
If , and , the functions and are equal. Both go from to ; it suffices to check that they take the same value at each element, unfolding the definition of composition twice. The figure represents the functions as arrows between four columns.
Proof
Let be an arbitrary element of . By the definition of composition, applied to and to .
Again by the definition, now applied to .
On the other side, by the definition applied to and to .
And by the definition applied to , at the element .
The two functions have the same domain, the same codomain and the same values: they are equal. That is why one writes without parentheses.
Injective, surjective and bijective functions
Definition. A function is injective when distinct elements have distinct images, or, by contraposition, when equality of the images implies equality of the elements; it is surjective when every element of is the image of some element of , that is, when ; and it is bijective, or a bijection, when it is injective and surjective:
The number-of-divisors function of the example is surjective and not injective. The function from the natural numbers to the natural numbers is injective and not surjective, because is not twice any natural number. The successor of the next lesson is, by the fourth Peano axiom, an injective function from to , and by the third it is not surjective, because is not the image of any natural number. Surjectivity depends on the declared codomain. A bijection pairs the elements of two sets without repeating or omitting any; that is why the lesson on combinatorics defines to have elements when there exists a bijection from to .
Let and . If and are injective, is injective; if and are surjective, is surjective; and therefore, if both are bijective, is bijective. For injectivity, one runs along the chain backwards, from to ; for surjectivity, too, but looking for preimages. The figure shows the three columns.
Proof
Injectivity: let and in have the same image under .
Since is injective, the elements and , which have the same image under , are equal.
Since is injective, . Therefore is injective.
Surjectivity: let be in . Since is surjective, there is a in with ; since is surjective, there is an in with .
That is a preimage of under the composition. Therefore is surjective, and if both functions are bijective, so is the composition.
The inverse function
A function undoes when, applied after , it returns each element to its starting point, that is, when ; and in turn undoes when . A function that satisfies both equalities is called an inverse of . The following theorem says which functions have one.
A function is bijective if and only if there exists a function such that and . That function is unique; it is called the inverse function of and is denoted . Moreover, is bijective and its inverse is . To construct the inverse, one reverses the pairs of ; for uniqueness, one uses the associativity of composition. The figure follows a bijection between two sets of four elements.
Proof
Suppose is bijective. For each in there is an with , because is surjective, and only one, because is injective. The relation obtained by reversing the pairs of is therefore a function from to .
By the definition of , applying and then returns each , and applying and then returns each .
Conversely, suppose that exists. If , applying yields : the function is injective.
For each in , the element is a preimage of : the function is surjective and therefore bijective.
Uniqueness: if and satisfy both equalities, one inserts the identity and regroups by associativity.
The two equalities of the definition are symmetric in and : undoes in both directions. By the part already proved, is bijective, and its inverse is .
For all sets , and : there exists a bijection from to ; if there exists a bijection from to , there exists one from to ; and if there exist bijections from to and from to , there exists one from to . In particular, if has elements and there exists a bijection from to , then has elements. Each assertion is one of the preceding theorems.
Proof
The identity is a bijection, because it is its own inverse.
The inverse of a bijection is a bijection, by the inverse function theorem.
The composition of two bijections is a bijection, by the preceding theorem.
If is a bijection from to and one from to , the composition is a bijection from to .
It is not called an equivalence relation because there is no set of all sets on which to define it. The lesson on function operations will apply these results to real functions, and there the graph of the inverse will be the mirror image of the graph of the function with respect to the diagonal, a geometric picture of reversing the pairs.
Solved problems
The problems advance from two exercises on functions to three applications of equivalences. The second uses the multiplication of natural numbers and its cancellation law, which is proved in the lesson on the operations on natural numbers; the third, division with remainder, which is proved in the lesson on divisibility. None of those results depends on this lesson.
Let and . Prove that if is injective, then is injective, and that if is surjective, then is surjective. Show with an example that can be bijective without being injective or surjective.
Solution
Let and in satisfy . Since is a function, it assigns equal images to equal elements.
That equality is the equality of the images under , which is injective: therefore , and is injective.
Let be in . Since is surjective, there is an with ; the element of is a preimage of under .
For the example, let and , with and . The composition is the identity of , which is bijective.
However, is not injective, because , and is not surjective, because is not the image of anything. What the composition transmits is the injectivity of the first factor and the surjectivity of the second, and nothing more.
Let be the set of even numbers. Construct a bijection from to , with its inverse, and observe that is a proper subset of .
Solution
We propose doubling: . It is a function from to , because is even, with witness .
Injectivity: if , by the cancellation law for the multiplication of natural numbers, .
Surjectivity: every in is of the form with a natural number, and is therefore the image of .
By the inverse function theorem, has an inverse: the one that assigns to each even number its half, which is the natural number of the previous step, unique by cancellation.
However, is a proper subset of : is not even, because for every natural number .
The result contradicts the intuition that the part is smaller than the whole, which Galileo had already noticed in 1638 when he paired the natural numbers with their squares. That no finite set is in bijection with a proper subset of itself is a form of the pigeonhole principle, which the lesson on combinatorics admits without proof together with the uniqueness of the number of elements; once that principle is accepted, is not finite. Dedekind took precisely this property as the definition of an infinite set, and the lesson on the Peano axioms shows that has it.
January 1, 2026 was a Thursday. We number the days of the year 2026 from to and say that two days are equivalent when their numbers leave the same remainder on division by . Prove that this is an equivalence relation, describe its classes, and determine which day of the week October 5, 2026 is and which day October 5, 2027 will be.
Solution
Let be the remainder of dividing by , unique by the division with remainder theorem. The relation is , and it inherits its three properties from equality: ; if , then ; and if and , then .
The possible remainders are , and each one is attained, so there are seven classes, the columns of a calendar with seven columns. Since the week repeats every seven days, two equivalent days fall on the same day of the week.
October 5 is day of the year, because the nine preceding months add up to days.
We divide by : the remainder is , so October 5 is in the class of day , January 5.
Day was a Thursday, and therefore day , four days later, was a Monday: October 5, 2026 is a Monday.
The year 2026 has days, and : the same date of the following year falls days later, that is, one day of the week later. October 5, 2027 will be a Tuesday.
How many equivalence relations are there on the set ?
Solution
By the theorem on equivalences and partitions, each equivalence determines its partition into classes, and each partition determines the equivalence “being in the same block”, whose classes are the blocks; the two correspondences undo each other. It therefore suffices to count the partitions, which we classify by the sizes of their blocks.
A single block of four elements: one partition, the one with a single class.
A block of three and one of one: as many as there are ways of choosing the solitary element, four.
Two blocks of two: the partition is determined by the partner of , which can be , or ; there are three.
A block of two and two of one: the partition is determined by the pair that forms the block of two, and there are six pairs.
Four blocks of one: one partition, that of equality. Adding the five types gives the number of equivalences.
The numbers of partitions of a set of , , , , elements are , , , , ; they are called Bell numbers, and proposed problem 2 obtains the fifth.
Let be a function. Prove that the relation , defined by , is an equivalence, and that is the composition of three functions: the surjection that sends each element to its class, a bijection from the quotient set onto the range of , and the injection that sends each element of the range to itself inside . Apply this to the number-of-divisors function of the example.
Solution
The relation is an equivalence, by the same argument as in solved problem 3. Its classes are the preimages of the elements of the range: the class of gathers the elements with the same image as it. In the example, they are , , and .
The function goes from to and is surjective, because every class is the class of one of its elements.
We define . Since a class has many representatives, one must check that the value does not depend on the one chosen: if , then , that is, .
The function is injective, because the preceding implication can be reversed: if , then and . It is surjective onto the range, because each is .
The inclusion of the range into is injective, and the composition gives back . In the example, the four classes go to , , and ; the function is not injective because the class has three elements.
The problem shows that every function classifies its domain and, conversely, by the lemma on classes, that every equivalence is the relation “having the same image” under some function, the one that sends each element to its class. Thus a grading system divides students into classes according to their grade, a postal code divides addresses according to their area, and the remainder function divides numbers according to their remainder.
Proposed problems
Each problem has a hint, which should be opened only after attempting the problem; the final answer is shown after the hint.
Prove that, for all sets , and ,
Also give an example of a relation on that is neither symmetric nor antisymmetric.
Hint
For the implication to the right, take in : it is in the right-hand side, hence in the left-hand side, hence in . For the other, prove double inclusion by distinguishing, for each , whether it is in or in . For the relation, combine a pair with its mirror image and another pair without it.
Answer
If the equality holds, is contained in the right-hand side, which is equal to the left-hand side, which is contained in . If , an element of that is in or in is in or in , and conversely an element of is in and in . A relation that is neither symmetric nor antisymmetric is
Worked solution
Solution
If the equality holds and is in , then is in the right-hand side, which contains ; by the equality, it is in the left-hand side, and in particular in . Therefore .
Conversely, suppose and let be in the left-hand side: it is in , and moreover in or in . In the first case it is in ; in the second, in . In both, in the right-hand side.
Now let be in the right-hand side. If it is in , it is in and in ; if it is in , it is in and, by the hypothesis , also in .
By double inclusion, the two sides are equal when ; with the first step, the equivalence is proved.
In the proposed relation, the pair is present and its mirror image is not, so it is not symmetric; the pairs and are present, with , so it is not antisymmetric.
Count the equivalence relations on the set , and how many of them have exactly two classes.
Hint
Classify the partitions by the sizes of their blocks, as in solved problem 4: there are seven types, from to . For a block of three and one of two it suffices to choose the block of two; for two blocks of two and one of one, first choose the solitary element.
Answer
By types, ; those with two classes are those of the types and , which add up to :
Let and be bijective. Prove that the inverse of is , in that order. Apply this to getting dressed: if is putting on one’s socks and putting on one’s shoes, in what order is the operation undone?
Hint
By the uniqueness of the inverse, it suffices to check that composed with , in both orders, gives the identity; regroup by associativity so that meets and meets .
Answer
By associativity, the middle factors cancel; by the uniqueness of the inverse, . To get undressed, one first takes off the shoes and then the socks.
Worked solution
Solution
The composition of two bijections is bijective and therefore has a unique inverse. It suffices to check that , which goes from to , undoes it in both orders.
First order: by the associativity of composition, meets and their composition is the identity of , which does not alter .
Second order: in the same way, meets .
By the uniqueness of the inverse, is the inverse of : the factors are inverted in the opposite order.
Getting dressed is : first the socks and then the shoes. Undoing it is applying first , taking off the shoes, and then , taking off the socks.
Prove that the function defined by
is a bijection.
Hint
Every natural number can be written in exactly one way as a power of times an odd number: divide by as long as the number is even; the process ends because the quotients decrease. For uniqueness, if with and odd and , cancel and compare the parity of the two sides.
Answer
The function is bijective: the exponent of in gives , and the odd part gives . The first values are
Worked solution
Solution
The function is well defined: is or a natural number, and in the first case by the convention for the zero exponent, which the lesson on the basic operations justifies; moreover, is odd. In the table, row contains the products of by the odd numbers.
Surjectivity: given , divide by as long as the number is even. The quotients decrease, and a strictly decreasing sequence of natural numbers cannot be infinite (this is the well-ordering principle, proved in the lesson on summations and induction, which is anticipated here): the process ends at an odd number after divisions, and with .
Injectivity: suppose , that is, with , , and , where and are odd. If it were the case that , cancelling would leave an odd number equal to an even one, which is impossible; likewise if , and by trichotomy , that is, .
With , the cancellation law for multiplication gives ; it follows that , and the cancellation law for multiplication gives : the two pairs coincide in both coordinates.
The function is therefore a bijection from to . For example, is the image of the pair .
A student plans six courses, , , , , and , to be taken one at a time. Course is a prerequisite of and of ; courses and are prerequisites of ; and is a prerequisite of . Writing when or must be taken before , directly or indirectly, prove that is a partial order, determine its minimal and maximal elements, and count the ways of ordering the six courses that respect the prerequisites.
Hint
A valid ordering is a total order that contains . Courses , , and can be taken in only two orders, according to whether or comes first; then and must be interleaved, in that order, among the other four: choose which two of the six places they occupy.
Answer
The minimal elements are and ; the maximal ones, and ; there is no least or greatest element. There are ways of choosing the places of and among six, and therefore
Worked solution
Solution
The relation is reflexive by definition, because the first alternative of the definition, , holds when is itself. It is transitive: if comes before and before , directly or indirectly, then comes before .
It is antisymmetric: if we had and with , the prerequisites would form a cycle, and neither of the two courses could be taken first. In the figure, the arrows of the prerequisites always point downwards, and there are no cycles.
The minimal elements are the courses without prerequisites, and ; the maximal ones, those that are prerequisites of none, and . Since and are not comparable, nor and , there is no least or greatest element.
Courses , , and admit only two orders: first, last, and and in either of the two orders between them.
It remains to interleave and , in that order: it suffices to choose the two places they occupy among the six, and there are ways, according to the place of . Each of the two orders combines with each of those choices, and there are orderings.
Completed
Sign in to save your progress