Lesson 6
Relations and Order
Taught
Relations and Order
People classify: we decide which things belong together, and mathematics does this on every page. This chapter covers relations in general, then the two most important kinds, orders and equivalences, and finally the way an equivalence cuts a set into pieces.
Relations
A relation records, for each pair of elements, whether the two stand in a given relationship. Since a pair with an order to it is an ordered pair, and the set of all of them is a Cartesian product, no new definitions are needed.
Definition 6.1 (Binary relation).
A relation on a set is a set of ordered pairs of elements of , that is, a subset . We abbreviate to , and say is related to by ; if we write .
Putting the symbol between the two elements is infix notation; writing instead is prefix notation. For equivalence relations we usually take a symbol such as or , and for strict orders the symbol .
Two relations are distinguished exactly by the pairs belonging to one and not the other, since a relation is its set of pairs. At the two extremes, is the universal relation on and is the empty relation. Neither is of much interest: if everything is related to everything then being related is no mark of distinction, and if nothing is related to anything there is nothing to say.
Definition 6.2 (Reflexive, symmetric, transitive).
Let be a relation on a set . Then is
- reflexive if for every ;
- symmetric if for all ;
- transitive if for all .
From a familiar children’s game, let and let , read “beats”, be
This is none of the three: rock does not beat itself, rock beats scissors while scissors does not beat rock, and rock beats scissors and scissors beats paper while rock does not beat paper.
Definition 6.4 (Equivalence relation).
A relation is an equivalence relation if it is reflexive, symmetric and transitive. When is an equivalence relation and , we say and are equivalent with respect to .
On the relation is symmetric and transitive but not reflexive, since . Adjoining exactly what is missing gives , which is reflexive, inherits symmetry and transitivity, and is therefore an equivalence relation. We call the reflexive closure of : it adds to only the pairs that reflexivity requires.
Transitivity is the condition that most often fails. Let be the partially exposed stones in a stream you wish to cross, and for let mean that you can step directly from to without getting wet. This is reflexive, since once on a stone you can hop on the spot, and symmetric, since a step you can take one way you can take back. It is not generally transitive: that you can reach from and from says nothing about reaching from in one step.
Check that the relation above is symmetric and transitive, working from the definitions rather than from the picture.
Let and be sets. Many texts call a subset a relation from to . Show that every such is a relation on in the sense of Definition 6.1 .
Let be a symmetric and transitive relation on a set , and put . Show that implies , and that is an equivalence relation on .
Order Relations
Orders are the second of the two kinds of relation we shall need. We isolate the properties an order has, so that when we later build one on the natural numbers out of addition alone we know exactly what has to be checked.
Definition 6.7 (Strict linear order).
A strict linear order on a set is a relation, commonly written , satisfying
- the transitivity law: for all , if and then ;
- the trichotomy law: for all , exactly one of , , holds.
When holds we say is strictly less than . Strict linear orders are also called strict total orders, in contrast with the partial orders of the next section. The word exactly in the trichotomy law says two things: any two elements can be compared, and no two of the alternatives hold at once. Proofs use the second far more often than the first, so we isolate it.
Proposition 6.8 (Anti-reflexivity).
Let be a strict linear order on a set . Then for every .
Discussion.
The statement is a universally quantified negation, so we fix an arbitrary and rule out . Only the trichotomy law says anything about a single pair, so we apply it to the pair and . It offers three alternatives, , and , and exactly one of them holds. The middle one holds, since equality is reflexive, which rules out the other two; and each of those is the statement we wish to deny.
Proof.
Let . Trichotomy applied to and says that exactly one of , , holds. Since holds, neither occurrence of can, so .
Trichotomy can be traded for the weaker demand that at least one alternative hold, provided we also assume anti-reflexivity.
Proposition 6.9 (Characterising strict linear orders).
Let be a relation on a set such that
- for all , if and then ;
- for all , ;
- for all , .
Then is a strict linear order on .
Discussion.
The definition asks for two laws, and the first is the first hypothesis verbatim, so only trichotomy needs proof. It splits in two: that at least one alternative holds is the second hypothesis, again verbatim, and it remains to show that no two hold together. There are three possible pairs, the two strict comparisons together or either strict comparison alongside , and we take them in turn. Two opposite strict comparisons feed into transitivity and produce ; a strict comparison alongside an equality lets us substitute one letter for the other and produce again. Each case gives , which the third hypothesis forbids.
Proof.
The first hypothesis is the transitivity law. For trichotomy, let . The second hypothesis gives at least one of , , .
If both and held, transitivity would give , against the third hypothesis. If and held, substitution gives ; and with gives likewise. So no two of the alternatives hold together, exactly one holds, and that is the trichotomy law.
A strict order says which of two elements comes first. For bounds, minima and induction it is more convenient to use the relation that also allows equality.
Definition 6.10 (Associated non-strict order).
Let be a strict linear order on a set . The associated non-strict order is defined by: holds if and only if holds. When we say is less than or equal to .
Proposition 6.11 (Laws of the associated order).
Let be a strict linear order on with associated . For all :
- ;
- if and then ;
- if and only if ;
- if and only if .
Discussion.
All four come from the list of three alternatives in trichotomy, so in each we go through the list and see which entries remain. The first is a disjunction and every entry produces one of its halves: gives , gives , and gives both. The second is a conditional whose conclusion is an equality, so we suppose and derive a contradiction: the definition turns both hypotheses into strict comparisons, transitivity gives , and anti-reflexivity forbids it. The last two are biconditionals, proved by crossing entries off the list. Denying deletes the first two entries and leaves ; conversely deletes those same two, since trichotomy allows only one. Denying deletes just the first entry, leaving or , and that pair is what abbreviates.
Proof.
For the first, trichotomy gives , or , and in each case the definition gives or .
For the second, suppose and , and suppose . Then the definition gives and , so transitivity gives , contradicting anti-reflexivity. Hence .
For the third, if then neither nor holds, so trichotomy leaves . Conversely excludes both and , so .
For the fourth, trichotomy says holds precisely when or , which by the definition is precisely .
From transitivity of we get two further transitivity laws, one for each way of mixing the two relations.
Proposition 6.12 (Mixed transitivity).
Let be a strict linear order on with associated , and let . Then
- if and then ;
- if and then .
Discussion.
Each part has one strict hypothesis and one non-strict one, and the definition of splits the non-strict hypothesis into two cases, so each part has two cases. In the equality case no order reasoning is needed at all: the conclusion is the strict hypothesis with one letter renamed. In the strict case both hypotheses are strict, so the transitivity law applies.
Proof.
For the first, if then is the hypothesis with written for ; and if then transitivity gives .
For the second, if then is the hypothesis with written for ; and if then transitivity again gives .
Corollary 6.13 (Transitivity of the non-strict order).
Let be a strict linear order on with associated . If and then .
Proof.
If and then . If and then ; if and then ; and if and then mixed transitivity gives . In every case the definition of gives .
Definition 6.14 (Reverse orders).
Let be a strict linear order on . We write to mean , and say is strictly greater than ; and to mean , and say is greater than or equal to .
Since and are transitive, so are and .
The notation abbreviates , and similarly for , and , for more than three terms, and for mixtures: abbreviates .
By transitivity, gives .
What is the difference between the trichotomy law and the weak trichotomy law? Which of the two implies the other?
Show that a strict linear order is not symmetric on any set with at least two elements, and decide whether the associated can ever be symmetric.
Partial Orders and Extrema
The order relations of the previous section were strict and linear: transitive and trichotomous, with the non-strict built afterwards. There is a second tradition, equally common, which takes the non-strict relation as primitive and weakens trichotomy so that incomparable pairs are allowed. That is the language of partial orders, and it is what one wants for inclusion of sets.
Definition 6.16 (Partial order).
A relation on a set is a partial order, and is then ordered by , if is
- reflexive: for every ;
- antisymmetric: and imply ;
- transitive: and imply .
We usually write for , and then for , with and as before.
Definition 6.17 (Comparable elements and total orders).
Let be partially ordered. Elements are comparable if or . The order is a total order, or linear order, if every two elements are comparable.
The power set is partially ordered by , and also by the reverse inclusion. It is not totally ordered as soon as has two elements and , since and are incomparable: neither contains the other. The natural numbers will turn out to be totally ordered, once we put an order on them below.
Remark (Partial versus strict).
The two languages agree on total orders. If is a strict linear order and is the associated relation, then is a total order in the present sense: reflexivity is immediate, antisymmetry is one of the laws proved above, and transitivity is its corollary. Conversely, from a total order the relation is a strict linear order. What partial orders add is the possibility that some pairs are incomparable.
Definition 6.19 (Minimal and maximal elements).
Let be partially ordered and non-empty. An element is minimal in if no element of is strictly smaller, that is, ; and is maximal in if no element of is strictly larger.
A bound of a set need not lie in the set; a minimum or maximum must.
Definition 6.20 (Bounds, minima, maxima).
Let be a subset of a partially ordered set .
- An element is a lower bound of if for every , and is an upper bound if for every .
- An element is a minimum, or least element, of if for every ; and is a maximum, or greatest element, if for every .
The difference is membership: a minimum is a lower bound that happens to lie in . Not every subset has either, as the natural numbers will shortly illustrate: they have a least element and no greatest one.
Proposition 6.21 (A bound inside the set is an extremum).
Let be a subset of a partially ordered set. If is a lower bound of and , then is a minimum of ; and if is an upper bound of with , then is a maximum.
Discussion.
The two halves are dual, so it is enough to plan the first and reverse the inequalities for the second. What we are given is a lower bound of that also lies in . The bound hypothesis is for every , which is the inequality a minimum must satisfy, and the membership is precisely the extra clause the definition of a minimum asks for. Together these are the claim; the two definitions differ only by that clause.
Proof.
If is a lower bound of then for every , and by hypothesis; those two together are the definition of a minimum. The argument for maxima is the same with the inequalities reversed.
Existence may fail, but uniqueness does not.
Proposition 6.22 (Uniqueness of extrema).
Let be a subset of a partially ordered set. The minimum of , if it exists, is unique, and likewise the maximum.
Discussion.
Suppose two elements are both minima. Each, being a minimum, is below every element of , and each, being a minimum, lies in ; so applying the defining property of the first to the second and of the second to the first gives the two inequalities antisymmetry needs. The argument for maxima is identical with the inequalities reversed. The proposition does not say that a minimum exists, only that there cannot be two. Bounds outside are under no such restriction, since a set may have many lower bounds.
Proof.
Let and both be minima of . Then , since is a minimum and ; and for the same reason with the roles exchanged. Antisymmetry gives . The argument for maxima is identical.
For ordered by inclusion, identify the minimum and the maximum. In , show that every singleton is minimal, and decide whether there is a minimum.
Let and be totally ordered sets and let be a bijection with whenever . Show that whenever , and deduce that has the same property.
Partitions
Consider a three-piece jigsaw. How many states of assembly are there, counting two states as different when one has two pieces interlocked that the other does not? The answer is five. Representing each cluster of interlocked pieces by the set of its numbers, each state becomes a family of such sets:
Each is a family of non-empty sets whose union is , no two of which share an element.
Let be a non-empty set. A partition of is an indexed family of non-empty subsets of with
The are the blocks of the partition.
The set has as its only one-block partition, and seven with two blocks:
It has six with three blocks, and its only four-block partition is .
A partition is how we get a handle on a large set: cut it into blocks, deal with the blocks one at a time, and put the pieces back together. The blocks are usually chosen by a shared feature.
Assuming you know the real numbers, let be a set of them and suppose a calculation requires that we treat numbers differently according to sign. Take the three blocks
This is a partition only if holds a positive number, a negative number and zero, since blocks are required to be non-empty. Without that requirement every family of conditions would partition every set.
List the six three-block partitions of .
Equivalence Classes
Fix an equivalence relation on a set . We cut into pieces by grouping together everything related to a given element.
Definition 6.26 (Equivalence class).
Let be an equivalence relation on a set and let . The equivalence class of is
and the set of all equivalence classes is
called modulo , or the quotient of by .
On with the equivalence relation above, , and . Distinct classes here do not meet, and the next proposition shows this always happens.
Proposition 6.28 (Characterising equivalence classes).
Let be an equivalence relation on a set and let . The following are equivalent.
- ;
- ;
- .
Discussion.
Three statements would ordinarily need six implications, but a cycle is enough: we prove and let each statement reach every other by going round. For we assume and aim at an equality of sets, so we chase an element: means , and the chain closes by transitivity, with symmetry supplying whichever direction the chain needs; the reverse inclusion is the same argument with and exchanged. For reflexivity puts in , so if the classes agree then itself witnesses that they meet. For a shared element gives and , and symmetry with transitivity gives . Only the three defining properties are used.
Proof.
. Suppose and let , so . With transitivity gives , that is ; hence . Symmetry gives , and the same argument with and exchanged gives . So .
. Reflexivity gives , so . If then , which is therefore non-empty.
. Let . Then and . Symmetry gives , and transitivity with gives .
Remark (Disjoint decomposition).
It follows that is the union of the classes and that distinct classes are disjoint:
An equivalence relation therefore breaks into pairwise disjoint non-empty pieces. Some authors write for a union whose parts are known to be disjoint.
Let be an equivalence relation on . Show that for every , and that if then .
Assuming you know the real numbers and the whole numbers, let mean that is a whole number. Check that is an equivalence relation on the real numbers, and describe and .
Let be a map and declare on when . Show that is an equivalence relation, and that is in bijection with the image .
From Equivalence Relations to Partitions
An equivalence relation gives a partition, and a partition gives an equivalence relation. We prove each direction in turn.
Theorem 6.29 (Equivalence relations induce partitions).
Let be an equivalence relation on a non-empty set . Then the family of its equivalence classes is a partition of , called the partition induced by .
Discussion.
We check the three conditions in the definition of a partition: blocks non-empty, blocks pairwise disjoint, blocks covering . Non-emptiness is immediate, since reflexivity puts in . Disjointness is the previous proposition read contrapositively: if two classes meet they are equal, so distinct classes cannot meet. For the cover, the same reflexivity observation puts every in the block , while the reverse inclusion is automatic because every class is a subset of . One class may have many labels, since whenever , so we index the family by the distinct classes and do not count one block twice.
Proof.
Write the distinct classes as an indexed family .
Each is non-empty: if then by reflexivity. If then , so by the previous proposition. Every is a subset of , so the union of the is contained in ; and if then by reflexivity, and is one of the , so lies in the union. Hence the union is , and the family is a partition.
The relation on induces the partition , which is the list of classes computed above.
Theorem 6.31 (Partitions induce equivalence relations).
Let be a partition of a set , and for declare to mean that and lie in the same block of . Then is an equivalence relation on , and the partition it induces is itself.
Discussion.
There are two claims. For the first, the three properties come from the three conditions on a partition. Reflexivity uses the cover, since every lies in some block. Symmetry is immediate, since “same block” does not depend on which element is named first. Transitivity uses disjointness: if and share a block and and share a block, then lies in both, so the two blocks meet and are therefore the same block, which then holds and . For the second claim, fix and let be the block holding it. Then exactly when shares a block with , which is exactly when ; so the class is the block , and the family of classes is .
Proof.
Write , so the are non-empty, pairwise disjoint, and their union is .
For reflexivity, an lies in some by the cover, so . For symmetry, if then both lie in some , so both lie in it in the other order and . For transitivity, if and then and for some ; then , so since distinct blocks are disjoint, and gives . So is an equivalence relation.
For the second claim, let and let be the block holding , unique because distinct blocks are disjoint. Then if and only if , which holds if and only if . So , and the family of classes is exactly .
Take the partition of and write down every pair in the equivalence relation it induces. Check that you recover .
How many equivalence relations are there on a set with three elements? Count the partitions, then appeal to the two theorems.
The Order on the Natural Numbers
We now define the order on the natural numbers from addition. Throughout this section we work in , which is a Peano system under , so all five conditions and the recursion theorem apply. Addition already suggests the order: lies beyond when it is reached from by adding something positive.
Definition 6.32 (Order on the natural numbers).
For we define to hold if and only if there is a with ; in symbols,
Since , the difference is required to be positive. Admitting would make every number less than itself and break trichotomy.
Corollary 6.33 (Adding a positive element moves you up).
If and then . In particular for every .
Proof.
Take in the definition. For the second claim take , which lies in , and recall .
The definition is stated in terms of differences, so we first show that a difference is unique.
Proposition 6.34 (Uniqueness of differences).
Let . Then has at most one solution .
Discussion.
Uniqueness statements are proved by assuming two solutions and forcing them to agree, so we let be the statement that any two solutions for that coincide, and induct on . The base case is immediate, since reads by addition from the left. For the step we take ; both sides are successors, of and of , and the third Peano condition strips a successor from an equation, leaving an equation the inductive hypothesis handles.
Proof.
We induct on . For , the equation gives by addition from the left, so there is at most one solution.
Suppose the claim holds for and that . By addition from the left, , so ; the third Peano condition gives , and the inductive hypothesis gives . Induction completes the proof.
To decide whether we do not need the case split in the definition of the associated order: one difference is enough, provided we now allow it to be .
Proposition 6.35 (The associated order on the natural numbers).
For we have if and only if for some .
Discussion.
The statement is a biconditional, so there are two conditionals. Going forwards, the definition of unfolds into the two cases and , and we must produce a difference in each: the first hands us one directly, and in the second works. Going backwards we are given a difference and must decide which half of holds, so we split on whether is ; if it is then , and if it is not then and the definition of applies. Either way .
Proof.
Suppose . Then or . In the first case the definition of supplies with ; in the second, serves, since . Either way .
Conversely suppose with . If then , so . If then , so and again .
When the with is unique, by the proposition on differences, and we write it . So subtraction is defined exactly when the answer lies in .
Proposition 6.36 (Positive means greater than zero).
Let . Then if and only if . Consequently for every .
Discussion.
Both directions run through the one equation . Going forwards we must produce a difference witnessing , and satisfies the equation, lying in because that is the hypothesis. Going backwards the definition hands us a with , so and are the same element and the hypothesis transfers. The consequence follows: an element of is either , where equality serves, or lies in , where the biconditional gives .
Proof.
Suppose . Then by addition from the left, and , so by the definition of .
Conversely suppose . The definition gives with , so .
Finally, an is either or a member of ; in the first case and in the second , so in both.
The proof that is an order splits at a chosen element, and we use the same splitting later for the induction variants and for well-ordering, so we give it a name.
For we write
Theorem 6.38 (The natural numbers are strictly ordered).
The relation of the definition above is a strict linear order on .
Discussion.
The definition of a strict linear order wants transitivity and trichotomy, and the characterisation proved earlier lets us replace the second by weak trichotomy and anti-reflexivity, so there are three things to prove. Transitivity is a calculation: two positive differences add up to a single one, which is positive by closure. Anti-reflexivity follows from uniqueness of differences, since would exhibit as with positive while exhibits it with difference , and only one difference is permitted. Weak trichotomy is the main part; in terms of the cuts it is the set equation , which we prove by induction on . The base case is the proposition just proved, since every element is at least , so is everything. For the step we take an arbitrary , use the hypothesis to place it on one side of , and then place it relative to : an below stays below , an equal to falls below , and for an above the positive difference has a predecessor, which gives .
Proof.
For transitivity, suppose and with . Then by the laws of addition, and by closure; hence .
For anti-reflexivity, would give with , and uniqueness of differences forces , contradicting .
For weak trichotomy, fix and consider the cuts. We show by induction on . For , every element satisfies by the proposition above, so .
Suppose and let . If then by the corollary above, so by transitivity. If there are two cases. If then , so . If then with , and has a predecessor by the theorem on predecessors, say ; then , so and . Induction gives for every , which is weak trichotomy.
The characterisation of strict linear orders now applies.
Nothing lies strictly between and its successor. This looks obvious, but it has to be proved from the definition.
Proposition 6.39 (Nothing between n and its successor).
Let . There is no with .
Discussion.
This is a non-existence claim, so we suppose such an exists and derive a contradiction. The two strict inequalities give two positive differences, and , and we eliminate between them. Since is positive it has a predecessor, so , so the of the second equation appears inside the first. Substituting turns into , so carries the two differences and ; uniqueness forces , and a sum is zero only when both parts are, so , contradicting the choice of as positive.
Proof.
Suppose and . The first gives with , the second gives with . Since it has a predecessor, so for some . Then
So , and uniqueness of differences gives ; hence , contradicting .
Show that the only with are and .
Prove that if and only if , for all .
Let , with multiplication as in the problems of the last chapter.
- If then , and if and only if .
- If then ; and if moreover and , then .
- If then .
- If and , then .
Suppose and in . Show that .
Show that and for every , and that implies for all with .
Let .
- If and , then if and only if .
- If then .
- If then .
State the hypotheses on under which each of
is defined, and prove all three.
- Determine all for which and are both defined, and decide whether the two agree whenever both are.
- Decide whether whenever the left-hand side is defined.
Well-Ordering and Induction Variants
With the order we can prove the form of induction that starts at an arbitrary natural number.
Theorem 6.40 (Induction from an arbitrary starting point).
Let and let be a predicate on . If holds, and if for every , then holds for every .
Discussion.
Ordinary induction starts at , and the hypotheses say nothing below , so we enlarge the set where holds until the fifth Peano condition applies. Let be that set and put , adding everything strictly below the starting point. We may assume , since at ordinary induction already applies, and then settles the base case without appealing to at all. For the step we take and compare with , which trichotomy resolves into three cases: below it lies in the padding, equal to it lies in by the base hypothesis, and above it forces itself to be at or above , so lies in and the given step applies. Induction then gives ; since the two cuts are disjoint and exhaust everything, the added part has nothing at or above , and is what remains.
Proof.
Let and put . It is enough to prove , for then and give , which is the assertion.
We may assume , since is ordinary induction. Then . Let and compare with .
If then . If then by the base hypothesis. If then , since would put strictly between and ; hence , so , and the induction hypothesis gives .
In every case , so the fifth Peano condition gives .
Theorem 6.41 (Well-ordering of the natural numbers).
Every non-empty subset has a smallest element: there is with for every . We write .
Discussion.
A non-empty may be unbounded, so we first cut it down to a bounded piece. Choose any and put , which holds and so is non-empty. A smallest element of is already smallest in , since everything in outside is at least and therefore above it. So we may assume and induct on , taking for the statement that every non-empty subset of has a smallest element. The base case can be checked directly: is , so the only non-empty subset is . For the step, take a non-empty subset of and intersect it with ; if the intersection is empty then nothing between and its successor leaves only , and otherwise the hypothesis supplies a smallest element of the intersection, which by the cutting-down argument is smallest in the whole set.
Proof.
Choose and put ; since we have , so is non-empty. If is smallest in then , while every member of is at least and hence above ; so is smallest in . It therefore suffices to show, by induction on , that every non-empty subset of has a smallest element.
For , the cut is : an cannot be positive, since would put strictly between and its successor. So the only non-empty subset of is , whose smallest element is .
Suppose every non-empty subset of has a smallest element, and let be contained in . If then every element of is at least and below , so and is its smallest element. Otherwise has a smallest element , and the argument of the first paragraph shows is smallest in . Induction completes the proof.
Corollary 6.42 (Method of infinite descent).
No non-empty subset has the property that every admits an with .
Proof.
If such an existed, well-ordering would give it a smallest element , and the hypothesis would supply with , contradicting minimality.
One cannot descend for ever through a non-empty set of natural numbers. The Greeks already used this as a proof technique, and we shall use it when we come to the numbers that are not fractions.
Theorem 6.43 (Strong induction).
Let be a predicate on with true, and suppose that for every the truth of for all implies . Then holds for every .
Discussion.
In ordinary induction the step uses only the previous case; here it may use all earlier cases at once, and we prove this from well-ordering. Instead of building up the set where holds we look at the set where it fails: assume it non-empty and let be its smallest element. The base hypothesis rules out , so has a predecessor . Minimality says holds for every , and since nothing lies strictly between and , those are precisely the , which is what the step needs at . The step therefore yields , that is , and was chosen to make fail.
Proof.
Let and suppose . Well-ordering gives it a smallest element , so fails while holds for every .
Since holds, , so the theorem on predecessors gives for some . Every satisfies , since and nothing lies strictly between; hence holds for every such . The hypothesis then gives , that is , a contradiction. So .
Deduce the fifth Peano condition from strong induction, so that the two induction principles are equivalent.
Show that strong induction can be proved without well-ordering, by applying ordinary induction to the set .
Let .
- Show that cannot hold for every .
- Show that if for every , then there is an with for every .
Let . Show that there is exactly one with .
Division with Remainder
A first use of well-ordering: dividing one natural number by another leaves a quotient and a remainder, both determined by the two numbers.
Theorem 6.44 (Division with remainder).
Let and . Then there is exactly one pair with
Discussion.
An “exactly one” claim asks for existence and uniqueness, and the two need different arguments. For existence we look for the remainder rather than the quotient: the set of numbers of the form that remain in is non-empty, since leaves itself, so well-ordering gives us its least member , and minimality forces : were at least we could subtract one more and get something smaller still. For uniqueness we assume two decompositions and show that a certain multiple of must be . Subtracting gives a multiple of equal to a difference of two remainders, and that difference is below because each remainder is; but a non-zero multiple of is at least , so the multiple is , the quotients agree, and the remainders follow.
Proof.
For existence, let . Taking gives , so is non-empty and well-ordering supplies , with for some .
Suppose . Then for some , so , putting ; and , since is positive. That contradicts minimality, so .
For uniqueness, suppose with , and take without loss. Then for some , and cancelling gives , so . If were positive then and , a contradiction; so , whence and then .
Corollary 6.45 (Remainder classes).
Let . Every has exactly one of the forms , , …, with .
Proof.
The theorem gives exactly one pair with and , and the values available to are precisely .
Taking splits into the even numbers, those of the form , and the odd ones, those of the form ; the corollary says every natural number is one or the other and none is both.
Let with positive. Show that divides , in the sense that for some , exactly when the remainder of the theorem is .
Show that divisibility orders as a partial order in the sense of Definition 6.16 , and find the minimum and the maximum, if they exist, of in that order.
Descent in Action
Here is an application of infinite descent.
Proposition 6.46 (Odd squares are odd).
Let . If is even then is even.
Discussion.
We prove the contrapositive, which is the easier direction to compute with: an odd is by the remainder classes, and squaring it and collecting terms exhibits the result as twice something plus one. Only the laws of addition and multiplication are needed; the remainder classes turn “not even” into the usable form .
Proof.
Suppose is odd, so for some by the remainder classes. Then
which is odd. So an even forces to be even.
Theorem 6.47 (Two is not a ratio of squares).
There are no with .
Discussion.
We argue by contradiction, using infinite descent, so we build a non-empty set in which every member has a smaller member. Suppose some pair works and let be the set of all admitting a partner ; the supposition puts something in . The descent comes from using parity twice. From the square is even, so is even by the proposition above; writing and substituting makes even, hence even too, say . Cancelling a factor of four leaves , which puts in as well, and because halving a positive number decreases it. Infinite descent forbids this.
In terms of fractions, which we have not built yet, this says that no fraction squares to two.
Proof.
Suppose such a pair exists and let , which is then non-empty.
Let with partner . Then is even, so by the proposition above. Substituting gives , so ; hence is even and for some . Substituting again gives , so , putting . Since with positive, we have .
So every member of has a smaller member, which infinite descent forbids. Hence no such pair exists.
Show that there are no with , and decide whether the same argument rules out .
Expansions in a Base
Writing a number in base is repeated division with remainder, and the digits are the remainders.
Theorem 6.48 (Expansion in a base).
Let with . For every there are uniquely determined and with and for each , such that
Discussion.
The digits come from dividing repeatedly: set , divide by to leave the lowest digit and a quotient , divide that to leave , and so on. Two things must be checked. It stops because makes each non-terminal quotient strictly smaller than the number it came from, and a scheme that never halted would descend for ever through , which descent forbids. The digits add back to because each equation expresses one quotient in terms of the next, so substituting upwards leaves the displayed sum. Uniqueness runs the same divisions in reverse: division with remainder determines and from , then and from , and so on, fixing the leading digit and the final index along with the rest.
Proof.
Put and apply division with remainder repeatedly:
Each line is division with remainder applied to and . Since , a non-zero quotient satisfies , so the scheme cannot run for ever without contradicting infinite descent; it therefore halts at some with .
Substituting each line into the one above it gives . Uniqueness of the quotient and remainder at each step gives uniqueness of the list of digits, and of .
We write , and call the cases and the binary and decimal expansions. The value can be recovered by a recursion which never computes a power separately:
This is Horner’s scheme for base . It uses one multiplication by at each stage, in all, where computing every power first and then forming every term uses up to twice as many.
Write in base , and write in base .
Let and let be as in the theorem. Show that .
The Maximum Principle
Well-ordering says every non-empty subset of has a minimum. The dual statement is false as it stands, since itself has no maximum, but it becomes true once an upper bound is present.
Theorem 6.49 (Maximum principle).
Let be non-empty with an upper bound in . Then has a maximum.
Discussion.
We cannot induct on , which is an arbitrary set, so we induct on the bound instead: let be the set of those such that every non-empty subset bounded above by has a maximum, and aim at ; once that is known, any upper bound of the given lies in and gives a maximum. The base case can be checked directly, since a set bounded above by can only be , every element being at least . For the step we take a non-empty bounded above by and split on whether belongs to : if it does, it is a bound lying in the set and the previous proposition finishes at once; if it does not, then is itself an upper bound, because an element strictly above and at or below but different from it would sit strictly between and its successor, which nothing does.
Proof.
Let be the set of such that every non-empty with upper bound has a maximum.
For : let be non-empty with upper bound , and take . Then , while , so by antisymmetry. Hence , and is a bound lying in , so it is the maximum.
Suppose and let be non-empty with upper bound . If then is an upper bound lying in , hence the maximum. If , we claim bounds : an element with satisfies and , so , which nothing does. So is an upper bound of , and supplies a maximum. Hence .
By induction . Given non-empty with upper bound , we have , so has a maximum.
A partially ordered set in which every non-empty subset has a minimum is called well-ordered. By the theorem above is well-ordered, and so is , whose non-empty subsets are non-empty subsets of . has two further order properties: every element beyond the minimum has an immediate predecessor, and there is no greatest element. Together with well-ordering these determine the order completely.
Theorem 6.50 (Characterisation of the natural numbers).
Let be a non-empty well-ordered set in which every element other than has an immediate predecessor, meaning an element with nothing of strictly between, and which has no greatest element. Then there is an order-preserving bijection from to .
Discussion.
The conclusion asks for the order of inside , so the plan is to build a successor map on from the three hypotheses and then check that it reaches everything. In the successor of is the least element above , and that phrase makes sense in : the absence of a greatest element keeps the set of elements above non-empty, and well-ordering gives it a minimum, which we call . The predecessor hypothesis makes behave like a successor map, since nothing is reached from below except through an immediate predecessor, so is never a value of and two elements cannot share one. With in hand the recursion theorem builds the candidate: start at and keep applying . As , the values climb, which already gives order-preservation and injectivity; the main work is surjectivity, where we take the least element never reached, which cannot exist because its immediate predecessor is reached and carries that to it.
Proof.
Write and for put , which exists because has no greatest element and is well-ordered. By construction and nothing of lies strictly between and .
An element has exactly one immediate predecessor: two of them, say , would put strictly between and . Hence is injective, since makes and both immediate predecessors of ; and is not a value of , since .
The recursion theorem, applied with and , gives exactly one with and . Since for every , induction gives whenever ; in particular is injective.
For surjectivity, let be the range of . Then , and is closed under , since . Suppose is non-empty and let be its least element. Since we have , so has an immediate predecessor ; by minimality of we have , and because nothing lies strictly between. Closure of under gives , a contradiction. Hence is a bijection.
Remark.
The proof never carries out an induction inside : surjectivity uses well-ordering through a least counterexample, and itself comes from the recursion theorem on . One may therefore take well-ordering, the predecessor property and the absence of a greatest element as axioms in place of Peano’s; the theorem says the two systems describe the same ordered set.
Let be non-empty. Prove that has a minimum by applying the maximum principle to the set of lower bounds of , rather than by appealing to well-ordering.
State and prove the maximum principle for non-empty subsets of bounded above in , starting the induction at .
Let be an ordered set in which every two-element subset has a minimum. Show that the order is total, and deduce that every well-ordered set is totally ordered.
Let be such that for every there is an with . Prove that there is exactly one bijection with whenever .
Order by declaring when , or when and . Show that this is a strict linear order in which every non-empty subset has a least element.
Theorem 6.50 asks three things of . Exhibit a well-ordered set with no greatest element in which some element other than the minimum has no immediate predecessor, and a well-ordered set in which every element other than the minimum has an immediate predecessor but a greatest element exists. For the first, name the element that has no immediate predecessor.
- Exhibit a totally ordered set with no greatest element in which every element has an immediate predecessor, and which is not well-ordered.
- Show that there is no bijection with whenever , and say where the proof of Theorem 6.50 uses the hypothesis that fails.
- Order as in Problem 6.35 . Show that the result is totally ordered but not well-ordered.
Sequences
A list is a function whose inputs are positions. The cuts defined for the natural numbers give us the positions, so nothing new is needed.
Let be a set. A finite sequence in of length is a function from to , written or , in the notation already used for tuples; the unique sequence of length is the empty function, written . An infinite sequence in is a function from to . We write
for the set of all finite sequences in , using the Cartesian power of the last chapter but one.
That is a set takes a moment. Each consists of functions from to , hence of subsets of , so all of them lie inside ; comprehension collects them and the union axiom pools them.
Remark.
Some texts say instead that a finite sequence is a function whose domain is a natural number. That is the same definition read through the construction of the last chapter, where was built as the set holding exactly its predecessors, so that . We use the cut, which says the same thing without leaning on which sets the numerals happen to be.
Restriction gives the initial pieces of a sequence: for defined on and , the restriction is the finite sequence of length , recording everything before position and nothing else.
The General Recursion Theorem
The recursion theorem of the last chapter lets the next value depend on the previous one, and its parametrised form lets it depend on the index as well. Neither is enough when the next value depends on all the earlier ones at once. With sequences we can state such a rule, and with the order we can prove that it defines a function.
Theorem 6.52 (General recursion).
Let be a set and let . Then there is exactly one with
Discussion.
The rule wants the whole history at each step, so we recurse on histories rather than on values: instead of building directly we build the sequence of its initial pieces. Let send a pair to extended by the value at position , whenever has length , and to the empty sequence otherwise; that second clause is bookkeeping only, since the case never arises. Parametrised recursion then gives a map on with the empty sequence and , and an induction shows has length exactly , so the bookkeeping clause is never reached. Each extends its predecessors, so their union is a single function on whose restriction to is , and reading the construction back gives the required identity. Uniqueness uses strong induction: two solutions agreeing everywhere below have the same restriction to , so returns the same value at , and ordinary induction would not deliver that hypothesis.
Proof.
Define by
By parametrised recursion there is a unique with and .
We claim has length . This holds at . If has length , then , whose domain is ; and , since holds exactly when or , nothing lying strictly between and . So has length , and induction gives the claim.
Each is therefore a function extending all the earlier ones, so their union is a function on with for every . Then
which is the required identity.
For uniqueness, let also satisfy the identity, and suppose for every . Then , so . Strong induction gives .
Show that the recursion theorem of the last chapter is a special case of this one: given and , exhibit a whose solution is the map with and .
Let be a set and . Show that the finite sequences built in the proof satisfy whenever , and explain where that is used.
General Associativity
We can now prove something used without proof earlier. Addition was defined for two arguments and proved associative and commutative for two and three; the notation assumes more, namely that the brackets and the order may be chosen freely. With finite sequences and induction in hand we can say what that means and prove it.
Fix a left-associated reading once and for all: for a finite sequence of length in a Peano system with addition, define
So of the sequence is , brackets to the left. A full bracketing of is either the single term, when , or a sum in which is a full bracketing of an initial piece and is a full bracketing of the rest.
Theorem 6.53 (General associativity and neighbour swaps).
Let be a finite sequence of length in a Peano system with addition.
- Every full bracketing of equals .
- If is obtained from by exchanging two neighbouring entries, then .
Discussion.
The first part is an induction on , but a bracketing may split the sum anywhere, so the step needs one auxiliary fact: the left-associated sum of the whole is the left-associated sum of the first entries added to that of the rest. That splitting identity is itself a short induction on the length of the second block, using nothing but binary associativity, and with it the step applies the hypothesis to the two halves of the bracketing and adds the results.
Once every bracketing is identified with , the second part may ignore brackets altogether. Exchanging neighbours rearranges a two-term middle and nothing else, so binary commutativity sorts that middle and the splitting identity puts the rest of the list back around it.
Proof.
We first record the splitting identity: for ,
Fix and induct on the length of the second block. If this is the defining clause of . If it holds at , then appending one more entry gives
and associativity of addition regroups this as , which is the identity at .
For the first part, induct on . The case is immediate. Let be a full bracketing of , so where brackets the first entries and the rest. The inductive hypothesis gives and , so by the splitting identity.
For the second part, let exchange the entries at positions and . The two-term identity is commutativity. If the exchanged pair is the whole sequence we are done; otherwise two applications of the splitting identity write as a sum in which that pair appears as a single middle block, and the same decomposition of differs only in that block, which commutativity identifies with it.
Brackets therefore no longer matter, and neighbouring summands may be exchanged at will. Any rearrangement of a finite list can be reached by a string of neighbour exchanges, moving each entry past its neighbours until it sits where it should, so the value of a finite sum depends on neither the bracketing nor the order of its terms.
Carry out the same argument for multiplication: define the left-associated product by the clauses and when has length , and prove both parts of the theorem for it. Which laws replace associativity and commutativity of addition at each step?
Show that any rearrangement of a finite sequence is a string of neighbour exchanges, so that the last sentence above is a theorem rather than an appeal to intuition. (Harder.)
Zorn’s Lemma
Finally, two statements equivalent to the axiom of choice, and the reason some mathematicians do not accept it.
Definition 6.54 (Chains and inductively ordered sets).
Let be a partially ordered set. A subset is a chain if the order induces on is a total order, that is, if any two elements of are comparable. The set is inductively ordered if every chain in has an upper bound in .
Remark.
An inductively ordered set is never empty. The empty subset is a chain, vacuously, so it too must have an upper bound, and an upper bound is an element of .
Every inductively ordered set has at least one maximal element.
Discussion.
We state this without proof. It is not a theorem of the axioms we have listed: on the basis of the rest, Zorn’s lemma is equivalent to the axiom of choice, so proving it would amount to deriving one from the other, and the derivation is long enough to belong to a course in set theory rather than here. Note the form of the statement. The hypothesis is about chains, which are the totally ordered pieces of , and the conclusion is about a maximal element, which need not be a maximum: nothing says the element found is comparable with everything, only that nothing strictly exceeds it. In a partial order a maximal element need not be a maximum, which is why the conclusion is stated this way.
Remark.
The result is due to Kuratowski, though it carries Zorn’s name; Zorn proved the equivalence with choice and was the first to put the statement to work on algebraic questions.
Theorem 6.56 (Well-ordering theorem).
Every non-empty set can be ordered so that every non-empty subset has a least element.
Discussion.
Again we state without proof, for the same reason: on the basis of the other axioms the well-ordering theorem, Zorn’s lemma and the axiom of choice are all equivalent to one another. Of the three it is the hardest to believe. Well-ordering of was a theorem we proved, resting on the successor structure; here the claim is that any set whatever admits such an order, however little structure it carries and however unlike the natural numbers it looks.
Remark (Informal).
Assuming you know the real numbers, they are not well-ordered by their usual order: the set of those greater than has no least element, since any candidate is beaten by something smaller still above . The well-ordering theorem nevertheless asserts that some other order on them is a well-order. No such order has ever been exhibited, and none can be described explicitly; the theorem asserts that one exists and offers no way to find it.
That gap between existence and construction is what leads some mathematicians to reject the axiom of choice. Our position is to accept it, and to say plainly when we use it.
Show that a maximal element need not be a maximum, by exhibiting a partially ordered set with two maximal elements. Show also that in a total order the two notions coincide.
Let be a set and consider ordered by inclusion. Show that it is inductively ordered when is non-empty, and identify its maximal elements.
Exercises
Answers are checked in your browser, as often as you like. Nothing is sent anywhere and
nothing is kept but your own work. A formula may be written with the symbols themselves or
with ~ & | -> <-> ^, and \and, \or, \to expand as you type.
Keep and write for the relation above. In each line, the smallest relation on containing and having the stated property is:
Transitive.
Symmetric.
Reflexive. Its number of pairs is:
An equivalence relation.
Each line below is a relation on . Decide which are equivalence relations and which are strict linear orders.
.
.
.
and leave the same remainder on division by .
Let be an equivalence relation on .
Suppose has exactly three ordered pairs. Then is:
Can have exactly four ordered pairs?
The largest number of ordered pairs can have is:
For that , the induced partition is:
On take , which is an equivalence relation.
The class is:
The quotient is:
Which of these are equivalence relations?
On the set of human beings, when and weigh within one pound of each other.
On , when divides .
On , when is even.
On , when . This is an equivalence relation, and its blocks are:
On the set of solid-colour cars, when and have the same colour. This is:
The order of Definition 6.32 and the cuts of Definition 6.37 .
The cut is:
The number of elements of is:
For , the set is:
The difference :
For each subset of below, the minimum and the maximum, in the sense of Definition 6.20 , are:
.
The set of even numbers.
The set of odd numbers.
.
.
The set of multiples of .
Keep and from the last exercise, with all bounds taken in .
The lower bounds of are:
Its upper bounds are:
The lower bounds of are:
And its upper bounds are:
Let , ordered by divisibility, so that means that divides .
The minimal elements of are:
The maximal elements are:
As for a minimum and a maximum:
Exercises in Lean
The proofs below are checked in your browser. Nothing is sent anywhere, and nothing is
stored but your own work. Type \to for →,
\and for ∧, \< and
\> for ⟨ ⟩.
The last sheet gave the checker a Peano system to compute in. This chapter needs two more things of it, and only one of them is new. A relation is a set of ordered pairs, and pairs, products and sets are all already there; the order on is not, and arrives as notation below.
Relations
A relation on is a subset of , so is typed as the membership it abbreviates, (x, y) ∈ R. The three properties of Definition 6.2 are not names the checker knows; they are written out as the statements they are, so symmetry of enters a problem as the hypothesis
hs : ∀ a b : Obj, (a, b) ∈ R → (b, a) ∈ Rand is used by applying it to two objects and a membership, left to right: hs x y h.
One piece of notation is new. The separation axiom carves a subset out of a set by a criterion, and it is written {x ∈ A | p x}, with the membership criterion the axiom gives: y ∈ {x ∈ A | p x} is y ∈ A ∧ p y, in the way that x ∈ A ∩ B was a conjunction on an earlier sheet. So ⟨_, _⟩ builds a membership and .left and .right take one apart. This is what lets an equivalence class be written down: of Definition 6.26 is {s ∈ S | (s, a) ∈ R}.
Example.
The universal relation on is reflexive. Membership in a product is a conjunction, and here both halves are the same hypothesis.
Example.
Reflexivity puts in its own class. The two halves of the criterion are the two things the class asks of .
The empty relation is symmetric and transitive.
And the universal relation is transitive.
Symmetry and transitivity give reflexivity, but only at the elements the relation already reaches.
The first half of Problem 6.3 , with written out.
Symmetry survives intersection.
Proposition 6.22 , with the order written as a relation and antisymmetry as a hypothesis.
The step of Proposition 6.28 : classes that meet come from related elements.
And the step , which is an equality of sets.
The order on the natural numbers
ℕ is the carrier of the last sheet, and the order is written ≤ and <, typed \le and <. Neither is a name in the library: they are the definitions of Definition 6.32 and Proposition 6.35 outright, so
m ≤ n is ∃ b : ℕ, n = m + b
m < n is ∃ b : ℕ, b ≠ 0 ∧ n = m + band every tactic for an existential acts on them unchanged: use supplies the difference, obtain ⟨b, hb, he⟩ takes a strict inequality apart into a positive and the equation it satisfies, and obtain ⟨b, he⟩ does the same for a non-strict one. The reverse orders > and ≥ are these two read backwards, as Definition 6.14 has them. Numerals are still spelled as the last sheet spelled them, so is succ 0.
Example.
The difference that makes an element reach itself is , and the first clause of addition checks it.
Example.
Corollary 6.33 . Once the difference is named, one half is the hypothesis and the other holds of itself.
The second half of Proposition 6.36 .
Every element is below its successor.
A positive difference is a difference.
Proposition 6.8 , proved here from uniqueness of differences rather than from trichotomy.
Transitivity: two positive differences compose into one.
Antisymmetry, which is the second law of Proposition 6.11 .
No comparison points both ways.
The first part of Problem 6.16 .
And the second, with the factor on the left so that distributivity applies as it stands.
Problem 6.15 . Both directions move a successor between the two sides of a sum.
Proposition 6.39 . (Harder.)
What the checker understands
Tactics
| intro h | assume the hypothesis of an implication, naming it h |
| exact e | give the proof outright |
| apply f | reduce the goal to the hypotheses of f |
| assumption | close the goal with a hypothesis already present |
| trivial | close the goal True |
| exfalso | replace the goal with False |
| by_contra h | assume the negation of the goal |
| constructor | split ∧ into both halves, or ↔ into both directions |
| left / right | choose which half of a ∨ to prove |
| rcases h with a | b | argue by cases on a disjunction |
| obtain ⟨a, b⟩ := h | take a conjunction or an existential apart |
| cases h | as above, keeping the name |
| refine e | give the proof with holes left in it |
| have h : p := … | record an intermediate result |
| show p | restate the goal in an equal form |
| use w | give a witness for ∃ |
| specialize h a | instantiate a ∀ hypothesis |
| rw [h] | rewrite with an equation, ← to go backwards |
| rfl | both sides compute to the same thing |
| decide / norm_num | settle a closed computation |
| tauto | close a goal that is true by pure logic |
| induction n with k ih | the fifth Peano condition: prove the goal at 0, then at succ k from ih |
Results you may cite
| Classical.em | ∀ (a : Prop), a ∨ ¬a — the law of excluded middle |
| Classical.byContradiction | ∀ {a : Prop}, (¬a → False) → a — proof by contradiction; the tactic by_contra does this for you |
| Classical.byCases | ∀ {a b : Prop}, (a → b) → (¬a → b) → b — split on whether a holds |
| not_not | ∀ {a : Prop}, ¬¬a ↔ a — double negation |
| not_and_or | ∀ {a b : Prop}, ¬(a ∧ b) ↔ ¬a ∨ ¬b — De Morgan |
| not_or | ∀ {a b : Prop}, ¬(a ∨ b) ↔ ¬a ∧ ¬b — De Morgan |
| not_imp | ∀ {a b : Prop}, ¬(a → b) ↔ a ∧ ¬b |
| and_comm | ∀ {a b : Prop}, a ∧ b ↔ b ∧ a |
| or_comm | ∀ {a b : Prop}, a ∨ b ↔ b ∨ a |
| Set.ext | ∀ {A B : Obj}, (∀ x : Obj, x ∈ A ↔ x ∈ B) → A = B — extensionality: sets with the same elements are equal |
| Set.ext_iff | ∀ {A B : Obj}, A = B ↔ (∀ x : Obj, x ∈ A ↔ x ∈ B) — extensionality and substitution, in one biconditional |
| Set.subset_antisymm | ∀ {A B : Obj}, A ⊆ B → B ⊆ A → A = B — mutual inclusion is equality |
| Set.empty_subset | ∀ {A : Obj}, ∅ ⊆ A — the empty set is a subset of every set |
| Set.pair_eq | ∀ {a b c d : Obj}, ((a, b) = (c, d)) ↔ (a = c ∧ b = d) — two ordered pairs are equal exactly when their coordinates are |
| Nat.succ_inj | ∀ {m n : ℕ}, succ m = succ n → m = n — the third Peano condition: the successor is injective |
| Nat.succ_ne_zero | ∀ (n : ℕ), succ n ≠ 0 — the fourth: zero is nobody's successor |
| Nat.pred | ∀ {n : ℕ}, n ≠ 0 → ∃ m : ℕ, n = succ m — predecessors: everything but zero is a successor |
| Nat.add_zero | ∀ (m : ℕ), m + 0 = m — the first clause of addition |
| Nat.add_succ | ∀ (m n : ℕ), m + succ n = succ (m + n) — the second clause of addition |
| Nat.zero_add | ∀ (n : ℕ), 0 + n = n — addition from the left |
| Nat.succ_add | ∀ (m n : ℕ), succ m + n = succ (m + n) — addition from the left, at a successor |
| Nat.add_assoc | ∀ (m n p : ℕ), (m + n) + p = m + (n + p) — addition is associative |
| Nat.add_comm | ∀ (m n : ℕ), m + n = n + m — addition is commutative |
| Nat.add_ne_zero | ∀ {a : ℕ} (b : ℕ), a ≠ 0 → a + b ≠ 0 — positivity is absorbing |
| Nat.mul_zero | ∀ (m : ℕ), m * 0 = 0 — the first clause of multiplication |
| Nat.mul_succ | ∀ (m n : ℕ), m * succ n = m * n + m — the second clause of multiplication |
| Nat.zero_mul | ∀ (m : ℕ), 0 * m = 0 — multiplication from the left |
| Nat.succ_mul | ∀ (m n : ℕ), succ m * n = m * n + n — multiplication from the left, at a successor |
| Nat.add_right_cancel | ∀ {m n k : ℕ}, m + k = n + k → m = n — cancellation, from the last sheet |
| Nat.add_eq_zero | ∀ {m n : ℕ}, m + n = 0 → m = 0 ∧ n = 0 — a sum is zero only when both parts are, from the last sheet |
| Nat.mul_comm | ∀ (m n : ℕ), m * n = n * m — multiplication is commutative, from the last sheet |
| Nat.mul_add | ∀ (m n p : ℕ), m * (n + p) = m * n + m * p — multiplication distributes over addition, from the last sheet |
| Nat.mul_assoc | ∀ (m n p : ℕ), (m * n) * p = m * (n * p) — multiplication associates, from the problems of the last chapter |
| Nat.add_mul | ∀ (m n p : ℕ), (m + n) * p = m * p + n * p — distributivity on the other side |
| Nat.add_left_cancel | ∀ {a m n : ℕ}, a + m = a + n → m = n — uniqueness of differences |
| Nat.lt_trichotomy | ∀ (m n : ℕ), m < n ∨ m = n ∨ n < m — trichotomy, from the theorem that ℕ is strictly ordered |
From the logical core
| And.intro | ∀ {a b : Prop}, a → b → a ∧ b |
| And.left | ∀ {a b : Prop}, a ∧ b → a |
| And.right | ∀ {a b : Prop}, a ∧ b → b |
| And.symm | ∀ {a b : Prop}, a ∧ b → b ∧ a |
| Or.inl | ∀ {a b : Prop}, a → a ∨ b |
| Or.inr | ∀ {a b : Prop}, b → a ∨ b |
| Or.elim | ∀ {a b c : Prop}, a ∨ b → (a → c) → (b → c) → c |
| Or.symm | ∀ {a b : Prop}, a ∨ b → b ∨ a |
| Iff.intro | ∀ {a b : Prop}, (a → b) → (b → a) → (a ↔ b) |
| Iff.mp | ∀ {a b : Prop}, (a ↔ b) → a → b |
| Iff.mpr | ∀ {a b : Prop}, (a ↔ b) → b → a |
| Iff.symm | ∀ {a b : Prop}, (a ↔ b) → (b ↔ a) |
| Iff.rfl | ∀ {a : Prop}, a ↔ a |
| Iff.trans | ∀ {a b c : Prop}, (a ↔ b) → (b ↔ c) → (a ↔ c) |
| True.intro | True |
| False.elim | ∀ {a : Prop}, False → a |
| absurd | ∀ {a b : Prop}, a → ¬a → b |
| id | ∀ {a : Prop}, a → a |
| mt | ∀ {a b : Prop}, (a → b) → ¬b → ¬a |
| Eq.refl | ∀ {α : Type} (a : α), a = a |
| Eq.symm | ∀ {α : Type} {a b : α}, a = b → b = a |
| Eq.trans | ∀ {α : Type} {a b c : α}, a = b → b = c → a = c |
| congrArg | ∀ {α : Type} {β : Type} {a b : α} (f : α → β), a = b → f a = f b |
| Exists.intro | ∀ {α : Type} {p : α → Prop} (w : α), p w → ∃ x : α, p x |
| Exists.elim | ∀ {α : Type} {p : α → Prop} {b : Prop}, (∃ x : α, p x) → (∀ y : α, p y → b) → b |