Cardinality I: Countable Sets

This deck compares the sizes of infinite sets by means of bijections, covering equinumerosity, Dedekind-infinite sets, and countability. It builds explicit bijections for the naturals, the integers, pairs, and the rationals, proves that a countable union of countable sets stays countable, and uses the Schroeder-Bernstein theorem. It targets the misconceptions that a proper subset must be smaller, that the integers outnumber the naturals, and that countable means finite.

Subject: Foundations of Higher Mathematics · 114 slides · symbolic lesson

Open the interactive version of this deck · Homework for this lesson

What this lesson covers

The lesson, slide by slide

1. What you will be able to do

Objectives

By the end of this deck you can:

1. Compare the sizes of two sets by building a bijection, not by counting.

2. Define countable and prove a set is countable by exhibiting an explicit enumeration.

3. Show the integers, the pairs of naturals, and the rationals are all countable.

4. Use the Schroeder-Bernstein theorem to get a bijection from two injections, and explain why a proper subset of an infinite set can have the same size.

2. What survived from Modular Arithmetic & Congruence?

Warm-up

Discussion prompt

Before we open Cardinality I: Countable Sets: without looking back, what was the main idea of Modular Arithmetic & Congruence, and what could you do by the end of it that you could not do before?

Hint: One sentence for the idea, one for the skill. If the second one is blank, that is the part to revisit.

Answer:

That deck presents congruence modulo n as an equivalence relation that is also compatible with addition and multiplication, which is what gives the ring Z/nZ. It covers units and the gcd, modular inverses via the extended Euclidean algorithm, the theorems of Fermat and Euler, fast exponentiation, the Chinese Remainder Theorem, and RSA. It targets the traps of cancelling by something that is not a unit, misapplying Fermat's theorem when the gcd is not 1, reducing "mod" to a bare remainder operator, and using the Chinese Remainder Theorem with moduli that are not coprime.

3. How big is a set, really?

Concept

For finite sets, size is easy: count the elements. But you cannot count an infinite set to the end.

So we need a way to compare sizes that never mentions a number. The tool is matching: pair every element of one set with exactly one element of the other.

Two sets have the same size when such a perfect matching exists. This one idea powers the entire theory of infinite cardinality.

4. Break it if you can: How big is a set, really?

Counterexample

Discussion prompt

For finite sets, size is easy: count the elements. But you cannot count an infinite set to the end.

That is stated as though it always holds. Do one of two things: produce a case where it fails, or say precisely what rules such a case out. "It just does" is not on the menu.

Hint: Hunt at the extremes first — zero, one, negative, empty, equal. If every extreme survives, the reason they survive is the proof.

Answer:

Two sets have the same size when such a perfect matching exists. This one idea powers the entire theory of infinite cardinality.

5. Counting is really pairing

Intuition

A shepherd with no numbers can still check whether every sheep came home: drop one pebble in a jar per sheep leaving, remove one per sheep returning. Empty jar means all present.

He never counted. He built a one-to-one correspondence between sheep and pebbles. Sameness of size is matching, and matching needs no numbers.

We will use exactly this move on infinite sets, where counting is impossible but matching still works.

6. By analogy: Counting is really pairing

Analogy

Discussion prompt

Explain Counting is really pairing by analogy to something with no Foundations of Higher Mathematics in it at all — a queue, a recipe, a map, a bank balance, whatever fits. Then say where your analogy breaks.

Hint: An analogy that never breaks is not an analogy, it is the same idea wearing a hat. Find the seam — that is the part that is actually new.

Answer:

A shepherd with no numbers can still check whether every sheep came home: drop one pebble in a jar per sheep leaving, remove one per sheep returning. Empty jar means all present.

7. Injection: at most as many

Concept

An injection from A to B places every element of A into B with no collisions: different inputs get different outputs.

\[ f : A \to B \text{ injective} \iff \big(f(x)=f(y) \implies x=y\big) \]

If such an f exists, A fits inside B, so A has at most as many elements as B.

\[ |A| \le |B| \]

8. Teach it back: Injection: at most as many

Explain it

Discussion prompt

Explain Injection: at most as many to a student a year behind you. No notation, no jargon they have not met — and it still has to be true.

Hint: If your explanation needs a symbol they have never seen, you are describing the notation rather than the idea.

Answer:

An injection from A to B places every element of A into B with no collisions: different inputs get different outputs.

9. Bijection: exactly as many

Concept

A bijection is an injection that is also onto: every element of B is hit exactly once. It is a perfect matching, reversible by an inverse.

equinumerous — Sets A and B are equinumerous when a bijection between them exists. We write that their cardinalities are equal. This is the definition of 'same size' for all sets, finite or infinite.

\[ |A| = |B| \iff \exists\, f : A \to B \text{ a bijection} \]

10. What has to happen first: A warm-up bijection between finite sets

Ranking

Put in order

Put the moves of A warm-up bijection between finite sets into the order they have to happen.

  1. Propose a matching
  2. Check it is injective
  3. Check it is onto
  4. Verify by counting the inverse pairs

Why: These are the moves of the worked example in the order it makes them, and each one is set up by the one before it. Send a to 1, b to 2, c to 3. Any pairing that uses each target once will do; we just exhibit one.

11. A warm-up bijection between finite sets

Worked example

Show the letters and the numbers below have the same size.

\[ A = \{a, b, c\}, \qquad B = \{1, 2, 3\} \]

Propose a matching

Why: Send a to 1, b to 2, c to 3. Any pairing that uses each target once will do; we just exhibit one.

Check it is injective

Why: The three outputs 1, 2, 3 are distinct, so distinct inputs give distinct outputs.

Check it is onto

Why: Every element of B appears as an output, so nothing in B is missed.

Verify by counting the inverse pairs

Why: The inverse sends 1 to a, 2 to b, 3 to c, a genuine two-sided inverse. A bijection exists, so the sets are equinumerous.

12. A warm-up bijection between finite sets — line by line

Picture it

Animation

Shows: Each line of the worked example "A warm-up bijection between finite sets", appearing one at a time.

The same working the example does, in the order a tutor would write it.

Takeaway: The three outputs 1, 2, 3 are distinct, so distinct inputs give distinct outputs.

13. Same-size is an equivalence relation

Concept

Equinumerosity behaves like equality: it is reflexive, symmetric, and transitive.

\[ |A|=|A|, \quad |A|=|B|\implies|B|=|A|, \quad |A|=|B|\wedge|B|=|C|\implies|A|=|C| \]

So the collection of all sets splits into classes of equal size. A cardinal number is the name of one such class.

14. A cardinal is a shape, not a count

Intuition

Think of a cardinal number as the shared shape of every set you can match up. All three-element sets share one shape; we call it three.

Infinite sets have shapes too. The point of this deck is that many infinite sets you would guess are different sizes actually share one shape.

15. Plan first: Equinumerosity really is an equivalence relation

Step zero

Discussion prompt

Equinumerosity really is an equivalence relation — before any calculation: what is the plan? Name the moves in order, in plain English, without doing the arithmetic.

Hint: It starts with: Reflexive: the identity works

Answer:

  1. Reflexive: the identity works
  2. Symmetric: invert the bijection
  3. Transitive: compose
  4. Verify closure of the argument

16. Equinumerosity really is an equivalence relation

Worked example

We check the three properties using only bijections.

Reflexive: the identity works

Why: The identity map on A is a bijection from A to A, so every set matches itself.

Symmetric: invert the bijection

Why: If f is a bijection from A to B, its inverse is a bijection from B to A, so the relation is symmetric.

Transitive: compose

Why: If f matches A to B and g matches B to C, then the composite matches A to C, because a composite of bijections is a bijection.

\[ g \circ f : A \to C \]

Verify closure of the argument

Why: Identity, inverse, and composite are all bijections, so all three axioms hold. Equinumerosity is an equivalence relation.

17. Equinumerosity really is an equivalence relation — line by line

Picture it

Animation

Shows: Each line of the worked example "Equinumerosity really is an equivalence relation", appearing one at a time.

The same working the example does, in the order a tutor would write it.

Takeaway: Identity, inverse, and composite are all bijections, so all three axioms hold. Equinumerosity is an equivalence relation.

18. Recipe: proving two sets have the same size

Pattern

1. Name an explicit rule from A to B

Why: A formula or a described correspondence. Vague 'they feel the same' is not a proof.

2. Prove it is injective

Why: Assume two inputs share an output and force the inputs to be equal.

3. Prove it is onto

Why: Take an arbitrary target and produce an input that maps to it, often by writing the inverse.

4. Or invoke Schroeder-Bernstein

Why: If building a bijection directly is hard, two injections one each way also suffice, as we will see.

19. Finite sets, pinned to an initial segment

Concept

A set is finite when it matches an initial block of the counting numbers.

\[ A \text{ finite} \iff |A| = |\{1, 2, \dots, n\}| \text{ for some } n \ge 0 \]

For finite sets the old intuition holds: a proper subset is always strictly smaller. Remove an element and no rematching can recover the size.

A set is infinite when it is not finite. Everything surprising in this deck happens here.

20. Dedekind's definition of infinite

Concept

Dedekind gave a definition of infinite that needs no numbers at all, using only matching.

Dedekind-infinite — A set is infinite exactly when it can be put in bijection with a proper subset of itself: you can throw elements away and still match what remains to the whole.

\[ A \text{ infinite} \iff \exists\, B \subsetneq A \text{ with } |A| = |B| \]

21. Take the definitions apart: equinumerous vs Dedekind-infinite

Definition probe

Sort into buckets

Every line below is part of the definition of equinumerous or of Dedekind-infinite — one or the other, never both. Put each where it belongs.

equinumerous
Sets A and B are equinumerous when a bijection between them exists.; We write that their cardinalities are equal.; This is the definition of 'same size' for all sets, finite or infinite.
Dedekind-infinite
A set is infinite exactly when it can be put in bijection with a proper subset of itself; you can throw elements away and still match what remains to the whole.
b1
Sets A and B are equinumerous when a bijection between them exists. We write that their cardinalities are equal. This is the definition of 'same size' for all sets, finite or infinite.
b2
A set is infinite exactly when it can be put in bijection with a proper subset of itself: you can throw elements away and still match what remains to the whole.

22. Hilbert's Grand Hotel

Intuition

A hotel has one room per counting number, all full. A new guest arrives. There is still room: ask every guest to move up one room.

The guest in room n moves to room n plus 1. Room 1 opens up, nobody is evicted, the new guest checks in.

A full infinite hotel absorbed one more. That is Dedekind-infinite in a bathrobe: the whole matched a proper part.

23. Guess the shape of the answer: The naturals match the naturals minus one…

Estimation

Predict first

Make the hotel shift precise. Let the naturals start at zero.

Commit before you compute: what does The naturals match the naturals minus one room come out to? A rough magnitude and the right form is enough — the point is to have something concrete to be wrong about.

Correct: Verify with the inverse

Why: A prediction you can defend turns the computation into a check rather than a leap of faith — and an answer that contradicts it is caught on the spot. The map sending k to k minus 1 undoes f on the target, confirming a bijection.

24. The naturals match the naturals minus one room

Worked example

Make the hotel shift precise. Let the naturals start at zero.

\[ \mathbb{N} = \{0, 1, 2, \dots\}, \qquad f(n) = n + 1 \]

State the target set

Why: The image of f is every natural except 0, a proper subset of the naturals.

\[ f : \mathbb{N} \to \mathbb{N} \setminus \{0\} \]

Injective

Why: If n plus 1 equals m plus 1 then n equals m; adding one is cancellable.

Onto its target

Why: Any positive natural k equals f of (k minus 1), and k minus 1 is a natural, so every target is hit.

Verify with the inverse

Why: The map sending k to k minus 1 undoes f on the target, confirming a bijection. The naturals are equinumerous with a proper subset of themselves.

25. The naturals match the naturals minus one room — line by line

Picture it

Animation

Shows: Each line of the worked example "The naturals match the naturals minus one room", appearing one at a time.

The same working the example does, in the order a tutor would write it.

Takeaway: The map sending k to k minus 1 undoes f on the target, confirming a bijection. The naturals are equinumerous with a proper subset of themselves.

26. What has to be given first: The naturals match only the even numbers

Missing information

Discussion prompt

Even more striking: half the naturals is the same size as all of them.

What do you need to know — or decide — before the first line can be written? List everything the problem has to hand you.

Hint: Anything you would have to invent to get started is a thing the problem must supply.

Answer:

If 2n equals 2m then n equals m; doubling is cancellable over the naturals.

27. The naturals match only the even numbers

Worked example

Even more striking: half the naturals is the same size as all of them.

\[ g : \mathbb{N} \to E, \quad E = \{0, 2, 4, \dots\}, \quad g(n) = 2n \]

Injective

Why: If 2n equals 2m then n equals m; doubling is cancellable over the naturals.

Onto

Why: Every even number is 2 times some natural, namely half of it, so each even target is produced.

Tabulate the pairing

Why: The correspondence never runs out and never collides.

ng(n) = 2n
00
12
24
36

Verify the inverse

Why: Sending an even number back to half itself undoes g. So the evens and the naturals are equinumerous, though the evens are a proper subset.

28. The naturals match only the even numbers — line by line

Picture it

Animation

Shows: Each line of the worked example "The naturals match only the even numbers", appearing one at a time.

The same working the example does, in the order a tutor would write it.

Takeaway: Sending an even number back to half itself undoes g. So the evens and the naturals are equinumerous, though the evens are a proper subset.

29. Something is wrong here: a proper subset must be strictly smaller

Anomaly

Predict first

A student writes this, and it looks reasonable:

The finite reflex: the evens sit inside the naturals and skip every odd number, so surely there are fewer evens.

It is wrong. Say what breaks — and say it before you turn the page.

Correct: 'Removing elements always shrinks a set' is imported from finite experience where it is true.

Size is decided by matching, not by containment. The doubling map matches them perfectly.

Why: 'Removing elements always shrinks a set' is imported from finite experience where it is true.

30. Trap: a proper subset must be strictly smaller

Trap

The trap

The finite reflex: the evens sit inside the naturals and skip every odd number, so surely there are fewer evens.

The false claim

Why: 'Removing elements always shrinks a set' is imported from finite experience where it is true.

\[ E \subsetneq \mathbb{N} \;\Rightarrow\; |E| < |\mathbb{N}| \quad (\text{WRONG}) \]

The fix

Size is decided by matching, not by containment. The doubling map matches them perfectly.

The correct conclusion

Why: A bijection exists, so the cardinalities are equal. For infinite sets, a proper subset can have the same size; that is exactly what infinite means.

\[ |E| = |\mathbb{N}| \]

31. Decode the notation: Trap: a proper subset must be strictly smaller

Notation

Annotate

From Trap: a proper subset must be strictly smaller — read this one piece at a time. What is each part doing?

On: \( E \subsetneq \mathbb{N} \;\Rightarrow\; |E| < |\mathbb{N}| \quad (\text{WRONG}) \)

  • 'Removing elements always shrinks a set' is imported from finite experience where it is true.
  • A bijection exists, so the cardinalities are equal. For infinite sets, a proper subset can have the same size; that is exactly what infinite means.

32. Rule out three: Check: is doubling a bijection onto the evens?

Elimination

Eliminate the wrong options

Is g a bijection from the naturals onto the even naturals?

3 of these 4 are wrong. Strike them one at a time, and say what rules each one out before you strike the next. The survivor is the answer.

  • A. Yes: it is injective and hits every even number exactly once.
  • B. No: it is injective but misses infinitely many evens.
  • C. No: it is not injective because the evens repeat.
  • D. No: a set cannot match a proper subset of the naturals.

Survives elimination: A

Why: Doubling is injective since 2n = 2m forces n = m, and it is onto E because every even number is twice its own half. A two-sided inverse exists (halving), so g is a bijection.

33. Check: is doubling a bijection onto the evens?

Check

Consider the doubling map from the naturals to the even naturals.

\[ g : \mathbb{N} \to E, \quad g(n) = 2n \]

Check your understanding

Is g a bijection from the naturals onto the even naturals?

  • A. Yes: it is injective and hits every even number exactly once. (correct)
  • B. No: it is injective but misses infinitely many evens.
  • C. No: it is not injective because the evens repeat.
  • D. No: a set cannot match a proper subset of the naturals.

Answer: A

Why: Doubling is injective since 2n = 2m forces n = m, and it is onto E because every even number is twice its own half. A two-sided inverse exists (halving), so g is a bijection.

Why B tempts people
Claims some even is unreached, but any even 2k is exactly g(k), so nothing is missed.
Why C tempts people
Distinct naturals double to distinct evens, so no output repeats; injectivity holds.
Why D tempts people
Repeats the finite-only intuition; matching a proper subset is precisely the definition of an infinite set.

34. Countable sets

Concept

The naturals are the yardstick for the smallest kind of infinity.

countable — A set is countable when it is finite or equinumerous with the natural numbers. If it is infinite and countable, we call it countably infinite.

\[ A \text{ countable} \iff A \text{ finite } \vee\; |A| = |\mathbb{N}| \]

35. Aleph-null, the first infinite cardinal

Concept

The cardinality of the naturals gets its own name.

\[ |\mathbb{N}| = \aleph_0 \]

It is the smallest infinite cardinal: every infinite set contains a copy of the naturals, so nothing infinite is smaller. Later decks show larger infinities exist.

36. Countable means you can list it

Intuition

A bijection with the naturals is exactly a way to write the set as an infinite list with a first entry, a second, a third, and so on, missing nothing and repeating nothing.

\[ A = \{\, a_0,\; a_1,\; a_2,\; a_3,\; \dots \,\} \]

To prove a set countable, the working move is: produce such a list, or a systematic recipe that reaches every element in finite time.

37. Enumeration: onto is enough

Concept

Often it is easier to allow a sloppy list that repeats. That still proves countability.

If there is a surjection from the naturals onto a nonempty set A, then A is countable: walk the list and delete anything already seen to recover a clean bijection.

\[ \exists\, s : \mathbb{N} \twoheadrightarrow A \;\implies\; A \text{ countable} \]

38. The integers are countable

Worked example

The integers run off to infinity in two directions, yet they still form one list. Zig-zag out from zero.

\[ f : \mathbb{N} \to \mathbb{Z}, \quad f(n) = \begin{cases} n/2 & n \text{ even} \\ -(n+1)/2 & n \text{ odd} \end{cases} \]

List the first few values

Why: Even inputs give the non-negatives, odd inputs give the negatives; the two streams interleave.

n012345
f(n)0-11-22-3

Injective

Why: Even inputs map to non-negative integers and odd inputs to negative integers, so the two cases never collide; within each case the map is one-to-one.

Onto

Why: A non-negative integer k is f(2k); a negative integer minus-m is f(2m minus 1). Every integer is reached.

Verify with a concrete inverse value

Why: Check that minus-2 is hit: minus-2 needs 2m minus 1 with m equal 2, giving n equal 3, and indeed f(3) equals minus-2. A bijection exists, so the integers are countable.

39. The integers are countable — line by line

Picture it

Animation

Shows: Each line of the worked example "The integers are countable", appearing one at a time.

The same working the example does, in the order a tutor would write it.

Takeaway: Check that minus-2 is hit: minus-2 needs 2m minus 1 with m equal 2, giving n equal 3, and indeed f(3) equals minus-2. A bijection exists, so the integers are countable.

40. Guess the shape of the answer: A closed-form inverse from the integers back…

Estimation

Predict first

To nail the bijection, write the inverse in closed form.

Commit before you compute: what does A closed-form inverse from the integers back to the naturals come out to? A rough magnitude and the right form is enough — the point is to have something concrete to be wrong about.

Correct: Verify the composite is the identity

Why: A prediction you can defend turns the computation into a check rather than a leap of faith — and an answer that contradicts it is caught on the spot. Compute f of h of minus-2: h(minus-2) equals 3 and f(3) equals minus-2, returning the input.

41. A closed-form inverse from the integers back to the naturals

Worked example

To nail the bijection, write the inverse in closed form.

\[ h : \mathbb{Z} \to \mathbb{N}, \quad h(k) = \begin{cases} 2k & k \ge 0 \\ -2k - 1 & k < 0 \end{cases} \]

Check h on the non-negatives

Why: For k at least 0, h gives an even natural 2k, matching the even inputs of f.

\[ h(0)=0,\; h(1)=2,\; h(2)=4 \]

Check h on the negatives

Why: For k below 0, h gives an odd natural, matching the odd inputs of f.

\[ h(-1)=1,\; h(-2)=3,\; h(-3)=5 \]

Verify the composite is the identity

Why: Compute f of h of minus-2: h(minus-2) equals 3 and f(3) equals minus-2, returning the input. Since h inverts f, both are bijections and the count is confirmed.

\[ f(h(-2)) = f(3) = -2 \]

42. A closed-form inverse from the integers back to the… — line by line

Picture it

Animation

Shows: Each line of the worked example "A closed-form inverse from the integers back to the naturals", appearing one at a time.

The same working the example does, in the order a tutor would write it.

Takeaway: For k at least 0, h gives an even natural 2k, matching the even inputs of f.

43. Something is wrong here: the integers must outnumber the naturals

Anomaly

Predict first

A student writes this, and it looks reasonable:

The naturals sit inside the integers, and the integers add a whole negative half, so surely there are twice as many integers.

It is wrong. Say what breaks — and say it before you turn the page.

Correct: Containment plus 'extra stuff' is read as strictly larger, again importing finite intuition.

The zig-zag list already threads every integer into a single sequence indexed by the naturals.

Why: Containment plus 'extra stuff' is read as strictly larger, again importing finite intuition.

44. Trap: the integers must outnumber the naturals

Trap

The trap

The naturals sit inside the integers, and the integers add a whole negative half, so surely there are twice as many integers.

The false picture

Why: Containment plus 'extra stuff' is read as strictly larger, again importing finite intuition.

\[ \mathbb{N} \subsetneq \mathbb{Z} \;\Rightarrow\; |\mathbb{N}| < |\mathbb{Z}| \quad (\text{WRONG}) \]

The fix

The zig-zag list already threads every integer into a single sequence indexed by the naturals.

The correct conclusion

Why: The interleaving bijection matches the two sets exactly, so they share the cardinal aleph-null. Adding a countable pile to a countable set keeps it countable.

\[ |\mathbb{Z}| = |\mathbb{N}| = \aleph_0 \]

45. Answer it before you see the options: Check: which rule lists every integer…

Prediction

Predict first

Which map is a bijection from the naturals onto the integers?

Answer it in your own words, now, with nothing to choose from. The options are on the next slide — and picking the right one off a list is an easier skill than producing it.

Correct: Even n go to n/2, odd n go to minus (n+1)/2.

Why: Splitting by parity sends the evens to the non-negative integers and the odds to the negative integers, covering every integer exactly once with no overlap, which is a bijection.

46. Check: which rule lists every integer once?

Check

We want a bijection from the naturals (starting at zero) onto all integers.

Check your understanding

Which map is a bijection from the naturals onto the integers?

  • A. Even n go to n/2, odd n go to minus (n+1)/2. (correct)
  • B. Every n goes to n; this already lists all integers.
  • C. Every n goes to minus n, listing the negatives.
  • D. Even n go to n/2, odd n go to (n+1)/2.

Answer: A

Why: Splitting by parity sends the evens to the non-negative integers and the odds to the negative integers, covering every integer exactly once with no overlap, which is a bijection.

Why B tempts people
The identity only reaches the non-negative integers; every negative integer is missed, so it is not onto.
Why C tempts people
Negating only reaches the non-positive integers; every positive integer is missed.
Why D tempts people
Both branches land on non-negative integers, so positives are produced twice and no negative is ever reached; it fails injectivity and surjectivity.

47. Pairs of naturals are countable

Concept

This is the workhorse fact of the whole subject: the grid of ordered pairs of naturals is countable.

\[ |\mathbb{N} \times \mathbb{N}| = |\mathbb{N}| = \aleph_0 \]

The naive listing fails, and seeing why sets up the fix. That failure is a trap we will make explicit shortly.

48. Sweep the grid along diagonals

Intuition

Picture the pairs as an infinite grid, row m down and column n across. Do not scan a whole row: the first row alone never ends, so nothing below it is ever reached.

Instead sweep the finite anti-diagonals, the sets of pairs whose coordinates sum to a fixed value. Each diagonal has finitely many cells, so you finish it and move to the next.

Every pair sits on exactly one diagonal and gets reached in finite time. That is a genuine enumeration.

49. Picture it first: The diagonal enumeration, pictured

Picture it

Figure (svg): A grid of natural-number pairs with arrows sweeping successive anti-diagonals, numbering cells 0,1,2,3,4,5 in the order (0,0),(1,0),(0,1),(2,0),(1,1),(0,2).

Discussion prompt

Read the picture before the words. What is this showing, and what is the one thing it is built to make obvious? Commit to an answer, then read on.

Hint: Name the parts, then say what changes between them — and if nothing changes, say what is being held still.

Answer:

The circled numbers are the order the cells are visited. Cell zero is the origin pair, then the sum-one diagonal, then the sum-two diagonal, and so on.

50. The diagonal enumeration, pictured

Concept

Figure (svg): A grid of natural-number pairs with arrows sweeping successive anti-diagonals, numbering cells 0,1,2,3,4,5 in the order (0,0),(1,0),(0,1),(2,0),(1,1),(0,2).

The circled numbers are the order the cells are visited. Cell zero is the origin pair, then the sum-one diagonal, then the sum-two diagonal, and so on.

51. Plan first: The Cantor pairing function

Step zero

Discussion prompt

The Cantor pairing function — before any calculation: what is the plan? Name the moves in order, in plain English, without doing the arithmetic.

Hint: It starts with: Read the two pieces

Answer:

  1. Read the two pieces
  2. Evaluate the first diagonals
  3. Note it is onto with no gaps
  4. Verify a value by hand

52. The Cantor pairing function

Worked example

Turn the diagonal sweep into a formula on the naturals starting at zero.

\[ \pi(m, n) = \frac{(m+n)(m+n+1)}{2} + n \]

Read the two pieces

Why: The triangular term counts every cell on earlier diagonals; adding n walks along the current diagonal to the right cell.

Evaluate the first diagonals

Why: Plugging in reproduces exactly the picture's visiting order.

(m,n)(0,0)(1,0)(0,1)(2,0)(1,1)(0,2)
pi012345

Note it is onto with no gaps

Why: Each diagonal of length d+1 exactly fills the next block of outputs, so every natural is produced once as (m,n) ranges over the grid.

Verify a value by hand

Why: Check (1,1): sum is 2, triangular term is 2 times 3 over 2 equals 3, plus n equals 1 gives 4, matching the table. The pairing is a bijection, so the grid is countable.

53. The Cantor pairing function — line by line

Picture it

Animation

Shows: Each line of the worked example "The Cantor pairing function", appearing one at a time.

The same working the example does, in the order a tutor would write it.

Takeaway: Check (1,1): sum is 2, triangular term is 2 times 3 over 2 equals 3, plus n equals 1 gives 4, matching the table. The pairing is a bijection, so the grid is countable.

54. Inverting the Cantor pairing

Worked example

A bijection must be reversible: given an output, recover the pair. Take the value five.

Find the diagonal index w

Why: w is the largest triangular index not exceeding the value, computed from the standard floor formula.

\[ w = \left\lfloor \frac{\sqrt{8z+1} - 1}{2} \right\rfloor, \quad z = 5 \Rightarrow w = \left\lfloor \frac{\sqrt{41}-1}{2} \right\rfloor = 2 \]

Subtract the triangular offset

Why: The offset t is the count of cells before this diagonal; the remainder is the column n.

\[ t = \frac{w(w+1)}{2} = 3, \qquad n = z - t = 5 - 3 = 2 \]

Recover the row

Why: The row is the leftover of the diagonal after the column is fixed.

\[ m = w - n = 2 - 2 = 0 \]

Verify by re-pairing

Why: Feed (0,2) back into pi: sum 2, triangular term 3, plus 2 gives 5, the original value. The inverse is correct, confirming a genuine bijection.

55. Inverting the Cantor pairing — line by line

Picture it

Animation

Shows: Each line of the worked example "Inverting the Cantor pairing", appearing one at a time.

The same working the example does, in the order a tutor would write it.

Takeaway: Feed (0,2) back into pi: sum 2, triangular term 3, plus 2 gives 5, the original value. The inverse is correct, confirming a genuine bijection.

56. A product of two countable sets is countable

Concept

The pairing generalizes. If A and B can each be listed, their grid can be swept diagonally the same way.

\[ A, B \text{ countable} \;\implies\; A \times B \text{ countable} \]

By induction this extends to any fixed finite product: triples, quadruples, and beyond stay countable.

57. What has to happen first: Pairs of integers are countable

Ranking

Put in order

Put the moves of Pairs of integers are countable into the order they have to happen.

  1. Code each coordinate
  2. Code the pair
  3. Verify injectivity of the composite

Why: These are the moves of the worked example in the order it makes them, and each one is set up by the one before it. Apply the integer-to-natural map h to each slot, turning an integer pair into a natural pair without collisions since h is injective.

58. Pairs of integers are countable

Worked example

Compose the tools we already built. We know each integer is coded by a natural, and each pair of naturals by a natural.

Code each coordinate

Why: Apply the integer-to-natural map h to each slot, turning an integer pair into a natural pair without collisions since h is injective.

\[ (a, b) \mapsto (h(a), h(b)) \in \mathbb{N} \times \mathbb{N} \]

Code the pair

Why: Apply the Cantor pairing to the natural pair, landing on a single natural, again injectively.

\[ (a, b) \mapsto \pi(h(a), h(b)) \in \mathbb{N} \]

Verify injectivity of the composite

Why: Both h-on-each-slot and pi are injective, so the composite is injective; an injection into the naturals makes the integer grid countable. Check that distinct pairs like (1,0) and (0,1) get distinct codes, which they do.

59. Pairs of integers are countable — line by line

Picture it

Animation

Shows: Each line of the worked example "Pairs of integers are countable", appearing one at a time.

The same working the example does, in the order a tutor would write it.

Takeaway: Both h-on-each-slot and pi are injective, so the composite is injective; an injection into the naturals makes the integer grid countable. Check that distinct pairs like (1,0) and (0,1) get distinct codes, which they do.

60. Something is wrong here: enumerate the grid row by row

Anomaly

Predict first

A student writes this, and it looks reasonable:

It is tempting to list the pairs by finishing row zero, then row one, then row two.

It is wrong. Say what breaks — and say it before you turn the page.

Correct: Row zero is the pairs (0,0), (0,1), (0,2), and so on forever.

Sweep the finite diagonals instead, so every cell is reached after finitely many steps.

Why: Row zero is the pairs (0,0), (0,1), (0,2), and so on forever. You never finish it, so (1,0) is never assigned an index.

61. Trap: enumerate the grid row by row

Trap

The trap

It is tempting to list the pairs by finishing row zero, then row one, then row two.

Where it breaks

Why: Row zero is the pairs (0,0), (0,1), (0,2), and so on forever. You never finish it, so (1,0) is never assigned an index.

\[ 0 \mapsto (0,0),\; 1 \mapsto (0,1),\; 2 \mapsto (0,2),\; \dots \;(1,0)\ \text{unreached} \]

The fix

Sweep the finite diagonals instead, so every cell is reached after finitely many steps.

Why it works

Why: The diagonal through a pair has coordinate sum m plus n, a fixed finite number, and only finitely many cells precede it, so its index is finite.

\[ (1,0) \mapsto 1, \quad (0,1) \mapsto 2, \quad (2,0) \mapsto 3 \]

62. Say it in words: Trap: enumerate the grid row by row

Translation

\( (1,0) \mapsto 1, \quad (0,1) \mapsto 2, \quad (2,0) \mapsto 3 \)

Draw it

Translate both ways. First write the expression above as a sentence with no symbols in it at all. Then cover it, and write your sentence back as notation. If the two versions disagree, the disagreement is the thing to fix.

63. Check: which sweep enumerates the grid?

Check

We want every pair of naturals to receive a finite index.

Check your understanding

Which strategy actually lists every pair of naturals in finite time?

  • A. Visit pairs by increasing coordinate sum, finishing each finite diagonal before the next. (correct)
  • B. List all of row zero, then all of row one, then all of row two.
  • C. List all of column zero, then all of column one, then all of column two.
  • D. There is no such list; the grid of pairs is uncountable.

Answer: A

Why: Each anti-diagonal holds finitely many pairs, so it is completed in finitely many steps, and every pair lies on exactly one diagonal, giving it a finite index. This is the Cantor pairing enumeration.

Why B tempts people
Row zero is already infinite, so no pair outside row zero ever gets an index; the sweep stalls forever.
Why C tempts people
Column zero is infinite for the same reason, so pairs in later columns are never reached.
Why D tempts people
The grid of pairs is countable; the diagonal sweep is an explicit bijection with the naturals.

64. Any subset of a countable set is countable

Concept

Countability passes down to subsets: you cannot escape countability by carving out a piece.

Given a listing of the whole set, walk it and keep only the entries that land in the subset. What survives is still a list, possibly finite.

\[ B \subseteq A, \; A \text{ countable} \;\implies\; B \text{ countable} \]

65. State the rule before it runs: Every infinite subset of the naturals is…

Hypothesis

Predict first

Every infinite subset of the naturals is countable is about to be worked. State your hypothesis first: which rule or definition decides this one, and what is the first move it forces? Then watch whether the example agrees with you.

Correct: Define the enumeration by least elements

Why: Well-ordering of the naturals guarantees a least element; peel it off, then repeat on the rest to get a strictly increasing list.

A hypothesis you wrote down is falsifiable; a vague sense of how it will go is not. If the example opens somewhere else, that gap is the thing worth chasing.

66. Every infinite subset of the naturals is countable

Worked example

Take any infinite set of naturals and list it in increasing order.

\[ S \subseteq \mathbb{N}, \; S \text{ infinite} \]

Define the enumeration by least elements

Why: Well-ordering of the naturals guarantees a least element; peel it off, then repeat on the rest to get a strictly increasing list.

\[ s_0 = \min S, \quad s_{k+1} = \min\big(S \setminus \{s_0, \dots, s_k\}\big) \]

Injective

Why: The sequence is strictly increasing, so all terms are distinct.

Onto S

Why: Any element x of S has only finitely many members of S below it, so it appears at some finite stage; the process never skips it.

Verify infinity is used

Why: Because S is infinite the minimum always exists at every stage, so the list never terminates. Check on the primes: this yields 2,3,5,7,..., matching each prime to its index. So S is countably infinite.

67. Every infinite subset of the naturals is countable — line by line

Picture it

Animation

Shows: Each line of the worked example "Every infinite subset of the naturals is countable", appearing one at a time.

The same working the example does, in the order a tutor would write it.

Takeaway: Because S is infinite the minimum always exists at every stage, so the list never terminates. Check on the primes: this yields 2,3,5,7,..., matching each prime to its index. So S is countably infinite.

68. A countable union of countable sets is countable

Concept

Stack countably many countable sets and the total is still countable.

\[ A_0, A_1, A_2, \dots \text{ each countable} \;\implies\; \bigcup_{i \in \mathbb{N}} A_i \text{ countable} \]

This step quietly uses the axiom of choice to pick one listing per set at once. With the listings chosen, the rest is pure grid-sweeping.

69. A list of lists is just the grid again

Intuition

Write set number i as its own horizontal list, and stack these lists vertically. Now the element in row i, column j is indexed by the pair (i, j).

That is exactly the grid of pairs, which we already know is countable by the diagonal sweep. Overlaps between the sets only shorten the final list, never lengthen it.

70. Plan first: Enumerating the positive rationals

Step zero

Discussion prompt

Enumerating the positive rationals — before any calculation: what is the plan? Name the moves in order, in plain English, without doing the arithmetic.

Hint: It starts with: Place fractions on the grid and sweep diagonals

Answer:

  1. Place fractions on the grid and sweep diagonals
  2. Skip non-reduced repeats
  3. Verify a duplicate was skipped

71. Enumerating the positive rationals

Worked example

Each positive rational is a ratio of a numerator and a denominator, so it lives in the grid of positive pairs.

\[ \mathbb{Q}^{+} = \left\{ \tfrac{p}{q} : p, q \in \mathbb{N},\ p,q \ge 1 \right\} \]

Place fractions on the grid and sweep diagonals

Why: Row p, column q holds p over q. Sweeping by the sum p plus q visits finitely many fractions per diagonal, so every fraction is reached.

Skip non-reduced repeats

Why: Discard any fraction not in lowest terms so each rational value appears once; this is deleting duplicates from a surjection.

\[ \tfrac{1}{1},\ \tfrac{2}{1},\ \tfrac{1}{2},\ \tfrac{3}{1},\ \tfrac{1}{3},\ \tfrac{4}{1},\ \tfrac{3}{2},\ \tfrac{2}{3},\ \tfrac{1}{4}, \dots \]

Verify a duplicate was skipped

Why: On the sum-four diagonal, two over two equals one, already listed as one over one, so it is dropped. Every positive rational appears exactly once, so the positive rationals are countable.

72. Enumerating the positive rationals — line by line

Picture it

Animation

Shows: Each line of the worked example "Enumerating the positive rationals", appearing one at a time.

The same working the example does, in the order a tutor would write it.

Takeaway: On the sum-four diagonal, two over two equals one, already listed as one over one, so it is dropped. Every positive rational appears exactly once, so the positive rationals are countable.

73. All the rationals are countable

Concept

Extend from the positives to everything.

The rationals are the union of the positive rationals, the negative rationals, and the single element zero. That is a union of three countable sets, hence countable.

\[ |\mathbb{Q}| = \aleph_0 \]

74. Something is wrong here: enough countable sets must overflow to uncountable

Anomaly

Predict first

A student writes this, and it looks reasonable:

Each rational fits between two others, the rationals feel dense and endless, so surely gluing infinitely many countable pieces breaks past countable.

It is wrong. Say what breaks — and say it before you turn the page.

Correct: Confuses density on the line with cardinality.

The list-of-lists grid indexes the whole union by pairs of naturals.

Why: Confuses density on the line with cardinality. Being packed tightly says nothing about how many elements there are.

75. Trap: enough countable sets must overflow to uncountable

Trap

The trap

Each rational fits between two others, the rationals feel dense and endless, so surely gluing infinitely many countable pieces breaks past countable.

The false leap

Why: Confuses density on the line with cardinality. Being packed tightly says nothing about how many elements there are.

\[ \bigcup_{i} A_i \text{ (each countable)} \Rightarrow \text{uncountable} \quad (\text{WRONG}) \]

The fix

The list-of-lists grid indexes the whole union by pairs of naturals.

The correct conclusion

Why: A countable union of countable sets injects into the countable grid of pairs, so it stays countable. Density is irrelevant; the rationals are countable despite being dense.

\[ \bigcup_{i \in \mathbb{N}} A_i \hookrightarrow \mathbb{N} \times \mathbb{N} \]

76. Break it on purpose: enough countable sets must overflow to…

Break the constraint

Discussion prompt

The rule this trap just fixed:

A countable union of countable sets injects into the countable grid of pairs, so it stays countable. Density is irrelevant; the rationals are countable despite being dense.

Now break it on purpose. Build a case that violates it and follow the consequences until something visibly fails. Where does the failure first show up — and would you have noticed it if you had not been looking?

Hint: The dangerous rules are the ones whose violation still produces an answer. If yours fails loudly, try to find one that fails quietly.

Answer:

Confuses density on the line with cardinality. Being packed tightly says nothing about how many elements there are.

77. Check: why are the rationals countable?

Check

Recall how the enumeration of the rationals was built.

Check your understanding

What is the correct reason the rationals are countable?

  • A. Each rational is a pair (numerator, denominator), and the grid of pairs is countable via the diagonal sweep. (correct)
  • B. The rationals are finite once you reduce to lowest terms.
  • C. Between any two rationals there is another, so they can be counted in order along the line.
  • D. The rationals are a subset of the reals, and every subset of the reals is countable.

Answer: A

Why: Writing a rational as a numerator over a denominator injects the rationals into the grid of integer pairs, which the diagonal sweep enumerates; deleting non-reduced repeats yields a clean listing.

Why B tempts people
There are infinitely many rationals even in lowest terms, so the set is countably infinite, not finite.
Why C tempts people
Density actually blocks listing them in size order, since there is no next rational; countability comes from the grid, not the ordering.
Why D tempts people
The reals are uncountable and have uncountable subsets, so being a subset of the reals proves nothing about countability.

78. Images of countable sets stay countable

Concept

Applying a function can only merge or relabel elements; it never creates new ones out of nothing.

If A is countable and f is any function on A, then the image of A under f is countable, because the listing of A pushes forward to a listing of the image.

\[ A \text{ countable} \;\implies\; f[A] \text{ countable} \]

79. What has to be given first: Merging two lists into one

Missing information

Discussion prompt

If A and B are each countable, their union is countable. The trick is to interleave.

What do you need to know — or decide — before the first line can be written? List everything the problem has to hand you.

Hint: Anything you would have to invent to get started is a thing the problem must supply.

Answer:

Alternate: even positions draw from A, odd positions from B, so both lists advance and neither is starved.

80. Merging two lists into one

Worked example

If A and B are each countable, their union is countable. The trick is to interleave.

\[ A = \{a_0, a_1, \dots\}, \quad B = \{b_0, b_1, \dots\} \]

Zip the two lists together

Why: Alternate: even positions draw from A, odd positions from B, so both lists advance and neither is starved.

\[ c_{2k} = a_k, \qquad c_{2k+1} = b_k \]

Onto the union

Why: Any element of A is some a_k at position 2k, and any element of B is some b_k at position 2k plus 1, so every element appears.

Remove duplicates if the sets overlap

Why: Deleting repeats from a surjection still leaves a listing, so the union is countable even when A and B share elements.

Verify on a tiny case

Why: Take A the evens and B the odds; interleaving gives 0,1,2,3,... which is all of the naturals, exactly the union. The construction works.

81. Merging two lists into one — line by line

Picture it

Animation

Shows: Each line of the worked example "Merging two lists into one", appearing one at a time.

The same working the example does, in the order a tutor would write it.

Takeaway: Take A the evens and B the odds; interleaving gives 0,1,2,3,... which is all of the naturals, exactly the union. The construction works.

82. Algebraic numbers

Concept

Numbers do not have to be simple fractions to be reachable by algebra.

algebraic number — A real or complex number that is a root of some nonzero polynomial with integer coefficients. Every rational qualifies, and so do many irrationals like the square root of two.

\[ \sqrt{2} \text{ is a root of } x^2 - 2 = 0 \]

83. Finitely many roots, countably many polynomials

Intuition

There are two finiteness levers. First, each polynomial of degree d has at most d roots, a finite haul. Second, the integer polynomials themselves can be listed.

So the algebraic numbers are a countable union, one finite batch of roots per polynomial. Sweep the polynomials, collect their roots, and you have listed every algebraic number.

84. Guess the shape of the answer: The algebraic numbers are countable

Estimation

Predict first

Organize the integer polynomials by a size measure so each size gives only finitely many.

Commit before you compute: what does The algebraic numbers are countable come out to? A rough magnitude and the right form is enough — the point is to have something concrete to be wrong about.

Correct: Verify a specific algebraic number is captured

Why: A prediction you can defend turns the computation into a check rather than a leap of faith — and an answer that contradicts it is caught on the spot. The square root of two is a root of x squared minus two, whose height is 2 plus 1 plus 0 plus 2 equal to 5, so it appears at height five.

85. The algebraic numbers are countable

Worked example

Organize the integer polynomials by a size measure so each size gives only finitely many.

\[ H = n + |a_0| + |a_1| + \cdots + |a_n|, \quad \text{degree } n,\ \text{coefficients } a_i \in \mathbb{Z} \]

Each height value gives finitely many polynomials

Why: The degree and the absolute values of the coefficients are bounded by the fixed height, and there are only finitely many integer tuples under a bound.

Each polynomial gives finitely many roots

Why: A degree n polynomial has at most n roots, so each contributes a finite set of algebraic numbers.

Take the union over all heights

Why: Ranging the height over the naturals collects every algebraic number; this is a countable union of finite sets, hence countable.

\[ \overline{\mathbb{Q}} = \bigcup_{H \in \mathbb{N}} \{\text{roots of polynomials of height } H\} \]

Verify a specific algebraic number is captured

Why: The square root of two is a root of x squared minus two, whose height is 2 plus 1 plus 0 plus 2 equal to 5, so it appears at height five. The enumeration reaches it, confirming the algebraic numbers are countable.

86. Decode the notation: The algebraic numbers are countable

Notation

Annotate

From The algebraic numbers are countable — read this one piece at a time. What is each part doing?

On: \( \overline{\mathbb{Q}} = \bigcup_{H \in \mathbb{N}} \{\text{roots of polynomials of height } H\} \)

  • The degree and the absolute values of the coefficients are bounded by the fixed height, and there are only finitely many integer tuples under a bound.
  • A degree n polynomial has at most n roots, so each contributes a finite set of algebraic numbers.
  • Ranging the height over the naturals collects every algebraic number; this is a countable union of finite sets, hence countable.

87. The Schroeder-Bernstein theorem

Concept

Sometimes building a bijection outright is painful, but squeezing each set inside the other is easy.

Schroeder-Bernstein says two one-way injections are enough: if A embeds in B and B embeds in A, then A and B have exactly the same size.

\[ |A| \le |B| \;\wedge\; |B| \le |A| \;\implies\; |A| = |B| \]

88. Two one-way squeezes weave a bijection

Intuition

Each injection is a one-way fit. Chasing an element back and forth along the two injections carves the sets into matching chains and cycles.

On each chain there is a canonical way to pair the two sides. Assembling those local pairings is the actual bijection, so you never have to guess a global formula.

89. Plan first: The open and closed unit intervals have equal size

Step zero

Discussion prompt

The open and closed unit intervals have equal size — before any calculation: what is the plan? Name the moves in order, in plain English, without doing the arithmetic.

Hint: It starts with: Inject the open into the closed

Answer:

  1. Inject the open into the closed
  2. Inject the closed into the open
  3. Apply Schroeder-Bernstein
  4. Verify the second map lands strictly inside

90. The open and closed unit intervals have equal size

Worked example

Show the open interval and the closed interval are equinumerous. A direct bijection is fiddly; two injections are trivial.

\[ (0,1) \quad \text{versus} \quad [0,1] \]

Inject the open into the closed

Why: Inclusion works: the open interval is literally a subset of the closed one, and inclusion is injective.

\[ \iota(x) = x : (0,1) \hookrightarrow [0,1] \]

Inject the closed into the open

Why: Shrink and recenter so the endpoints move inside. This linear map is injective and its image avoids 0 and 1.

\[ g(x) = \tfrac{x}{2} + \tfrac{1}{4} : [0,1] \to \left[\tfrac14, \tfrac34\right] \subset (0,1) \]

Apply Schroeder-Bernstein

Why: Injections exist both ways, so the theorem hands us a bijection with no need to write it down.

Verify the second map lands strictly inside

Why: Check the endpoints: g of 0 is one quarter and g of 1 is three quarters, both strictly between 0 and 1, and g is injective since its slope is one half. Both injections are valid, so the two intervals have the same cardinality.

91. The open and closed unit intervals have equal size — line by line

Picture it

Animation

Shows: Each line of the worked example "The open and closed unit intervals have equal size", appearing one at a time.

The same working the example does, in the order a tutor would write it.

Takeaway: Check the endpoints: g of 0 is one quarter and g of 1 is three quarters, both strictly between 0 and 1, and g is injective since its slope is one half. Both injections are valid, so the two intervals have the same cardinality.

92. Something is wrong here: you must exhibit an explicit bijection

Anomaly

Predict first

A student writes this, and it looks reasonable:

A student insists that until you write a single clean formula matching every point of the open interval to a point of the closed one, the sizes are unproven.

It is wrong. Say what breaks — and say it before you turn the page.

Correct: A direct piecewise bijection here exists but is annoying to construct, and the demand for it needlessly blocks the proof.

Schroeder-Bernstein exists precisely to remove this burden.

Why: A direct piecewise bijection here exists but is annoying to construct, and the demand for it needlessly blocks the proof.

93. Trap: you must exhibit an explicit bijection

Trap

The trap

A student insists that until you write a single clean formula matching every point of the open interval to a point of the closed one, the sizes are unproven.

Why this stalls

Why: A direct piecewise bijection here exists but is annoying to construct, and the demand for it needlessly blocks the proof.

The fix

Schroeder-Bernstein exists precisely to remove this burden.

The correct standard

Why: Two easy injections, one each way, already prove equal cardinality. The theorem guarantees the bijection abstractly; you never have to display it.

\[ |A|\le|B| \wedge |B|\le|A| \implies |A|=|B| \]

94. Which of these survive contact with Cardinality I: Countable Sets?

Two truths and a lie

Sort into buckets

Some of these hold up and some are the exact mistakes this lesson is built to prevent. Sort them.

Holds up
For finite sets, size is easy: count the elements. But you cannot count an infinite set to the end.; He never counted. He built a one-to-one correspondence between sheep and pebbles. Sameness of size is matching, and matching needs no numbers.; An injection from A to B places every element of A into B with no collisions: different inputs get different outputs.
Breaks
The finite reflex: the evens sit inside the naturals and skip every odd number, so surely there are fewer evens.; The naturals sit inside the integers, and the integers add a whole negative half, so surely there are twice as many integers.
sound
These are stated as this lesson states them — each one survives the edge cases Cardinality I: Countable Sets puts it through.
flawed
Each of these is lifted from a trap in this deck: reasonable-sounding, and wrong in a way that only shows up once you rely on it.

95. What has to happen first: Triples of naturals are countable too

Ranking

Put in order

Put the moves of Triples of naturals are countable too into the order they have to happen.

  1. Pair the first two coordinates
  2. Pair the result with the third
  3. Conclude countability
  4. Verify one triple decodes uniquely

Why: These are the moves of the worked example in the order it makes them, and each one is set up by the one before it. The inner pairing turns (a, b) into a single natural injectively, since the Cantor pairing is a bijection.

96. Triples of naturals are countable too

Worked example

Nest the pairing to handle three coordinates instead of two.

\[ \tau(a, b, c) = \pi\big(\pi(a, b),\, c\big) \]

Pair the first two coordinates

Why: The inner pairing turns (a, b) into a single natural injectively, since the Cantor pairing is a bijection.

Pair the result with the third

Why: The outer pairing combines that natural with c into one natural, again injectively.

Conclude countability

Why: A composite of injections is an injection from the triples into the naturals, so the triples are countable; the same nesting handles any fixed number of coordinates.

Verify one triple decodes uniquely

Why: Encode (0, 0, 1): the inner pairing of (0,0) is 0, then the outer pairing of (0,1) is 2, and inverting the outer then inner pairing recovers (0,0,1). The code is reversible, so tau is a valid injection.

97. Triples of naturals are countable too — line by line

Picture it

Animation

Shows: Each line of the worked example "Triples of naturals are countable too", appearing one at a time.

The same working the example does, in the order a tutor would write it.

Takeaway: Encode (0, 0, 1): the inner pairing of (0,0) is 0, then the outer pairing of (0,1) is 2, and inverting the outer then inner pairing recovers (0,0,1). The code is reversible, so tau is a valid injection.

98. Countable or larger: no size in between the finite and aleph-null

Concept

Aleph-null is the floor of the infinite. Any infinite set contains a listable copy of the naturals inside it.

So every set falls into one of three buckets: finite, countably infinite, or strictly larger than the naturals. There is no infinite size below aleph-null.

\[ A \text{ infinite} \;\implies\; \aleph_0 \le |A| \]

99. Teach it back: Countable or larger: no size in between the finite and…

Explain it

Discussion prompt

Explain Countable or larger: no size in between the finite and aleph-null to a student a year behind you. No notation, no jargon they have not met — and it still has to be true.

Hint: If your explanation needs a symbol they have never seen, you are describing the notation rather than the idea.

Answer:

Aleph-null is the floor of the infinite. Any infinite set contains a listable copy of the naturals inside it.

100. The arithmetic of aleph-null

Concept

Everything we proved can be summarized as a strange arithmetic where the smallest infinity absorbs the usual operations.

\[ \aleph_0 + \aleph_0 = \aleph_0, \qquad \aleph_0 \cdot \aleph_0 = \aleph_0 \]

Doubling came from the integers, multiplying from the grid of pairs, and even a countable sum of copies stays put. Countable is a very sticky property.

101. By analogy: The arithmetic of aleph-null

Analogy

Discussion prompt

Explain The arithmetic of aleph-null by analogy to something with no Foundations of Higher Mathematics in it at all — a queue, a recipe, a map, a bank balance, whatever fits. Then say where your analogy breaks.

Hint: An analogy that never breaks is not an analogy, it is the same idea wearing a hat. Find the seam — that is the part that is actually new.

Answer:

Everything we proved can be summarized as a strange arithmetic where the smallest infinity absorbs the usual operations.

102. CS view: countable means enumerable by a program

Concept

A listing of a set is exactly a program that, given an index, prints the corresponding element, and eventually prints each one.

So countable sets are the ones a machine can stream out completely. This is the same flavor as a semi-decidable set: you can enumerate its members, even if you cannot always decide non-membership.

It also foreshadows the sequel: there are only countably many programs, yet uncountably many real numbers, so most reals are not enumerable at all.

103. Break it if you can: CS view: countable means enumerable by a program

Counterexample

Discussion prompt

A listing of a set is exactly a program that, given an index, prints the corresponding element, and eventually prints each one.

That is stated as though it always holds. Do one of two things: produce a case where it fails, or say precisely what rules such a case out. "It just does" is not on the menu.

Hint: Hunt at the extremes first — zero, one, negative, empty, equal. If every extreme survives, the reason they survive is the proof.

104. Recipe: proving a set is countable

Pattern

1. Try a direct listing or bijection with the naturals

Why: A formula or systematic sweep that reaches every element in finite time.

2. Or inject the set into a known countable set

Why: An injection into the naturals, the grid of pairs, or the rationals proves at-most-countable.

3. Or build it from countable pieces

Why: Subsets, finite products, and countable unions of countable sets are all countable; assemble your set from these.

4. Or squeeze both ways with Schroeder-Bernstein

Why: Injections into and out of a countable set pin the cardinality exactly.

105. Where this shows up: Cardinality I: Countable Sets

Real world

Discussion prompt

Outside this lesson: where does Cardinality I: Countable Sets actually turn up? Name one concrete situation — a job, a piece of software someone ships, a decision somebody has to make — and say which part of Recipe: proving a set is countable is doing the work in it.

Hint: Vague is the failure mode here. "Engineering" is not a situation; "deciding whether this build is fast enough to ship" is.

Answer:

Comparing infinite sizes by bijection: equinumerosity, Dedekind-infinite sets, and countability. We build explicit bijections for the naturals, integers, pairs, and rationals, prove countable unions stay countable, and use Schroeder-Bernstein.

106. How sure are you: Check: a countable union of countable sets

Commit first

Predict first

Which conclusion about the union is justified?

Commit to an answer, then rate it — certain, fairly sure, or guessing — and write the rating down before you turn the page.

Correct: The union is countable, whether or not the sets overlap.

Why: Indexing element j of set i by the pair (i, j) injects the union into the countable grid of pairs, so the union is countable; overlaps only delete duplicates and shorten the list.

The rating matters as much as the answer: confident-and-wrong is the combination that survives revision, because nothing about it feels like it needs revisiting.

107. Check: a countable union of countable sets

Check

Suppose each set in a countable family is countable.

Check your understanding

Which conclusion about the union is justified?

  • A. The union is countable, whether or not the sets overlap. (correct)
  • B. The union is finite.
  • C. The union is uncountable because there are infinitely many sets.
  • D. Nothing follows unless the sets are pairwise disjoint.

Answer: A

Why: Indexing element j of set i by the pair (i, j) injects the union into the countable grid of pairs, so the union is countable; overlaps only delete duplicates and shorten the list.

Why B tempts people
Even a single set in the family may be infinite, so the union is generally countably infinite, not finite.
Why C tempts people
This is the overflow trap: countably many countable sets still inject into the countable grid of pairs.
Why D tempts people
Disjointness is not required; if the sets overlap you delete repeats, which can only make the listing shorter.

108. Check: two injections both ways

Check

You have an injection from A into B and an injection from B into A.

Check your understanding

What does the Schroeder-Bernstein theorem let you conclude?

  • A. A and B are equinumerous: a bijection between them exists. (correct)
  • B. A and B must both be finite.
  • C. Nothing yet; you still need an explicit bijection to prove equal size.
  • D. A is a proper subset of B.

Answer: A

Why: Injections each way give at-most-as-many in both directions, and Schroeder-Bernstein promotes that to a genuine bijection, so the two sets have exactly the same cardinality.

Why B tempts people
The theorem holds for infinite sets too; it says nothing forcing finiteness, as the interval example shows.
Why C tempts people
The whole point of the theorem is that the two injections already guarantee a bijection; you need not display one.
Why D tempts people
Injections need not be inclusions, and equal cardinality does not make either set a subset of the other.

109. Answer it before you see the options: Check: buses at the Grand Hotel

Prediction

Predict first

Can every current guest and every new passenger get a room?

Answer it in your own words, now, with nothing to choose from. The options are on the next slide — and picking the right one off a list is an easier skill than producing it.

Correct: Yes: guests plus passengers form a countable union of countable sets, still countable, so they fit in the countable rooms.

Why: The guests and all bus passengers together are a countable union of countable sets, hence countable, so a bijection with the room numbers exists and everyone is assigned a room.

110. Check: buses at the Grand Hotel

Check

The countably infinite hotel is full. Countably many buses arrive, each carrying countably many passengers.

Check your understanding

Can every current guest and every new passenger get a room?

  • A. Yes: guests plus passengers form a countable union of countable sets, still countable, so they fit in the countable rooms. (correct)
  • B. No: countably many buses of countably many passengers is uncountable.
  • C. Only finitely many of the buses can be accommodated.
  • D. Only if the hotel had been empty to begin with.

Answer: A

Why: The guests and all bus passengers together are a countable union of countable sets, hence countable, so a bijection with the room numbers exists and everyone is assigned a room.

Why B tempts people
This is the overflow trap again: a countable union of countable sets is countable, not uncountable.
Why C tempts people
There is no such finite ceiling; the diagonal sweep indexes all buses and passengers at once.
Why D tempts people
A full hotel is fine; shifting existing guests to make room is exactly the Hilbert Hotel move.

111. Rule out three: Check: evaluate the pairing function

Elimination

Eliminate the wrong options

What is the value of the pairing at row 0, column 2?

3 of these 4 are wrong. Strike them one at a time, and say what rules each one out before you strike the next. The survivor is the answer.

  • A. 5
  • B. 3
  • C. 2
  • D. 6

Survives elimination: A

Why: The coordinate sum is 2, so the triangular term is 2 times 3 divided by 2, which is 3, and adding the column value 2 gives 5. That matches the diagonal enumeration order.

112. Check: evaluate the pairing function

Check

Use the Cantor pairing on the naturals starting at zero.

\[ \pi(m, n) = \frac{(m+n)(m+n+1)}{2} + n \]

Check your understanding

What is the value of the pairing at row 0, column 2?

  • A. 5 (correct)
  • B. 3
  • C. 2
  • D. 6

Answer: A

Why: The coordinate sum is 2, so the triangular term is 2 times 3 divided by 2, which is 3, and adding the column value 2 gives 5. That matches the diagonal enumeration order.

Why B tempts people
Stops at the triangular term 3 and forgets to add the column value n equal to 2.
Why C tempts people
Adds the column value 2 but drops the triangular offset entirely, using 0 for it.
Why D tempts people
Uses the triangular number for coordinate sum three instead of two and forgets to add n.

113. Connect it up: Cardinality I: Countable Sets

Connect it up

Draw it

One page, no notation unless you need it: draw how these connect — Recipe: proving two sets have the same size · Recipe: proving a set is countable · How big is a set, really? · Counting is really pairing · Injection: at most as many. Put an arrow wherever one of them is what makes another possible, and label the arrow with why.

114. What you can do now

Recap

Size for infinite sets is decided by bijection, never by counting or by containment. A proper subset of an infinite set can match the whole.

Countable means finite or matchable with the naturals, equivalently listable as a sequence. The integers, the grid of pairs, the rationals, and the algebraic numbers are all countable.

ToolWhat it proves
Explicit bijectionsame size as the naturals
Diagonal sweeppairs and products stay countable
Countable uniongluing countable pieces stays countable
Schroeder-Bernsteintwo injections give equal size

Next: not every infinite set is countable. Cantor's diagonal argument shows the reals are strictly larger, opening an endless tower of infinities.

Sources

  1. Cardinality of the continuum and countable sets (standard set-theory treatment)
  2. All definitions, theorem statements, proof sketches, witnesses and counterexamples re-derived and checked by hand. — Verified 2026-07-21.

Want this taught 1-on-1? Alexander tutors Foundations of Higher Mathematics — $55/session, free consultation.

Book on Wyzant · Text (657) 465-8108