2.5  Equinumerous Sets and Finite Sets

Section 1.1 left a puzzle half solved: among any five lattice points, two have a lattice point as midpoint, provided that five objects in four boxes always put two in one box. That principle sounds too obvious to need proof, but it is a statement about every finite collection, and “finite” has no definition yet. Section 1.6 supplied the tool: a bijection pairs the elements of two sets one for one. This section makes “the same size” mean “there is a bijection”, defines finite sets by pairing with {1,…,n}, proves the pigeonhole principle and comes back to the five points, and then proves the facts about finite sets on which counting rests. Whether Q is larger than N is the question of Chapter 3.

2.5.1. Same size without counting

So far we have compared functions; now we compare sets. The everyday word is “as many as”, and we can check it without knowing any numbers. Put two piles of coins on a table, and take one coin from each pile at a time, setting the two aside as a pair. If both piles run out at the same moment, they had the same number of coins. We know this before counting either pile, and a child who cannot count past ten can do it with piles of a thousand. Section 1.6 proved that the bijections are exactly the maps with a two-sided inverse (Theorem 1.6.4), and said that such a pairing is how this book says “the same size”.

The pairing is a function from the first pile to the second. Different coins are paired with different coins, so it is injective; every coin of the second pile is used, so it is surjective. Pairing makes sense for any two sets, finite or not, and that is the definition.

Same size means there is a pairing.

Definition 2.5.1 (Equinumerous Sets)

Let A and B be sets. We say that A and B are equinumerous, and write |A|=|B|, if there exists a bijection f:A→B. In symbols, |A|=|B|⟺∃f∈BA  (f is injective∧f is surjective).

In words: the definition asks for one bijection, and it does not care which. Injectivity says that no two elements of A are paired with the same element of B; surjectivity says that no element of B is left over. The statement |A|=|B| is read as a whole, “A and B are equinumerous”. It is a relation between two sets. We do not define an object |A|, “the size of A”, standing alone, and a second-reading fold below explains why the obvious candidate is not available. For finite sets, the definition of a finite set below gives |A| a meaning as a natural number, and the two uses agree.

Here are four examples, the degenerate one first.

  • The empty set. The empty function ∅→∅ of Proposition 1.5.2 (a) is injective and surjective, vacuously: there are no two inputs to compare and no output to reach. So |∅|=|∅|. Conversely, if |A|=|∅|, there is a function A→∅, so A=∅ by Proposition 1.5.2 (b). The empty set is equinumerous with itself and with nothing else. This case is the test case for every statement below about sets “with n elements”, at n=0.
  • Three letters and three numbers. Let a,b,c be three different letters. The function {a,b,c}→{1,2,3} with a↦1, b↦2, c↦3 sends different letters to different numbers and reaches each of 1,2,3. So |{a,b,c}|=|{1,2,3}|.
  • Two intervals of different lengths. The function f:[0,1]→[0,2], f(x)=2x, has the inverse y↦y/2, since y/2∈[0,1] for y∈[0,2], f(y/2)=y and f(x)/2=x. By Theorem 1.6.4 it is a bijection, so |[0,1]|=|[0,2]|. Length and size are different things.
  • The natural numbers and the positive integers. The function N→Z>0, n↦n+1, is a bijection. It is the Quick check near the end of this section, where it shows that N is infinite.

Quick check. Decide, from Definition 2.5.1: (a) |∅|=|{∅}|? (b) |{1,2}|=|{{1,2}}|? (c) |{x∈R:x2=−1}|=|∅|?

Solution.

  • (a) No. The set {∅} has the element ∅, and a function ∅→{∅} has no values, so it is not surjective. (b) No. The set {{1,2}} has one element, so every function {1,2}→{{1,2}} sends 1 and 2 to it and is not injective. (c) Yes. The set {x∈R:x2=−1} is empty, and the empty function ∅→∅ is a bijection.

A non-example by a minimal change. Shrink {1,2,3} to {1,2}. There is no bijection {a,b,c}→{1,2}. Let g be any function {a,b,c}→{1,2}. If g(a)=g(b), then g is not injective. Otherwise g(a) and g(b) are 1 and 2 in some order, and g(c), which is 1 or 2, equals one of them. In every case two different letters share a value. So the clause that fails is injectivity, and it fails for every function, which is what “not equinumerous” requires. Surjectivity can hold: a↦1, b↦2, c↦2 reaches both numbers.

Warning. To show that two sets are not equinumerous, one map is never enough. The map x↦x from [0,1] to [0,2] is not surjective, since 2 is not a value, and yet |[0,1]|=|[0,2]| by the map x↦2x above. “Not equinumerous” is a statement about all functions, ∀f∈BA¬(f bijective), and a proof of it must deal with an arbitrary f, as the non-example did.

Why this definition. To count a set is to pair it with {1,…,n}: saying “one, two, three” while pointing at the coins is a bijection from {1,2,3} onto the pile. So the definition does not replace counting; it isolates the part of counting that still makes sense when the set is infinite. Each clause has a job. Without injectivity, the surjection {1,2,3}→{1} would make a three-element set as large as a one-element set. Without surjectivity, the inclusion {1}→{1,2,3} would do the same in the other direction.

The first result says that equinumerosity behaves like equality: reflexive, symmetric and transitive.

Proposition 2.5.1 (Equinumerosity Is Reflexive, Symmetric and Transitive)

For all sets A, B and C:

  • (a) |A|=|A|;
  • (b) if |A|=|B|, then |B|=|A|;
  • (c) if |A|=|B| and |B|=|C|, then |A|=|C|.

Proof. (a) The identity idA is injective, since idA(x)=idA(y) says x=y, and surjective, since every x∈A is idA(x).

(b) Let f:A→B be a bijection. By Theorem 1.6.4 it has a two-sided inverse f−1:B→A, with f−1∘f=idA and f∘f−1=idB. Read with the roles exchanged, these two equations say that f is a two-sided inverse of f−1 (Definition 1.6.2). So f−1 is a bijection B→A, by Theorem 1.6.4 again.

(c) If f:A→B and g:B→C are bijections, then g∘f:A→C is a bijection by Theorem 1.5.4 (c). This proves the proposition.

Clauses (a)–(c) say that equinumerosity behaves like an equivalence relation: reflexive, symmetric and transitive, as equality is. We do not call it one. Chapter 4 makes “equivalence relation” precise for relations on a set X, subsets of X×X; equinumerosity relates any two sets whatever, and there is no set of all sets for it to live on (Theorem 1.2.4). That is also why the book writes |A|=|B| here and keeps the symbol ∼ for later.

Second readingWhy |A| is not an object

Remark. Why not define |A| as “the collection of all sets equinumerous with A”? Because that collection is in general not a set. The next paragraph proves this for A={0}.

Take A={0}. Every singleton {x} is equinumerous with {0}, by 0↦x. If the singletons formed a set S, its union ⋃S would be a set by (W3) of Section 1.2, and every object x would be an element of it, since x∈{x}∈S. That is a set of which every set is an element, which Theorem 1.2.4 rules out.

2.5.2. Finite sets

Counting is pairing with {1,…,n}, so “finite” is defined by such a pairing. Recall from Section 2.1 that for n∈N, {1,…,n}:={k∈N:1≤k≤n}, so that {1,…,0}=∅, since no k has 1≤k≤0.

Definition 2.5.2 (Finite Set, Number of Elements)

Let A be a set and n∈N. We say that A has n elements if |{1,…,n}|=|A|, that is, if there exists a bijection φ:{1,…,n}→A. The set A is finite if it has n elements for some n∈N. In that case we write |A|=n.

In words: φ numbers the elements of A as φ(1),φ(2),…,φ(n). Injectivity says that no element gets two numbers; surjectivity says that every element gets one. So a non-empty finite set is A={φ(1),…,φ(n)}, a list without repetitions. By Proposition 2.5.1 (b), “A has n elements” is the same as |A|=|{1,…,n}|, so the notation |A|=n is consistent with the relation of Definition 2.5.1.

There is a gap in the notation |A|=n. It presents n as the number of elements, but the definition only says that some n works. Could a set have 3 elements and also 4? It cannot, and a corollary of the pigeonhole principle below proves it. That corollary is the well-definedness step this definition needs. Until it is proved, read |A|=n as “A has n elements”.

Examples:

  • The empty set has 0 elements: {1,…,0}=∅, and the empty function ∅→∅ is a bijection. Conversely, a set with 0 elements is empty, since a bijection ∅→A is surjective and has no values.
  • {1,…,n} has n elements, by id{1,…,n}.
  • For n∈N, {0,…,n} has n+1 elements: k↦k−1 maps {1,…,n+1} to {0,…,n}, because k−1∈N for k≠0 (Lemma 2.1.1 (c)) and k−1≤n. It has the inverse j↦j+1, so it is a bijection (Theorem 1.6.4).
  • The three-letter set {a,b,c} has 3 elements, by the inverse of the bijection of the second example after Definition 2.5.1.

Quick check. How many elements does {n∈N:3≤n≤7} have? Give the bijection.

Solution. Five, by k↦k+2 from {1,…,5}: for 1≤k≤5, 3≤k+2≤7. Its inverse is m↦m−2, which lies in {1,…,5} for 3≤m≤7, since m−2∈N by Lemma 2.1.1 (d). The two maps undo each other, so the first is a bijection (Theorem 1.6.4).

Definition 2.5.3 (Infinite Set)

A set A is infinite if it is not finite: for every n∈N there is no bijection {1,…,n}→A.

To prove a set infinite we must rule out every n at once, and for every n every candidate bijection. Nothing so far does that, not even for N. The tool is the pigeonhole principle, and the last theorem of this section turns it into a usable test.

Shrinking the codomain. One small device is used in the rest of this section and in Chapter 3. Let f:X→Y be a function, and let C⊆Y contain every value f(x). The graph of f is then a subset of X×C, and with the codomain C it is a function X→C with the same values (Definition 1.5.1). We call it “f with codomain C”. It is injective if and only if f is, since injectivity speaks only of values. In particular, f with codomain f(X) is surjective (Definition 1.7.1). So an injective f:X→Y is a bijection X→f(X) once its codomain is shrunk, and |X|=|f(X)|.

2.5.3. Back to the pigeons

Section 1.1 reduced its question (Q1) to one step: five points, each with one of four parity patterns, put two points on one pattern. In the language of functions, sending each point to its pattern is a map from a five-element set to a four-element set, and the step says that it is not injective. Chapter 1 also found one function from a three-element set to a two-element set that is not injective (Example (Deciding injective and surjective) (c)), and observed without proof that none can be. Here is the general fact, for the standard sets {1,…,m} and {1,…,n}.

Theorem 2.5.2 (Pigeonhole Principle)

Let m,n∈N with m>n. Then there is no injection {1,…,m}→{1,…,n}.

Idea (Scratch work). Induct on the number n of holes. In the step there are n+1 holes, and we look at the last one. If no pigeon sits in hole n+1, all the pigeons sit in n holes, and the hypothesis applies at once. If pigeon j sits there, there is only one, by injectivity. Move pigeon j to the hole of pigeon m, and send pigeon m away. That leaves m−1 pigeons in n holes, still one to a hole, and m−1>n. The hypothesis is used at m−1, not at m, so the property we induct on must say “for every m”.

On scrap paper, with n=1 and m=3: three pigeons in two holes; if hole 2 is empty, all three sit in hole 1; if pigeon 2 sits in hole 2, move it to pigeon 3’s place and send pigeon 3 away. As givens and goal, inside the step:

Givens Goal
P(n); m>n+1; f:{1,…,m}→{1,…,n+1} injective a contradiction
Case 1: n+1 is no value of f f with codomain {1,…,n} is injective, m>n: against P(n)
Case 2: f(j)=n+1 an injection {1,…,m−1}→{1,…,n}, with m−1>n: g:=f∘σ

Before reading on: self-explain the construction of the injection g in Case 2: why are its values in {1,…,n}, and why is it injective?

Proof. For n∈N let P(n) be the statement

for every m∈N with m>n, there is no injection {1,…,m}→{1,…,n}.

We prove P(n) for every n∈N by Logic and Proof, Axiom 4.2.1.

Base case P(0). Let m∈N with m>0. Then m≥1 (Lemma 2.1.1 (a)), so 1∈{1,…,m} and the domain is non-empty, while {1,…,0}=∅. By Proposition 1.5.2 (b) there is no function {1,…,m}→∅ at all, so there is no injection.

Inductive step. Let n∈N and suppose P(n). Let m∈N with m>n+1, and suppose, for a contradiction, that f:{1,…,m}→{1,…,n+1} is injective. There are two cases.

Case 1: n+1 is not a value of f. For every i, f(i)≤n+1 and f(i)≠n+1, so f(i)<n+1, and f(i)≤n by Lemma 2.1.1 (e). So f with codomain {1,…,n} is an injection {1,…,m}→{1,…,n}, with m>n+1>n. This contradicts P(n).

Case 2: f(j)=n+1 for some j∈{1,…,m}. Since m>n+1≥1, we have m≠0, so m−1∈N by Lemma 2.1.1 (c); and m−1>n, by subtracting 1 from m>n+1. Define σ:{1,…,m−1}→{1,…,m} by σ(i):={iif i≠j,mif i=j. (The second line applies only when j≤m−1; if j=m, then σ(i)=i for every i.) The map σ is injective: two different inputs other than j keep their different values, and if one input is j, its value is m, while the other has value i≤m−1<m. Moreover σ(i)≠j for every i: either σ(i)=i≠j, or σ(i)=m, which happens only when j≤m−1<m.

Let g:=f∘σ. It is injective by Theorem 1.5.4 (a). For every i, σ(i)≠j, and f is injective with f(j)=n+1, so g(i)=f(σ(i))≠n+1; as in Case 1, g(i)∈{1,…,n}. So g with codomain {1,…,n} is an injection {1,…,m−1}→{1,…,n}, with m−1>n. This contradicts P(n), applied to the number m−1.

In both cases the injection f cannot exist, so P(n+1) holds. By Logic and Proof, Axiom 4.2.1, P(n) holds for every n∈N. This proves the theorem.

The theorem is about the standard sets only, but bijections carry it to any finite sets. Part (b) below is its mirror image for surjections.

Corollary 2.5.3 (Pigeonhole for Finite Sets)

Let m,n∈N, let A have m elements, and let B have n elements.

  • (a) If m>n, there is no injection A→B.
  • (b) If m<n, there is no surjection A→B.

Idea. For (a), the bijections of Definition 2.5.2 turn an injection A→B into an injection {1,…,m}→{1,…,n}, which Theorem 2.5.2 forbids. For (b), a surjection g:A→B has a right inverse h, and h is an injection B→A, forbidden by (a). The right inverse is built by a rule: send b to the element of A with the smallest number among those that g sends to b (a least element, Example (Method: the least element)).

Proof. Let φ:{1,…,m}→A and ψ:{1,…,n}→B be bijections (Definition 2.5.2). By Theorem 1.6.4, ψ has an inverse ψ−1:B→{1,…,n}, which is a bijection: the equations ψ−1∘ψ=id and ψ∘ψ−1=id say that ψ is a two-sided inverse of ψ−1 (Definition 1.6.2), so Theorem 1.6.4 applies.

(a) Suppose m>n and f:A→B is injective. Then ψ−1∘f∘φ:{1,…,m}→{1,…,n} is injective by Theorem 1.5.4 (a), which contradicts Theorem 2.5.2.

(b) Suppose m<n and g:A→B is surjective. For b∈B let Sb:={i∈{1,…,m}:g(φ(i))=b}. It is non-empty: since g is onto, b=g(a) for some a∈A, and a=φ(i) for some i, since φ is onto. By Theorem 2.1.3, Sb has a least element. Define h:B→A by h(b):=φ(minSb). Then g(h(b))=b for every b∈B, because minSb∈Sb. So g∘h=idB: the function g is a left inverse of h, and h is injective by Theorem 1.6.1 (a). Now h is an injection from the n-element set B to the m-element set A, with n>m, which contradicts (a). This proves the corollary.

The function h in (b) is defined by a rule, “the least element”, applied to each b at once, so its existence needs nothing beyond specification. Section 3.2 meets surjections for which no such rule is available, and there the book adds a new principle.

Second readingTwo loose ends from Chapter 1 and Logic and Proof

Two special cases settle earlier loose ends. With m=n+1, part (a) says that a set with n elements has no n+1 different elements: there is no injection {1,…,n+1}→A. That is the second school fact that Logic and Proof, Exercise (C2: A sentence with no finite model, used later) took on trust. With m=3, n=2 in (a) and m=2, n=3 in (b), the corollary gives the two observations after Example (Deciding injective and surjective) in general.

Here is a typical use of (a). Among any three different integers, two have an even sum. Let A be a set of three different integers, and let p:A→{0,1} send each a to its remainder r on division by 2 (Theorem 2.2.3), an integer with 0≤r<2; then r∈N by Proposition 2.1.2 (b), and r≤1 by Lemma 2.1.1 (e), so r∈{0,1}. The set {0,1} has 2 elements, so by (a), p is not injective: there are a≠b in A with the same remainder r. Writing a=2q+r and b=2q′+r, a+b=2(q+q′+r), which is even, since q+q′+r∈Z (Proposition 2.1.2 (a)). The pigeons are the integers and the holes are the remainders; the whole skill is choosing the holes.

Example (Method: the pigeonhole principle)

Template. (1) Choose the pigeons, a set A whose number of elements you know, and the holes, a set B with fewer. (2) Define p:A→B, “the hole of a pigeon”, and check that its values lie in B. (3) By Corollary 2.5.3 (a), p is not injective: two different pigeons a≠a′ share a hole. (4) Translate “same hole” back into the property you want.

When to use it. The claim says “among any N objects, two have …”, or “some value is taken twice”, and N exceeds the number of possible values.

The usual failure. Holes for which sharing a hole does not give the property: choose the holes by what two pigeons should share. Pigeons that need not be different: a list with repeats is not a set with N elements. Claiming to know which two pigeons share a hole.

Example (Back to the five lattice points)

Show that among any five different lattice points, two have a lattice point as midpoint.

Idea. The pigeons are the points and the holes are the parity patterns (Example (Method: the pigeonhole principle)).

Solution. Let A be a set of five lattice points, so A has 5 elements. Let B:={0,1}×{0,1}, which has the 4 elements (0,0), (0,1), (1,0), (1,1) (number them 1 to 4). Send (a,b)∈A to (r,s), where r and s are the remainders of a and b on division by 2 (Theorem 2.2.3); r,s∈{0,1} as in the three-integers paragraph above, so the values lie in B. Since 5>4, Corollary 2.5.3 (a) gives two different points (a,b)≠(c,d) in A with the same remainders. Then a and c have the same parity (Definition 1.1.1: remainder 0 means a=2q, which is even, and remainder 1 means a=2q+1, which is odd), and so do b and d, so their midpoint is a lattice point by Example (Same pattern, lattice midpoint). This answers (Q1) of Section 1.1: yes.

The word “different” costs nothing, since a point and itself have that point as midpoint; and the four corners of a unit square (Section 1.1) show that five cannot be lowered to four.

Quick check. Choose pigeons and holes: among any 11 different integers, two differ by a multiple of 10.

Solution. The pigeons are the 11 different integers. The holes are the remainders 0,…,9 on division by 10 (Theorem 2.2.3), a set with 10 elements. By Corollary 2.5.3 (a) two of the integers, a≠b, have the same remainder r: a=10q+r and b=10q′+r, so a−b=10(q−q′).

The next corollary is the well-definedness promised after Definition 2.5.2.

Corollary 2.5.4 (The Number of Elements Is Unique)

Let A be a set and m,n∈N. If A has m elements and A has n elements, then m=n.

Proof. Let φ:{1,…,m}→A and ψ:{1,…,n}→A be bijections. If m>n, then ψ−1∘φ:{1,…,m}→{1,…,n} is injective (Theorem 1.6.4, Theorem 1.5.4 (a)), which contradicts Theorem 2.5.2. Exchanging the roles of φ and ψ rules out m<n in the same way. By trichotomy, m=n.

So a finite set has exactly one number of elements, and from now on |A|=n means “the number of elements of A is n”.

2.5.4. Subsets and unions of finite sets

Three facts about finite sets are used everywhere below: the sizes of disjoint sets add, a subset is no larger than the whole, and removing one point lowers the size by one. The first uses nothing else from this section, so it comes first.

Proposition 2.5.5 (Disjoint Unions)

Let m,n∈N, let A have m elements, let B have n elements, and suppose A∩B=∅. Then A∪B has m+n elements.

Idea. Number A with 1,…,m and then carry on numbering B with m+1,…,m+n: shift the numbering of B up by m.

Proof. Let φ:{1,…,m}→A and ψ:{1,…,n}→B be bijections. Note m+n∈N by Lemma 2.1.1 (b). For k∈{1,…,m+n} with k>m, we have m+1≤k by Lemma 2.1.1 (e), so k−m∈N with 1≤k−m≤n (Lemma 2.1.1 (d)). So we may define χ:{1,…,m+n}→A∪B by χ(k):={φ(k)if k≤m,ψ(k−m)if k>m.

Injective. Let χ(k)=χ(k′). If k,k′≤m, then φ(k)=φ(k′) gives k=k′. If k,k′>m, then ψ(k−m)=ψ(k′−m) gives k−m=k′−m, so k=k′. If k≤m<k′, then χ(k)∈A and χ(k′)∈B, and A∩B=∅, so χ(k)≠χ(k′): this case cannot occur, nor can its mirror image.

Surjective. Let x∈A∪B. If x∈A, then x=φ(i) with 1≤i≤m, and χ(i)=x. If x∈B, then x=ψ(j) with 1≤j≤n; put k:=m+j, so m<k≤m+n, and χ(k)=ψ(j)=x.

So χ is a bijection, and A∪B has m+n elements.

Second readingWhy the step does not remove a point

Now subsets. The proof is an induction on the size of the whole set, and it must be set up with care: the step peels off one element, and the obvious way to say “peel off one element” is the corollary after it, on removing a point. But that corollary is proved from this proposition. So the step peels off φ(n+1) by restricting the bijection φ directly, and cites nothing proved later.

Proposition 2.5.6 (Subsets of Finite Sets)

Let n∈N, let A have n elements, and let S⊆A. Then S is finite and has k elements for some k≤n. If S≠A, then k<n.

Idea. Remove the last element φ(n+1) from A. Either it is outside S, and S sits inside the smaller set; or it is in S, and S is its part in the smaller set plus one point, which Proposition 2.5.5 counts.

Proof. For n∈N let P(n) be the statement

for every set A with n elements and every S⊆A, the set S has k elements for some k≤n, and k<n if S≠A.

We prove P(n) for every n by Logic and Proof, Axiom 4.2.1.

Base case P(0). A set A with 0 elements is empty, so S⊆∅ gives S=∅=A, which has 0≤0 elements; the second clause is vacuous.

Inductive step. Let n∈N and suppose P(n). Let A have n+1 elements, with a bijection φ:{1,…,n+1}→A, and let S⊆A. Put A′:=φ({1,…,n}),a:=φ(n+1). The restriction of φ to {1,…,n}, with codomain A′, is injective and surjective, so A′ has n elements. Every element of A is φ(i) with i≤n or i=n+1 (Lemma 2.1.1 (e)), so A=A′∪{a}. And a∉A′: if a=φ(i) with i≤n, injectivity would give i=n+1.

Case a∉S. Then S⊆A′, and P(n), applied to A′ and S, shows that S has k≤n<n+1 elements. In this case S≠A, since a∈A∖S, and indeed k<n+1, as required.

Case a∈S. Then S=(S∩A′)∪{a}, and the union is disjoint because a∉A′. By P(n), applied to A′ and S∩A′⊆A′, the set S∩A′ has j elements for some j≤n. The set {a} has 1 element (by 1↦a). By Proposition 2.5.5, S has j+1≤n+1 elements. If S≠A, then S∩A′≠A′, since otherwise S=A′∪{a}=A; so j<n by P(n), and j+1<n+1.

In both cases P(n+1) holds. By Logic and Proof, Axiom 4.2.1, P(n) holds for every n∈N. This proves the proposition.

Read contrapositively, with Corollary 2.5.4: a subset of an n-element set that itself has n elements is the whole set. (If S≠A, its number of elements is k<n, and by uniqueness it is not n.) That is the first school fact that Logic and Proof, Exercise (C1: True in every finite model, used later) took on trust.

Quick check. A set S⊆{1,…,7} has 7 elements. What is S, and which results say so?

Solution. S={1,…,7}. If S≠{1,…,7}, then Proposition 2.5.6 gives S some number k<7 of elements, and Corollary 2.5.4 forbids S to have both k and 7 elements.

Quick check. Choose parts and sizes: among any 5 different elements of {1,2}×{1,2,3}, three have the same first coordinate.

Solution. Let A⊆{1,2}×{1,2,3} have 5 elements, and let Ai be its elements with first coordinate i, for i=1,2; these are disjoint with union A, and both are finite by Proposition 2.5.6. If both had at most 2 elements, then Proposition 2.5.5 would give A at most 4 elements, contradicting Corollary 2.5.4. So some Ai has ki>2 elements, that is ki≥3 (Lemma 2.1.1 (e)), and a bijection φ:{1,…,ki}→Ai gives three different elements φ(1), φ(2), φ(3) of A, all with first coordinate i.

Corollary 2.5.7 (Removing a Point)

Let n∈N, let A have n+1 elements, and let a∈A. Then A∖{a} has n elements.

Proof. Since a∈A, the set A∖{a} is a proper subset of A, so by Proposition 2.5.6 it has k elements for some k<n+1. Now A=(A∖{a})∪{a} is a disjoint union, and {a} has 1 element, so A has k+1 elements by Proposition 2.5.5. By Corollary 2.5.4, k+1=n+1, so k=n.

Every later induction on the number of elements uses this corollary in the same way: its step starts from an arbitrary set A with n+1 elements, picks some a∈A (there is one, since n+1≥1), and applies the hypothesis to A∖{a}, which has n elements. It never presents the set as “X with one point added” from the outset, which would prove the claim only for sets that come in that form. Here is the first such induction. Chapter 1 promised the count of subsets of a finite set.

Proposition 2.5.8 (Counting Subsets)

Let n∈N. A set with n elements has 2n subsets: if |A|=n, then |P(A)|=2n.

Idea. Fix one element a. Every subset either leaves a out or contains it, and adding a pairs the subsets of the first kind with those of the second. So the count doubles with each new element.

Proof. We use Logic and Proof, Axiom 4.2.1 on n. Base case. A set with 0 elements is ∅, and P(∅)={∅} has 1=20 element (Definition 2.3.2).

Inductive step. Let n∈N, and suppose every set with n elements has 2n subsets. Let A have n+1 elements, pick a∈A, and put X:=A∖{a}. By Corollary 2.5.7, X has n elements, so P(X) has 2n elements by the hypothesis (here 2n∈N by Proposition 2.3.4 (d), so the count makes sense; likewise 2n+1∈N). Let T:={S∪{a}:S∈P(X)}, the image of P(X) under S↦S∪{a}, a function P(X)→P(A).

P(A) is the disjoint union of P(X) and T. Every member of T contains a, and no member of P(X) does, since a∉X; so the union is disjoint. Both sets consist of subsets of A. Conversely, let U⊆A. If a∉U, then U⊆X. If a∈U, then U=(U∖{a})∪{a} with U∖{a}⊆X, so U∈T.

T has 2n elements. The map S↦S∪{a}, with codomain T, is surjective by the definition of T. It is injective: for S⊆X we have a∉S, so (S∪{a})∖{a}=S, and S can be read back from S∪{a}. So it is a bijection P(X)→T, and composing a bijection {1,…,2n}→P(X) with it (Theorem 1.5.4 (c)) shows that T has 2n elements.

By Proposition 2.5.5, P(A) has 2n+2n=2n⋅2=2n+1 elements (Definition 2.3.2). By Logic and Proof, Axiom 4.2.1, the claim holds for every n∈N.

Second readingSubsets and functions to {0, 1}

For any set Y, the map S↦1S, with inverse f↦{y∈Y:f(y)=1}, is a bijection P(Y)→{0,1}Y onto the set of functions Y→{0,1} (the correspondence of Section 1.5 between subsets and indicator functions). Taking Y with n elements, a set with n elements also has exactly 2n functions to {0,1}, and the two counting problems of Chapter 1 are one. Exercise C2 counts all functions between finite sets.

2.5.5. No finite set is equinumerous with a proper subset

For finite sets, “a proper part is smaller” is a theorem.

Theorem 2.5.9 (A Finite Set Has No Proper Copy)

Let A be a finite set and B⊊A. Then A and B are not equinumerous: there is no bijection A→B.

Proof. Let A have n elements, with a bijection φ:{1,…,n}→A. By Proposition 2.5.6, B has k elements for some k<n, since B≠A. Suppose g:A→B were a bijection. Then g∘φ:{1,…,n}→B is a bijection (Theorem 1.5.4 (c)), so B also has n elements, and Corollary 2.5.4 gives k=n. This contradicts k<n.

Contradiction at scale. The proof never computes with g. It supposes the bijection, hands it to two theorems already proved, and lets them disagree about the number of elements of B. The claim is a negation, “no bijection”, so this is face (i), chosen by Example (Method: choosing direct, contrapositive or contradiction); but the clash is between results, not between two lines. The proofs of Theorem 2.5.2 and Corollary 2.5.4 have the same shape inside them.

Turned around, the theorem is a test for infinity: a set that is equinumerous with a proper subset of itself is infinite. Here is its first use. For the even natural numbers we write 2N:={2n:n∈N}, the image of N under n↦2n.

Example (Hilbert’s Hotel)

A hotel has one room for every natural number, and every room is taken. A coach arrives with guests for the odd-numbered rooms: the guest in room n is asked to move to room 2n. Show that this is a bijection N→2N, that 2N is a proper subset of N, and deduce that N is infinite.

Solution. Let d:N→2N, d(n):=2n. Its values lie in 2N by definition, and 2N⊆N by Lemma 2.1.1 (b). It is injective, since 2n=2n′ gives n=n′, and surjective, since every element of 2N is 2n=d(n) for some n∈N. So |N|=|2N|.

The inclusion is proper because 1∉2N: if n=0, then 2n=0; if n≠0, then n≥1 (Lemma 2.1.1 (a)) and 2n≥2. So 2n≠1 for every n∈N.

If N were finite, Theorem 2.5.9 would forbid a bijection from N onto its proper subset 2N. So N is infinite. Every guest still has a room, and the odd rooms are now free.

The finite intuition “a proper part is smaller” fails for N, and it fails exactly because N is infinite. Section 3.5 proves that it fails for every infinite set.

Warning. A⊊B does not make A smaller than B when B is infinite: 2N⊊N and |2N|=|N|. Equinumerous is not “one is a subset of the other”, in either direction.

Warning. “Finite” does not mean “bounded”. The set E:={1/n:n∈Z>0} lies in [0,1], and it is infinite: x↦x/(1+x) sends 1/n to 1/(n+1), and it is a bijection from E onto {1/n:n≥2}, with inverse y↦y/(1−y). That set is a proper subset of E, since 1∈E and 1/n≤1/2 for n≥2.

Quick check. Is n↦n+1 a bijection N→N∖{0}? What does that show?

Solution. Yes. Its values lie in N∖{0}, since n+1≥1. Its inverse is m↦m−1, which is defined on N∖{0} because m−1∈N for m≠0 (Lemma 2.1.1 (c)); the two maps undo each other, so it is a bijection by Theorem 1.6.4. So N is equinumerous with its proper subset N∖{0}=Z>0, and by Theorem 2.5.9, N is infinite, a second time. In the hotel, every guest moves up one room, and room 0 is free.

Remark. By Definition 2.5.2, a non-empty finite set A with n elements is {x1,…,xn}, with xk:=φ(k). So when its elements are real numbers it has a maximum and a minimum, by Proposition 2.3.8. Section 2.3 announced this passage from a finite set to a list.

Quick check. Show that the set of primes is infinite.

Solution. Suppose it is finite. It is non-empty, since 2 is prime, so it is {p1,…,pn} with n≥1 (Definition 2.5.2 and the remark above), and it has a maximum M (Proposition 2.3.8). By Theorem 2.4.1 there is a prime p>M. That prime lies in the set and exceeds its maximum, a contradiction.

Remark (Looking ahead). Chapter 4 defines equivalence relations on a set, and meets equinumerosity again as a relation that behaves like one without living on a set.

2.5.6. Exercises

A. Check your understanding

Exercise (A1)
  • (a) Define “A is finite”, and write its negation in symbols, with every quantifier shown.
  • (b) True or false, with a reason: a subset of an infinite set is infinite; a set that has an infinite subset is infinite.
  • (c) How many injections {1,2,3}→{1,2} are there?
  • (d) Let f:A→B, where A and B are finite and A has more elements than B. What does the pigeonhole principle guarantee about f?

Solution.

  • (a) A is finite if there are n∈N and a bijection φ:{1,…,n}→A (Definition 2.5.2): ∃n∈N ∃φ∈A{1,…,n} (φ injective∧φ surjective). By Logic and Proof, Proposition 6.2.3, applied to each quantifier, and De Morgan, its negation is ∀n∈N ∀φ∈A{1,…,n} (φ not injective∨φ not surjective), which is Definition 2.5.3.

  • (b) The first is false: ∅⊆N, and ∅ is finite while N is infinite (Example (Hilbert’s Hotel)). The second is true: if B were finite, every subset of B would be finite by Proposition 2.5.6; so a set with an infinite subset is not finite.

  • (c) None. By Theorem 2.5.2 with m=3>2=n, there is no injection {1,2,3}→{1,2}.

  • (d) That f is not injective (Corollary 2.5.3 (a)): there are two different elements a≠a′ of A with f(a)=f(a′). It does not say which two, and it says nothing when A has at most as many elements as B.

B. Practice

Exercise (B1: Moving the guests)

Give explicit bijections N→N∖{0,1,2}, N→{n∈N:n≥5} and N→{2n+1:n∈N}, and prove that each is a bijection by writing down its inverse.

Solution. First. For m∈N: if m∉{0,1,2}, then m≥3. Indeed m≠0 gives m≥1 (Lemma 2.1.1 (a)); with m≠1, m>1, so m≥2 (Lemma 2.1.1 (e)); with m≠2, m≥3 likewise. Conversely every m≥3 lies outside {0,1,2}. So N∖{0,1,2}={m∈N:m≥3}. Let f(n):=n+3; then f(n)∈N and f(n)≥3. Let g(m):=m−3 for m≥3; then g(m)∈N by Lemma 2.1.1 (d). Since g(f(n))=n and f(g(m))=m, the map f is a bijection by Theorem 1.6.4.

Second. The same with 5 in place of 3: n↦n+5, with inverse m↦m−5, which lies in N for m≥5 by Lemma 2.1.1 (d).

Third. Let O:={2n+1:n∈N}, the odd natural numbers, and f(n):=2n+1, which lies in O by definition. Every m∈O is 2n+1 for exactly one n∈N: one by the definition of O, and only one since 2n+1=2n′+1 gives n=n′. So g(m):=(m−1)/2 is that n, a natural number. Then g(f(n))=n and f(g(m))=m, so f is a bijection N→O. Each of the three sets is a proper subset of N equinumerous with N, which shows again that N is infinite.

Exercise (B2: Choosing the holes)
  • (a) Prove that among any 6 different integers, two have the same remainder on division by 5.
  • (b) Prove that among any 7 different points of {1,2,3}×{1,2,3}, three lie in one row, that is, have the same first coordinate.

Hint: in (b), the rows are the holes; how many points can a row take if no row takes three?

Solution.

  • (a) Let A be a set of 6 integers. By Theorem 2.2.3 with divisor 5, each a∈A has a unique remainder r(a), an integer with 0≤r(a)<5; then r(a)∈N by Proposition 2.1.2 (b), and r(a)≤4 by discreteness, Proposition 2.1.2 (c), so r(a)∈{0,…,4}. This defines r:A→{0,…,4}. The set {0,…,4} has 5 elements (the third example after Definition 2.5.2). Since 6>5, Corollary 2.5.3 (a) shows that r is not injective: there are a≠a′ in A with r(a)=r(a′).

  • (b) Let A⊆{1,2,3}×{1,2,3} have 7 elements, and for i=1,2,3 let Ai:={(x,y)∈A:x=i}, the points of A in row i. These sets are pairwise disjoint and their union is A. Each is a subset of A, so it is finite by Proposition 2.5.6; say Ai has ki elements. If every ki≤2, then by Proposition 2.5.5, applied twice, A=(A1∪A2)∪A3 has k1+k2+k3≤6 elements, and Corollary 2.5.4 forbids A to have both that number and 7 elements. So some ki>2, that is ki≥3 (Lemma 2.1.1 (e)); if φ:{1,…,ki}→Ai is a bijection, then φ(1),φ(2),φ(3) are three different points of A in row i. Seven is the least number that works: the six points with second coordinate 1 or 2 put exactly two in each row.

Exercise (B3: Finite unions)

Let n∈N, and let A1,…,An be finite sets, that is, a family (Ai)i∈{1,…,n} of finite sets. Prove that ⋃i∈{1,…,n}Ai is finite.

Solution. For n∈N let P(n) be “for every family (Ai)i∈{1,…,n} of finite sets, the union Un:=⋃i∈{1,…,n}Ai is finite”. We use Logic and Proof, Axiom 4.2.1.

Base case. For n=0 the index set is {1,…,0}=∅, and the union of the empty family is ∅ (Definition 1.3.4: no x lies in some Ai), which has 0 elements.

Step. Suppose P(n), and let (Ai)i∈{1,…,n+1} be a family of finite sets. Since {1,…,n+1}={1,…,n}∪{n+1}, we have Un+1=Un∪An+1, and Un is finite by P(n), applied to the first n sets; say it has p elements. Write Un+1=Un∪(An+1∖Un), a disjoint union. The set An+1∖Un is a subset of the finite set An+1, so it is finite by Proposition 2.5.6; say it has q elements. By Proposition 2.5.5, Un+1 has p+q elements. By Logic and Proof, Axiom 4.2.1, P(n) holds for every n.

The detour through An+1∖Un is needed because Proposition 2.5.5 is about disjoint sets, and Un and An+1 may overlap.

Exercise (B4: Prove or disprove)

Prove each true statement and refute each false one with a counterexample.

  • (a) Among any 12 different integers, two differ by a multiple of 12.
  • (b) Among any 3 different integers, two have an even sum.
  • (c) Among any 5 different lattice points of space (points of Z3), two have a lattice point as midpoint.
  • (d) If A has 8 elements and f:A→{1,2,3,4}, then some value of f is taken at least 3 times.
  • (e) No function from the set of subsets of {1,2,3} to {1,…,7} is injective.
  • (f) Every injection {1,…,n}→{1,…,n} is surjective.

Solution.

  • (a) False. Take 0,1,…,11. Any two of them differ by an integer d with 1≤|d|≤11, which is not a multiple of 12. Thirteen integers would do, by the argument of the Quick check on 11 integers.

  • (b) True. The pigeons are the three integers and the holes are the two parities (Theorem 1.1.2), a set with 2 elements. Since 3>2, two of the integers have the same parity (Corollary 2.5.3 (a)), and their sum is even (Example (The parity of a sum)).

  • (c) False. Take five of the eight points with all coordinates in {0,1} (Exercise C3 of Section 1.1). Two different ones differ in some coordinate, where one has 0 and the other 1; the sum there is 1, so that coordinate of the midpoint is 12.

  • (d) False. Take A={1,…,8} and f(k):= the integer part of (k+1)/2, with values 1,1,2,2,3,3,4,4: each value is taken exactly twice. Nine elements would force some value three times, as in Exercise B2 (b).

  • (e) True. The set of subsets of {1,2,3} has 23=8 elements (Proposition 2.5.8), and 8>7, so Corollary 2.5.3 (a) applies.

  • (f) True. Let f be such an injection. With its codomain shrunk to its image, f is a bijection, so f({1,…,n}) has n elements. It is a subset of {1,…,n}, so it is all of it, by the remark after Proposition 2.5.6; that is, f is surjective.

Three are true, (b), (e) and (f), and three are false. Each true item is the method of Example (Method: the pigeonhole principle) with the holes named; each false one either has too few pigeons or holes that do not give the property.

C. Going deeper

Exercise (C1: Infinite means arbitrarily large finite pieces)

Prove that a set A is infinite if and only if for every n∈N there is an injection {1,…,n}→A. In the direction (⇒), say whether your proof makes infinitely many choices at once, and why.

Solution (Hint 1). For (⇐), suppose A has m elements and use the hypothesis at one well-chosen n. For (⇒), induct on n.

Solution (Hint 2). For (⇒): let P(n) be “there is an injection {1,…,n}→A”; the base case is the empty function.

Solution. (⇐) Suppose the condition holds and, for a contradiction, that A has m elements, with a bijection φ:{1,…,m}→A. Take n:=m+1 and an injection f:{1,…,m+1}→A. By Theorem 1.6.4, φ has an inverse φ−1:A→{1,…,m}, which is a bijection, since φ is a two-sided inverse of it (Definition 1.6.2, Theorem 1.6.4). Then φ−1∘f:{1,…,m+1}→{1,…,m} is injective (Theorem 1.5.4 (a)), which contradicts Theorem 2.5.2. So A is infinite.

(⇒) Let A be infinite. For n∈N let P(n) be “there is an injection {1,…,n}→A”. We use Logic and Proof, Axiom 4.2.1.

Base case. {1,…,0}=∅, and the empty function ∅→A (Proposition 1.5.2 (a)) is injective, vacuously.

Step. Suppose P(n), and let f:{1,…,n}→A be an injection. With its codomain shrunk to its image F:=f({1,…,n}), it is a bijection, so F has n elements. Since A is infinite, F≠A; and F⊆A, so there is some a∈A∖F. Define g:{1,…,n+1}→A by g(k):=f(k) for k≤n and g(n+1):=a; this is a function because {1,…,n+1}={1,…,n}∪{n+1} and n+1∉{1,…,n} (Lemma 2.1.1 (e)). It is injective: two inputs ≤n are separated by f, and g(n+1)=a∉F differs from every g(k) with k≤n. So P(n+1) holds. By Logic and Proof, Axiom 4.2.1, P(n) holds for every n.

No infinitely many choices are made. The step uses two existence statements, P(n) and “A∖F≠∅”, and names one witness for each: one ∃E each, inside the proof of the single implication P(n)⇒P(n+1). Its conclusion, P(n+1), is again an existence statement, so the witnesses never leave the step. Induction then gives P(n) for each n separately: for each n some injection exists, and different n may use unrelated ones. Gluing the steps into one injection N→A, with a new point picked at every stage, would require all the picks at once, with no rule saying which point to pick. That is a different statement; Section 3.5 proves it with the principle of choice of Section 3.2.

Marking scheme. (10 points) - 2: (⇐) supposes A has m elements and uses the hypothesis at n=m+1 to contradict the pigeonhole principle (Theorem 2.5.2 or Corollary 2.5.3 (a)). - 1: (⇒) sets up an induction on n with the base case n=0 (the empty function); a base n=1 earns the point only if n=0 is also covered (by the empty function). - 3: in the step, shows that the image of the given injection has n elements and is therefore not A, and takes a point outside it. - 2: extends the injection by that point and checks injectivity, including the new value against the old ones. - 2: explains that each step makes finitely many choices inside one implication, so no principle of choice is used, and that building one injection on all of N would be a different statement. Fatal errors (0 for the step): picking “a new point for every n” to define one function N→A and calling it induction; taking a point outside the image without showing the image is not all of A.

Exercise (C2: Counting products and functions)

Let m,n∈N, let A have m elements, and let B have n elements.

  • (a) Prove that A×B has mn elements.
  • (b) Prove that the set BA of functions A→B has nm elements.
  • (c) Check your formula in (b) against Proposition 1.5.2 in the cases m=0 and m≥1, n=0.

Solution (Hint 1). Induct on m, with B fixed, and remove one point a from A by Corollary 2.5.7.

Solution (Hint 2). For (b), a function on A is the same as a function on A∖{a} together with one value at a: consider f↦(f|A∖{a},f(a)).

Solution.

  • (a) Fix B with n elements. For m∈N let P(m) be “for every set A with m elements, A×B has mn elements” (mn∈N by Lemma 2.1.1 (b)). Base case. If A has 0 elements, then A=∅, and A×B=∅, since a pair in it would need a first coordinate in ∅. It has 0=0⋅n elements. Step. Suppose P(m), let A have m+1 elements, pick a∈A, and put A′:=A∖{a}, which has m elements by Corollary 2.5.7. Then A×B=(A′×B)∪({a}×B), and the union is disjoint, since first coordinates in A′ differ from a (Definition 1.4.1). The first set has mn elements by P(m). The map B→{a}×B, b↦(a,b), is injective by Definition 1.4.1 and surjective by Definition 1.4.2, so {a}×B has n elements. By Proposition 2.5.5, A×B has mn+n=(m+1)n elements. By Logic and Proof, Axiom 4.2.1, P(m) holds for every m, and B was arbitrary.

  • (b) Fix B with n elements, and let Q(m) be “for every set A with m elements, BA has nm elements” (nm∈N by Proposition 2.3.4 (d)). Base case. A=∅, and by Proposition 1.5.2 (a), B∅ has exactly one element, the empty function; n0=1 (Definition 2.3.2), also when n=0. Step. Suppose Q(m), let A have m+1 elements, pick a∈A, and let A′:=A∖{a}, with m elements. Define R:BA→BA′×B,R(f):=(f|A′,f(a)). Injective: if R(f)=R(f′), then f and f′ agree on A′ and at a, hence on A=A′∪{a}, and they have the same domain and codomain, so f=f′ by Proposition 1.5.1. Surjective: given (h,b)∈BA′×B, let f have graph G∪{(a,b)}, where G is the graph of h, and codomain B. Each x∈A′ has exactly one partner, its h-value, because (a,b) has first coordinate a∉A′; and a has exactly one, b, because every pair of G has first coordinate in A′. So f∈BA, and R(f)=(h,b). Hence R is a bijection. By Q(m), BA′ has nm elements, so by (a), applied to the sets BA′ and B, the product BA′×B has nm⋅n=nm+1 elements (Definition 2.3.2). Since R is a bijection, |BA|=|BA′×B| (Definition 2.5.1), and |{1,…,nm+1}|=|BA′×B|. By Proposition 2.5.1 (b) and (c), |{1,…,nm+1}|=|BA|, that is, BA has nm+1 elements. By Logic and Proof, Axiom 4.2.1, Q(m) holds for every m.

  • (c) For m=0: B∅ has one element by Proposition 1.5.2 (a), and n0=1, even for n=0. For m≥1 and n=0: A≠∅, so there is no function A→∅ by Proposition 1.5.2 (b), and BA=∅ has 0 elements; and 0m=0m−1⋅0=0. Both agree with (b). With B={0,1}, (b) recovers the count 2m of the paragraph after Proposition 2.5.8.

Marking scheme. (10 points) - 2: sets up each induction on m with B fixed, and handles m=0 (the empty product; the empty function). - 2: in each step, takes an arbitrary A with m+1 elements, removes one point by Corollary 2.5.7, and applies the hypothesis to the rest. - 2: (a) splits A×B into two disjoint pieces and counts {a}×B by a bijection with B. - 3: (b) gives a bijection between BA and BA′×B, checking injectivity (equality of functions) and surjectivity (the extended graph is a function). - 1: (c) checks both degenerate cases against Proposition 1.5.2. - Direct route for (a): composing the given bijections with a bijection {1,…,m}×{1,…,n}→{1,…,mn}, e.g. (i,j)↦(i−1)n+j, with injectivity and surjectivity checked (for example by Theorem 2.2.3) and the case m=0 or n=0 handled, earns the 2 points of the (a) line and the (a) halves (1 point each) of the two induction lines. Fatal errors (0 for the step): “each of the m elements has n possible values, so nm” with no bijection or induction; a step that applies the hypothesis to a set not shown to have m elements.

R. Review

Exercise (R1)

Decide whether each function is injective and whether it is surjective. Justify your answers.

  • (a) g:Z×Z→Z, g(a,b):=4a+6b.
  • (b) k:Z→Z, k(n):=3n+1.

Solution. (a) g is neither injective nor surjective. Not surjective (Definition 1.5.4): 1 is not a value. Every value g(a,b)=2(2a+3b) is even, with 2a+3b∈Z by Proposition 2.1.2 (a) (Definition 1.1.1), while 1=2⋅0+1 is odd, and no integer is both (Theorem 1.1.2). Not injective (Definition 1.5.3): g(3,−2)=12−12=0=g(0,0), and (3,−2)≠(0,0), since their first coordinates differ (Definition 1.4.1). The method of Example (Method: proving surjectivity) has nothing to work with here: a witness for the value 1 would be a pair with 4a+6b=1, and the parity argument shows there is none.

(b) k is injective and not surjective. Injective, by the method of Example (Method: proving injectivity): if 3n+1=3n′+1, then 3n=3n′ and n=n′. Not surjective (Definition 1.5.4): 0 is not a value. If 3n+1=0 for some n∈Z, then 0=3n+1 and 0=3⋅0+0 are two divisions of 0 by 3, with remainders 1 and 0 in {0,1,2}, against the uniqueness in Theorem 2.2.3.

Exercise (R2)

For a set X and a property R(x,y) of two elements of X, consider the statements (S1)  ∃x∈X ∀y∈X R(x,y),(S2)  ∀y∈X ∃x∈X R(x,y).

  • (a) Decide (S1) and (S2) for R(x,y): “x∣y”, first with X={1,…,6}, then with X={2,…,6}.
  • (b) Decide (S1) and (S2) for X=Z and R(x,y): “x+y=0”.
  • (c) Prove that (S1) implies (S2) for every X and R.

Solution. (a) For X={1,…,6} both hold: x=1 divides every y (y=y⋅1), which is (S1); and (S2) follows by (c). For X={2,…,6}, (S2) holds with x:=y, since y=1⋅y. (S1) fails: its negation is ∀x∈X ∃y∈X x∤y (Logic and Proof, Proposition 6.2.3), and for x=2 take y=3, for x∈{3,…,6} take y=2, since a positive divisor of 2 is at most 2.

(b) (S2) holds: for y∈Z, x:=−y∈Z has x+y=0. (S1) fails: its negation is ∀x∈Z ∃y∈Z x+y≠0, and for x∈Z the choice y:=1−x, an integer by Proposition 2.1.2 (a), gives x+y=1≠0.

(c) Suppose (S1), and let x0∈X be a witness: R(x0,y) for every y∈X (∃E). Let y∈X. Then R(x0,y), so ∃x∈X R(x,y), with witness x0 (∃I). As y was arbitrary, (S2) holds (∀I). This is Logic and Proof, Proposition 5.6.2, with bounded quantifiers. The converse fails, by (a) for X={2,…,6} and by (b): one x for all y is more than one x for each y.

Exercise (R3)

Let v and w be valuations such that every atom true under v is true under w. Prove that every formula built from atoms with ∧ and ∨ alone (no ¬, ⊥, → or ↔) that is true under v is true under w. Deduce that ¬p is equivalent to no such formula.

Solution. By structural induction (Logic and Proof, Theorem 4.3.1), with P(φ): “if φ contains none of ¬, ⊥, →, ↔ and v(φ)=T, then w(φ)=T”. Truth values are those of Logic and Proof, Definition 4.4.2.

Atoms and ⊥. For an atom p with v(p)=T, w(p)=T by the hypothesis on v and w. The formula ⊥ contains ⊥, so P(⊥) holds vacuously.

Step for ¬. ¬φ contains ¬, so P(¬φ) holds vacuously.

Step for (φ∘ψ). If ∘ is → or ↔, P holds vacuously. Otherwise, if (φ∘ψ) contains none of the four symbols, neither do φ and ψ, whose symbols are among its own, so P(φ) and P(ψ) apply to them. For ∘=∧: v(φ∧ψ)=T gives v(φ)=v(ψ)=T, so w(φ)=w(ψ)=T, and w(φ∧ψ)=T. For ∘=∨: v(φ)=T or v(ψ)=T, so w(φ)=T or w(ψ)=T, and w(φ∨ψ)=T.

The consequence. Let v be the all-F valuation and w the all-T valuation; every atom true under v (there is none) is true under w. Then v(¬p)=T and w(¬p)=F. If φ, built with ∧ and ∨ alone, were equivalent to ¬p, it would have the same value as ¬p under every valuation: v(φ)=T, hence w(φ)=T by the first part, against w(φ)=w(¬p)=F.

This consequence is a special case of Logic and Proof, Theorem 4.9.6 (b), which allows → as well and looks only at the all-T row; here the ∧/∨ case comes out of the stronger statement that such formulas are monotone in the valuation.