Cite

This course has no released version yet: the text at this address may change. Cite a released version when one exists.

/courses/countability/equipotence
@misc{countability-equipotence,
  title = {{Equipotence and subpotence}},
  howpublished = {Lesson 1 of \emph{Countability and diagonalization}, Computability Theory course notes},
  url = {/courses/countability/equipotence},
  note = {Unreleased working version}
}

To cite a single statement, use the # link that appears next to its heading.

Lesson 1 of 6

Equipotence and subpotence

Comparison of sets by bijections and injections; finite sets and the pigeonhole principle.

35 min5 questions
Countability and diagonalization · lesson 1 of 6
  1. Equipotence and subpotence
  2. The Cantor–Bernstein theorem
  3. Countable sets
  4. The diagonal argument
  5. The cardinality of the continuum
  6. Diagonalization and computation

In the Dialogues Concerning Two New Sciences (1638), Galileo observes that every integer is the root of exactly one square and every square has exactly one root, so that there should be as many squares as integers; yet the squares form a proper part of the integers, so that there should be fewer of them. He concludes that the attributes “equal”, “greater” and “smaller” do not apply to infinite quantities.

Cantor kept the first intuition as a definition: two sets have the same size when their elements can be matched one-to-one. The second intuition, that a proper part is smaller than the whole, is then a theorem about finite sets which fails for infinite ones. This lesson sets up the definitions and proves the facts about finite sets that the comparison relies on.

1.1 Functions and inverses

All functions in this course are total: a function f:A→Bf : A \to B assigns to every a∈Aa \in A an element f(a)∈Bf(a) \in B. For X⊆AX \subseteq A, the image of XX is f(X)={f(a):a∈X}f(X) = \{f(a) : a \in X\}, and for Y⊆BY \subseteq B the preimage of YY is f−1(Y)={a∈A:f(a)∈Y}f^{-1}(Y) = \{a \in A : f(a) \in Y\}. The identity function of AA is written idA\mathrm{id}_A.

Definition 1.1.#

A function f:A→Bf : A \to B is

  1. injective if for all a,a′∈Aa, a' \in A, a≠a′a \neq a' implies f(a)≠f(a′)f(a) \neq f(a');
  2. surjective if f(A)=Bf(A) = B, that is, every b∈Bb \in B is of the form f(a)f(a);
  3. bijective if it is both injective and surjective.

A composition of injections is an injection, and a composition of surjections is a surjection: if f:A→Bf : A \to B and g:B→Cg : B \to C are surjective and c∈Cc \in C, pick bb with g(b)=cg(b) = c, then aa with f(a)=bf(a) = b. Hence a composition of bijections is a bijection.

Lemma 1.2.#

Let f:A→Bf : A \to B.

  1. If A≠∅A \neq \emptyset, then ff is injective if and only if there is g:B→Ag : B \to A with g∘f=idAg \circ f = \mathrm{id}_A (a left inverse).
  2. If there is g:B→Ag : B \to A with f∘g=idBf \circ g = \mathrm{id}_B (a right inverse), then ff is surjective.
  3. ff is bijective if and only if there is g:B→Ag : B \to A with g∘f=idAg \circ f = \mathrm{id}_A and f∘g=idBf \circ g = \mathrm{id}_B. Such a gg is unique; it is written f−1f^{-1} and is itself a bijection.
Proof of Lemma 1.2.
  1. Suppose ff injective, and fix a0∈Aa_0 \in A. For b∈f(A)b \in f(A) there is exactly one aa with f(a)=bf(a) = b, by injectivity; let g(b)g(b) be this aa. For b∉f(A)b \notin f(A), let g(b)=a0g(b) = a_0. Then g(f(a))=ag(f(a)) = a for every a∈Aa \in A. Conversely, if g∘f=idAg \circ f = \mathrm{id}_A and f(a)=f(a′)f(a) = f(a'), then a=g(f(a))=g(f(a′))=a′a = g(f(a)) = g(f(a')) = a'.
  2. Every b∈Bb \in B equals f(g(b))f(g(b)), so it lies in f(A)f(A).
  3. If ff is bijective, define g(b)g(b) as the unique aa with f(a)=bf(a) = b; both identities hold. Conversely, the first identity gives injectivity, as in item 1, and the second gives surjectivity, by item 2. If gg and g′g' both satisfy the two identities, then g=g∘(f∘g′)=(g∘f)∘g′=g′g = g \circ (f \circ g') = (g \circ f) \circ g' = g'. Finally f−1f^{-1} has ff as a two-sided inverse, so it is bijective.
Remark 1.3.#

The converse of item 2 — every surjection f:A→Bf : A \to B has a right inverse — requires choosing, for each b∈Bb \in B, one element of the non-empty set f−1({b})f^{-1}(\{b\}). For arbitrary sets, this is exactly the axiom of choice. No choice is needed when A⊆NA \subseteq \nat: take g(b)g(b) to be the least element of f−1({b})f^{-1}(\{b\}). This device, replacing an arbitrary choice by a least element, is used repeatedly in this course.

1.2 Equipotence

Definition 1.4.#

Two sets AA and BB are equipotent if there is a bijection from AA to BB. We then write ∣A∣=∣B∣|A| = |B|.

Proposition 1.5.#

For all sets AA, BB, CC: ∣A∣=∣A∣|A| = |A|; if ∣A∣=∣B∣|A| = |B| then ∣B∣=∣A∣|B| = |A|; if ∣A∣=∣B∣|A| = |B| and ∣B∣=∣C∣|B| = |C| then ∣A∣=∣C∣|A| = |C|.

Proof of Proposition 1.5.

The identity idA\mathrm{id}_A is a bijection. If f:A→Bf : A \to B is a bijection, so is f−1:B→Af^{-1} : B \to A, by Lemma 1.2. A composition of bijections is a bijection.

nn²012345678910111213141516171819202122232425⋯012345⋯

Galileo’s matching. The integer nn is sent to n2n^2; the squares, shaded, form a proper subset of N\nat, which is nevertheless equipotent to N\nat.
Example 1.6.#
  1. N\nat and the set of squares {n2:n∈N}\{n^2 : n \in \nat\} are equipotent, via n↦n2n \mapsto n^2, which is injective on N\nat since squaring is strictly increasing on non-negative numbers.
  2. N\nat and N∖{0}\nat \setminus \{0\} are equipotent, via n↦n+1n \mapsto n + 1; more generally, N\nat and N∖{0,…,k−1}\nat \setminus \{0, \dots, k-1\} via n↦n+kn \mapsto n + k.
  3. N\nat and the set EE of even numbers are equipotent, via n↦2nn \mapsto 2n.
  4. The open interval (−1,1)(-1, 1) and R\mathbb R are equipotent, via x↦x/(1−∣x∣)x \mapsto x / (1 - |x|). Its inverse is y↦y/(1+∣y∣)y \mapsto y / (1 + |y|): if y=x/(1−∣x∣)y = x/(1-|x|), then yy has the sign of xx and ∣y∣=∣x∣/(1−∣x∣)|y| = |x|/(1 - |x|), so that ∣x∣=∣y∣/(1+∣y∣)|x| = |y|/(1 + |y|) and x=y/(1+∣y∣)x = y/(1+|y|). Since every non-empty open interval (a,b)(a, b) is equipotent to (−1,1)(-1, 1) by an affine map, all non-empty open intervals are equipotent to R\mathbb R.

In each of the first three examples, a set is equipotent to a proper subset of itself. This is the phenomenon Galileo found paradoxical, and the next section shows that it cannot happen for finite sets.

Remark 1.7.

The notation ∣A∣=∣B∣|A| = |B| suggests an equality between two objects, the cardinalities of AA and BB. A cardinality can be defined as a set (in ZFC, the least ordinal equipotent to AA), but this course does not need it: the relation ∣A∣=∣B∣|A| = |B| is defined directly, and ∣A∣|A| on its own is only a notation.

1.3 Finite sets

For n∈Nn \in \nat, write n‾={0,1,…,n−1}\underline n = \{0, 1, \dots, n - 1\}, so that 0‾=∅\underline 0 = \emptyset.

Definition 1.8.#

A set AA is finite if ∣A∣=∣n‾∣|A| = |\underline n| for some n∈Nn \in \nat, and infinite otherwise.

That nn is determined by AA — the number of elements of AA — is a consequence of the following principle.

Lemma 1.9 (Pigeonhole principle).#

For all m>nm > n, there is no injection from m‾\underline m into n‾\underline n.

Proof of Lemma 1.9.

By induction on nn. For n=0n = 0: since m>0m > 0, the set m‾\underline m contains 00, and there is no function at all from a non-empty set into 0‾=∅\underline 0 = \emptyset.

Suppose the statement holds for nn, and let f:m‾→n+1‾f : \underline m \to \underline{n+1} be injective, with m>n+1m > n + 1. If n∉f(m‾)n \notin f(\underline m), then ff maps m‾\underline m injectively into n‾\underline n, which contradicts the induction hypothesis since m>nm > n. Otherwise n=f(k)n = f(k) for a unique k<mk < m. Let τ:m‾→m‾\tau : \underline m \to \underline m exchange kk and m−1m - 1 and fix every other element. Then f∘τf \circ \tau is injective and sends m−1m - 1 to nn; by injectivity, it sends no element of m−1‾\underline{m-1} to nn. So its restriction to m−1‾\underline{m-1} is an injection into n‾\underline n, with m−1>nm - 1 > n, which contradicts the induction hypothesis.

Corollary 1.10.#
  1. If ∣m‾∣=∣n‾∣|\underline m| = |\underline n|, then m=nm = n.
  2. If AA is finite, AA is not equipotent to any proper subset B⊊AB \subsetneq A.
  3. N\nat is infinite.
Proof of Corollary 1.10.
  1. If m≠nm \neq n, say m>nm > n, a bijection m‾→n‾\underline m \to \underline n would be an injection, contradicting Lemma 1.9.
  2. Let β:A→n‾\beta : A \to \underline n be a bijection, and suppose h:A→Bh : A \to B is a bijection onto B⊊AB \subsetneq A. Pick a∈A∖Ba \in A \setminus B. Then n≥1n \geq 1; let σ\sigma be the permutation of n‾\underline n exchanging β(a)\beta(a) and n−1n - 1. The map σ∘β\sigma \circ \beta is a bijection A→n‾A \to \underline n sending aa to n−1n - 1, so it sends B⊆A∖{a}B \subseteq A \setminus \{a\} into n−1‾\underline{n-1}. Then σ∘β∘h∘β−1∘σ−1\sigma \circ \beta \circ h \circ \beta^{-1} \circ \sigma^{-1} is an injection from n‾\underline n into n−1‾\underline{n-1}, a contradiction.
  3. By item 2, since N\nat is equipotent to its proper subset N∖{0}\nat \setminus \{0\}.

So a finite set has a well-defined number of elements, and Galileo’s matching is a property of infinite sets only. Dedekind took the converse as a definition: a set is Dedekind-infinite if it is equipotent to a proper subset. That every infinite set is Dedekind-infinite uses the axiom of choice (in a weak form); see Exercise 3.16 in the lesson on countable sets.

1.4 Subpotence

Intuitively, BB is at least as large as AA if every element of AA can be given its own representative in BB.

Definition 1.11.#

A set AA is subpotent to a set BB if there is an injection from AA into BB. We then write ∣A∣≤∣B∣|A| \leq |B|, and ∣A∣≰∣B∣|A| \nleq |B| otherwise. We write ∣A∣<∣B∣|A| < |B| if ∣A∣≤∣B∣|A| \leq |B| and ∣A∣≠∣B∣|A| \neq |B|.

If A⊆BA \subseteq B, the inclusion map shows ∣A∣≤∣B∣|A| \leq |B|. By Lemma 1.9, ∣n‾∣<∣m‾∣|\underline n| < |\underline m| whenever n<mn < m.

Proposition 1.12.#

The relation ≤\leq is reflexive and transitive: ∣A∣≤∣A∣|A| \leq |A|, and if ∣A∣≤∣B∣|A| \leq |B| and ∣B∣≤∣C∣|B| \leq |C|, then ∣A∣≤∣C∣|A| \leq |C|. Moreover, it is compatible with equipotence: if ∣A∣=∣A′∣|A| = |A'| and ∣B∣=∣B′∣|B| = |B'|, then ∣A∣≤∣B∣|A| \leq |B| if and only if ∣A′∣≤∣B′∣|A'| \leq |B'|.

The identity is an injection. If f:A→Bf : A \to B and g:B→Cg : B \to C are injections and x≠yx \neq y in AA, then f(x)≠f(y)f(x) \neq f(y) by injectivity of ff, hence g(f(x))≠g(f(y))g(f(x)) \neq g(f(y)) by injectivity of gg; so g∘fg \circ f is an injection. For the last statement, if α:A′→A\alpha : A' \to A and β:B→B′\beta : B \to B' are bijections and f:A→Bf : A \to B is an injection, then β∘f∘α:A′→B′\beta \circ f \circ \alpha : A' \to B' is an injection; the converse is symmetric.

Surjections compare sets in the opposite direction, at least when the domain is a set of integers.

Proposition 1.13.#

If A⊆NA \subseteq \nat and f:A→Bf : A \to B is surjective, then ∣B∣≤∣A∣|B| \leq |A|.

For b∈Bb \in B, the set f−1({b})f^{-1}(\{b\}) is a non-empty set of integers; let g(b)g(b) be its least element. Then f(g(b))=bf(g(b)) = b, so gg has a left inverse and is injective by Lemma 1.2.

For arbitrary AA, the same statement holds under the axiom of choice (Remark 1.3). Two questions remain. Is ≤\leq antisymmetric, that is, do ∣A∣≤∣B∣|A| \leq |B| and ∣B∣≤∣A∣|B| \leq |A| imply ∣A∣=∣B∣|A| = |B|? This is the Cantor–Bernstein theorem of the next lesson. Is there a pair of infinite sets with ∣A∣<∣B∣|A| < |B|? This is Cantor’s diagonal argument, three lessons ahead.

1.5 Exercises

Exercise 1.14 ★.#

Let b∉Ab \notin A. Show that if ∣N∣≤∣A∣|\nat| \leq |A|, then ∣A∪{b}∣=∣A∣|A \cup \{b\}| = |A|.

Solution

Let i:N→Ai : \nat \to A be an injection. Define h:A∪{b}→Ah : A \cup \{b\} \to A by h(b)=i(0)h(b) = i(0), h(i(n))=i(n+1)h(i(n)) = i(n+1) for n∈Nn \in \nat, and h(x)=xh(x) = x for x∈A∖i(N)x \in A \setminus i(\nat). This is well defined since ii is injective. It is injective, since it is injective on each of the three pieces {b}\{b\}, i(N)i(\nat) and A∖i(N)A \setminus i(\nat), whose images {i(0)}\{i(0)\}, i(N∖{0})i(\nat \setminus \{0\}) and A∖i(N)A \setminus i(\nat) are disjoint. It is surjective, since these three images cover AA.

Exercise 1.15 ★.#

Show that every subset of a finite set is finite.

Solution

It suffices to treat subsets S⊆m‾S \subseteq \underline m, by transporting through a bijection. By induction on mm: for m=0m = 0, S=∅=0‾S = \emptyset = \underline 0. If S⊆m+1‾S \subseteq \underline{m+1}, then S′=S∖{m}⊆m‾S' = S \setminus \{m\} \subseteq \underline m is in bijection with some k‾\underline k via some β\beta, by the induction hypothesis. If m∉Sm \notin S, then S=S′S = S'. Otherwise, extend β\beta by m↦km \mapsto k; this is a bijection from SS to k+1‾\underline{k+1}.

Exercise 1.16 ★★.

Show that if AA is finite and f:A→Af : A \to A is injective, then ff is surjective. Show that this fails for A=NA = \nat.

Solution

If ff were injective and not surjective, then ff would be a bijection from AA onto the proper subset f(A)⊊Af(A) \subsetneq A, which contradicts Corollary 1.10. For A=NA = \nat, the successor n↦n+1n \mapsto n + 1 is injective and not surjective.

1.6 Notes and references

The passage on squares and roots is in the First Day of Galileo’s Discorsi (1638). Cantor introduced the comparison of sets by one-to-one correspondences in his papers of 1874 and 1878, under the name Mächtigkeit (power); the term “equipotent” derives from it. Dedekind defined infinite sets as those equipotent to a proper subset in Was sind und was sollen die Zahlen? (1888). For a systematic treatment of cardinality in axiomatic set theory, see Hrbacek and Jech.

  • G. Galilei, Discorsi e dimostrazioni matematiche intorno a due nuove scienze, Leiden, 1638.
  • G. Cantor, Ein Beitrag zur Mannigfaltigkeitslehre, Journal für die reine und angewandte Mathematik 84 (1878), 242–258.
  • R. Dedekind, Was sind und was sollen die Zahlen?, Vieweg, Braunschweig, 1888.
  • K. Hrbacek and T. Jech, Introduction to Set Theory, 3rd edition, Marcel Dekker, 1999.