3.5  Comparing Sizes: the Schröder–Bernstein Theorem

We have (0,1)⊆[0,1]⊆R. Are the three sets the same size? Section 3.1 made “same size” mean “there is a bijection”, and for these sets a bijection is fiddly to write down: [0,1] has two endpoints that (0,1) lacks, and R is unbounded. An injection, on the other hand, is easy in both directions: the inclusion goes one way, and squeezing [0,1] into the middle of (0,1) goes the other. This section turns injections into a way of comparing sizes, and proves the theorem that makes the comparison useful: injections both ways give a bijection.

3.5.1. Comparing sizes with injections

An injection A→B places a copy of A inside B: distinct elements of A go to distinct elements of B, so B has room for all of A. For finite sets this is the pigeonhole principle read the other way round (Corollary 3.1.3). It deserves a name for all sets.

A is at most as big as B when A fits into B without collisions.

Definition 3.5.1 (Comparing Sizes)

Let A and B be sets. We write |A|≤|B|, and say that A is at most as big as B, if there exists an injection A→B. We write |A|<|B|, and say that A is strictly smaller than B, if |A|≤|B| and not |A|=|B|: there is an injection A→B, and there is no bijection A→B.

In words: “≤” asks for one injection, of our choosing. “<” asks for an injection and rules out every bijection, which is a statement about all functions A→B at once. As with |A|=|B| in Section 3.1 (Definition 3.1.1), the symbols |A|≤|B| and |A|<|B| are relations between the sets A and B. No object |A| is defined for an infinite set, and nothing here compares two numbers.

Examples.

  • Subsets. If A⊆B, the inclusion a↦a is an injection A→B, so |A|≤|B|. In particular |(0,1)|≤|[0,1]|≤|R|.
  • The degenerate case. For every set B, |∅|≤|B|: the empty function ∅→B (Proposition 1.4.2 (a)) is injective, vacuously, since there are no x1,x2∈∅ to test.
  • Finite sets. Let A have m elements and B have n elements (Definition 3.1.2). Then |A|≤|B| exactly when m≤n. If m≤n, take bijections φ:{1,…,m}→A and ψ:{1,…,n}→B; the inclusion ι:{1,…,m}→{1,…,n} is injective, so ψ∘ι∘φ−1:A→B is injective by Theorem 1.4.4 (a), φ−1 being a bijection (Theorem 1.5.4). If m>n, there is no injection A→B by Corollary 3.1.3 (a). So the relation agrees with the count of elements, which is why it is allowed to borrow the symbol ≤.
  • Countable sets. By Theorem 3.2.2, (i) ⟺ (ii), a set A is countable if and only if |A|≤|N|. “Countable” means “at most as big as N”.
  • Power sets. For every set X, |X|<|P(X)|. The map x↦{x} is an injection X→P(X), since {x1}={x2} gives x1∈{x2}, so x1=x2. And there is no bijection X→P(X), because by Theorem 3.4.2 there is not even a surjection. In particular |N|<|P(N)|.

Non-example by minimal change. Replace “injection” by “function” in the definition. Then any set would be “at most as big as” any non-empty set, by a constant map: R→{0} would put R below a one-element set. The clause that carries the meaning is “no two elements collide”.

Warning. |A|<|B| does not mean “there is an injection A→B that is not a bijection”. The map n↦n+1 is an injection N→N that misses 0, and yet |N|=|N|. For infinite sets one injection that fails to be onto proves nothing about strictness; |A|<|B| needs every map A→B to fail to be a bijection, which is why Cantor’s theorem, a statement about every f:X→P(X), is the source of our strict inequalities.

The relation behaves like an order in two of the three ways. The third is the content of this section’s theorem.

Proposition 3.5.1 (Comparing Sizes Is Reflexive and Transitive)

For all sets A, B, C:

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

Proof.

  • (a) The identity idA is injective, since idA(x1)=idA(x2) says x1=x2.

  • (b) Let f:A→B and g:B→C be injections. Then g∘f:A→C is injective by Theorem 1.4.4 (a). This proves the proposition.

As with equinumerosity (Section 3.1, after Proposition 3.1.1), we do not call this a partial order: there is no set of all sets for it to be a relation on (Theorem 1.1.4). And antisymmetry, the clause (PO2) of Definition 2.6.1, would say “if |A|≤|B| and |B|≤|A|, then A=B”, which is false: |N|≤|2N| and |2N|≤|N|, while 2N≠N. The right replacement for “A=B” is “|A|=|B|”. That is the Schröder–Bernstein Theorem below.

Before it, one more way to read ≤. A countable set was defined by a surjection from N, and Theorem 3.2.2 turned that into an injection into N. The same exchange works for all sets, with one exception and one price.

Proposition 3.5.2 (Injections and Surjections)

Let A and B be sets with A≠∅. Then |A|≤|B| if and only if there is a surjection B→A.

Proof. (⇒) Let f:A→B be an injection. Since A≠∅, Theorem 1.5.1 (b) gives a left inverse g:B→A, so g∘f=idA. This says that f is a right inverse of g (Definition 1.5.1), so g is surjective by Proposition 1.5.2.

(⇐) Let g:B→A be a surjection. By Theorem 3.3.2, g has a right inverse h:A→B, so g∘h=idA; this step uses Axiom 3.3.1, through Theorem 3.3.2. Then g is a left inverse of h, so h is injective by Theorem 1.5.1 (a). Hence |A|≤|B|. This proves the proposition.

The hypothesis A≠∅ is needed for (⇒) only. For A=∅ and B={b}, the empty function is an injection ∅→{b}, but there is no function {b}→∅ at all (Proposition 1.4.2 (b)), let alone a surjection. The proof shows where the hypothesis enters: a left inverse g:B→A must send b somewhere in A. The choice in (⇐) is genuine in general, but not for B=N: a surjection from N has least preimages, a rule, which is how Theorem 3.2.2 went from (i) to (ii) without the axiom.

Quick check. Is |{0,1}N|≤|P(N)|? Give an injection, and say whether your answer needed Proposition 3.5.2.

Solution. Yes. Send a sequence a∈{0,1}N to the set {n∈N:a(n)=1}. If two sequences give the same set, they take the value 1 at the same places, and so the value 0 at the same places too; hence they are equal (Proposition 1.4.1), and the map is injective. No appeal to Proposition 3.5.2 is needed: the definition asks for an injection, and we wrote one down. (The map is in fact a bijection, with inverse S↦1S; this is the correspondence of Section 1.4, recalled after Corollary 3.4.3.)

3.5.2. The Schröder–Bernstein Theorem

Here is the replacement for antisymmetry. To show two sets are the same size, it is enough to fit each into the other.

Theorem 3.5.3 (Schröder–Bernstein Theorem)

Let A and B be sets. If |A|≤|B| and |B|≤|A|, then |A|=|B|.

Idea. Let f:A→B and g:B→A be the two injections. We want a bijection h:A→B, and at each a∈A there are two candidates: go forward, h(a)=f(a), or go back along g: let h(a) be the unique b with g(b)=a. Going back is possible only for a∈g(B). So a point of A not hit by g must be sent forward by f. Then the point f(a)∈B is used up, and g(f(a)) must not go back to it, or h would collide; so g(f(a)) must also be sent forward, and then g(f(g(f(a)))), and so on along the chain. Everything reached this way goes forward; everything else goes back.

Step roadmap.

① Build the set C⊆A of points that are forced forward: C0:=A∖g(B), Cn+1:=g(f(Cn)), C:=⋃n∈NCn.

② Define h(a):=f(a) on C, and let h(a) be the unique b with g(b)=a off C.

③ Show h is injective; the only case with content is one point of each kind.

④ Show h is onto: for b∈B, look at g(b) and ask whether it lies in C.

Before reading on: in step ④, why is g(b)∉C0, and what does that buy?

Proof. Let f:A→B and g:B→A be injections.

Step 1. By Theorem 2.3.1, applied with the set P(A), the starting value A∖g(B)∈P(A) and the function (n,S)↦g(f(S)) from N×P(A) to P(A), there are sets Cn⊆A, for n∈N, with C0=A∖g(B),Cn+1=g(f(Cn))  for every n∈N. Here f(Cn)⊆B and g(f(Cn))⊆A are images (Definition 1.6.1). Let C:=⋃n∈NCn⊆A (Definition 1.2.4). Two facts about C will be used.

(F1) If a∈C, then g(f(a))∈C. Indeed a∈Cn for some n∈N; then f(a)∈f(Cn), so g(f(a))∈g(f(Cn))=Cn+1⊆C.

(F2) If a∈A∖C, there is exactly one b∈B with g(b)=a. It exists because a∉C0=A∖g(B) and a∈A, so a∈g(B). It is unique because g is injective.

Step 2. Define h:A→B by h(a):={f(a)if a∈C,the unique b∈B with g(b)=aif a∉C. Each a∈A falls under exactly one case, and in each case the value exists and is unique (in the second case by (F2)), so h is a function. Note that g(h(a))=a whenever a∉C.

Step 3.

Claim. h is injective.

Proof of Claim. Let a,a′∈A with h(a)=h(a′).

Case 1: a,a′∈C. Then f(a)=f(a′), and a=a′ because f is injective.

Case 2: a,a′∉C. Then a=g(h(a))=g(h(a′))=a′.

Case 3: a∈C and a′∉C. Then h(a′)=h(a)=f(a), so a′=g(h(a′))=g(f(a)). By (F1), g(f(a))∈C, so a′∈C, a contradiction. So this case does not occur.

The case a∉C, a′∈C is Case 3 with the roles of a and a′ swapped. Hence a=a′ in every case that occurs.

Step 4.

Claim. h is surjective.

Proof of Claim. Let b∈B, and consider g(b)∈A.

Case 1: g(b)∉C. Then h(g(b)) is the unique element of B whose image under g is g(b), and b is such an element. So h(g(b))=b.

Case 2: g(b)∈C. Then g(b)∈Cn for some n∈N. Since g(b)∈g(B), we have g(b)∉A∖g(B)=C0, so n≠0. By Lemma 2.1.1 (c), k:=n−1∈N, and g(b)∈Ck+1=g(f(Ck)). By Definition 1.6.1 there is b′∈f(Ck) with g(b′)=g(b), and then a∈Ck with f(a)=b′. As g is injective, b=b′=f(a). Since a∈Ck⊆C, h(a)=f(a)=b.

In both cases b is a value of h.

By the two claims, h:A→B is a bijection, so |A|=|B|. This proves the theorem.

The answer to the prompt: g(b) is a value of g, and C0 consists exactly of the points of A that are not values of g. That is what pushes the index n of Case 2 up to at least 1, so that g(b) has a predecessor a∈Cn−1 in its chain, and b is reached by f from that predecessor.

Every value of h is given by a rule, so the proof makes no use of Axiom 3.3.1: Step 1 is a recursion with an explicit step, and Step 2 picks the unique preimage, where there is nothing to choose. The case split “a∈C or a∉C” is an instance of excluded middle, the classical step discussed in Logic and Proof, Section 8.7; nothing in the proof decides which case holds for a given a, and nothing needs to.

Each hypothesis is used. Without the injection g, the conclusion fails: N→P(N), n↦{n}, is an injection, and |N|≠|P(N)| by Theorem 3.4.2. In the proof, injectivity of f is used once, in Case 1 of Step 3, and injectivity of g twice, in (F2) and in Case 2 of Step 4.

Remark. The theorem needs both |A|≤|B| and |B|≤|A|; are any two sets comparable, that is, is it true that |A|≤|B| or |B|≤|A| for all A and B? The answer is yes, but the proof needs Zorn’s lemma, a principle equivalent to Axiom 3.3.1; a later chapter devoted to Zorn’s lemma states it, and the companion volume on set theory proves it from the axiom. This chapter does not prove comparability, and nothing in it needs it.

3.5.3. Intervals of real numbers

The theorem’s first use is the question of the opening frame.

Example (The closed and the open unit interval)

Show that |[0,1]|=|(0,1)|: first with Theorem 3.5.3, then by writing down a bijection.

Solution. With the theorem. The inclusion (0,1)→[0,1] is an injection. In the other direction let u(x):=x/2+1/4 for x∈[0,1]. If 0≤x≤1, then 1/4≤u(x)≤3/4, so u(x)∈(0,1), and u is a function [0,1]→(0,1). It is injective: x/2+1/4=y/2+1/4 gives x=y. By Theorem 3.5.3, |[0,1]|=|(0,1)|.

A bijection. The two extra points 0 and 1 are absorbed by a Hilbert’s hotel (Example (Hilbert’s Hotel)) run on the points 1,12,13,…. Define φ:[0,1]→(0,1) by φ(x):={12if x=0,1n+2if x=1n for some n∈Z>0,xotherwise. The cases do not overlap, since 1n≠0, and in the second case n=1/x is determined by x; so φ is a function, with values in (0,1) because 0<1n+2≤13. Let H:={0}∪{1n:n∈Z>0}={0,1,12,13,…} and H′:={1m:m∈Z>0, m≥2}={12,13,14,…}. Then φ maps H onto H′: 0↦12, and 1n↦1n+2 runs through 13,14,…. It is injective on H, since 1n+2=1n′+2 forces n=n′, and 1n+2≤13<12. Off H it is the identity of [0,1]∖H=(0,1)∖H′. Since [0,1]=H∪([0,1]∖H),(0,1)=H′∪((0,1)∖H′), both unions disjoint, φ is a bijection, and |[0,1]|=|(0,1)|. For instance φ(1)=13, φ(12)=14, φ(34)=34.

The first route took two lines and the second took a paragraph. That is the point of the theorem: we never had to find φ.

The second interval computation turns an unbounded set into a bounded one.

Example (The real line and its intervals)

Show that x↦x/(1+|x|) is a bijection R→(−1,1). Deduce that every open interval (c,d) with c<d is equinumerous with R, and then that every interval with more than one point is.

Solution. The bijection. Let s(x):=x/(1+|x|) for x∈R; the denominator is at least 1, so s(x) is defined, and |s(x)|=|x|/(1+|x|)<1, so s(x)∈(−1,1). For y∈(−1,1) let t(y):=y/(1−|y|); here 1−|y|>0. We check that t is a two-sided inverse. For x∈R, |s(x)|=|x|/(1+|x|), so 1−|s(x)|=11+|x|,t(s(x))=x1+|x|⋅(1+|x|)=x. For y∈(−1,1), |t(y)|=|y|/(1−|y|), so 1+|t(y)|=11−|y|,s(t(y))=y1−|y|⋅(1−|y|)=y. By Theorem 1.5.4, s is a bijection R→(−1,1). For example s(1)=12 and s(−3)=−34.

Open intervals. The map y↦(y+1)/2 is a bijection (−1,1)→(0,1), with inverse u↦2u−1. For c<d, the map u↦c+(d−c)u is a bijection (0,1)→(c,d), with inverse v↦(v−c)/(d−c), since d−c>0. Composing the three bijections (Theorem 1.4.4 (c)) gives a bijection R→(c,d), so |(c,d)|=|R|.

Every interval with more than one point. Let I be an interval (bounded or not, with or without its endpoints) containing two points c<d. An interval contains every number between two of its points, so (c,d)⊆I⊆R. The inclusion is an injection (c,d)→I. In the other direction, let β:R→(c,d) be the bijection just built; then β restricted to I is an injection I→(c,d). By Theorem 3.5.3, |I|=|(c,d)|, and |(c,d)|=|R|, so |I|=|R| by Proposition 3.1.1. This covers [0,1], [0,1), (0,∞), [5,∞) and R itself at once.

In particular every interval with more than one point is uncountable: it is equinumerous with R, which is uncountable by Theorem 3.4.4, and a set equinumerous with a countable set is countable (compose a surjection from N with the bijection, Proposition 3.2.4).

Warning. Injections both ways do not make either injection a bijection. On N, n↦2n is an injection N→N in both directions, and it is not onto: 1 is never a value. Theorem 3.5.3 builds a new map h out of f and g; it says nothing about f or g themselves. In Example (The closed and the open unit interval), u(x)=x/2+1/4 misses 910∈(0,1), and the bijection is a different map.

Quick check. Give an injection N→N×N and an injection N×N→N. What does Theorem 3.5.3 conclude?

Solution. n↦(n,1) is injective, by the characteristic property of pairs (Definition 1.3.1). (m,n)↦2m3n is injective, as shown in the proof of Theorem 3.2.6. So |N|=|N×N|, and N×N is countably infinite (Definition 3.2.2). Section 3.2 showed only that N×N is countable; the theorem gives a bijection with N directly, with no listing at all.

3.5.4. Exercises

A. Check your understanding

Exercise (A1)

These parts are about the proof of Theorem 3.5.3.

  • (a) In Step 4, Case 2, why is g(b)∉C0, and what would go wrong without it?
  • (b) Run the construction for A=B=N and f(n)=g(n)=2n. Compute C0, C1 and C, and the values h(0),h(1),h(2),h(3),h(4).
  • (c) Where is the injectivity of f used?
  • (d) Give the idea of the proof in two sentences.

Solution.

  • (a) C0=A∖g(B) consists of the points that are not values of g, and g(b) is a value of g. Without it the index n with g(b)∈Cn could be 0, and then there would be no Cn−1 to find a predecessor a in, so no a∈C with f(a)=b.

  • (b) g(N)=2N, so C0=N∖2N is the set of odd numbers. C1=g(f(C0))={4q:q odd}={4,12,20,…}. In general Cn+1={4c:c∈Cn}, so Cn={4nq:q odd} by induction on n, and C is the set of numbers 4kq with k∈N and q odd. Now:

    • 0∉C, since 4kq≠0 for odd q (4k>0 and q≥1). So h(0) is the b with 2b=0: h(0)=0, a fixed point.
    • 1∈C0, so h(1)=f(1)=2.
    • 2∉C: for k=0, 2 is not odd; for k≥1, 4kq≥4>2. So h(2) is the b with 2b=2: h(2)=1.
    • 3∈C0, so h(3)=6.
    • 4=41⋅1∈C1, so h(4)=f(4)=8.
  • (c) In Step 3, Case 1: from f(a)=f(a′) with a,a′∈C it concludes a=a′.

  • (d) Points of A that g does not reach must be sent forward by f, and so must everything reached from them by repeating g∘f; this is the set C. Every other point of A is a value of g and is sent back to its unique preimage, and the two halves fit together into a bijection.

B. Practice

Exercise (B1: Injections both ways)

Prove each of the following by giving an injection in each direction and applying Theorem 3.5.3.

  • (a) |[0,1]|=|R|.
  • (b) |N|=|N×Z|.
  • (c) |(0,1)∪(2,3)|=|(0,1)|.

Solution.

  • (a) The inclusion [0,1]→R is injective. In the other direction, x↦(x/(1+|x|)+1)/2 is a bijection R→(0,1) by Example (The real line and its intervals), so it is an injection R→[0,1], as (0,1)⊆[0,1].

  • (b) n↦(n,0) is an injection N→N×Z, by the characteristic property of pairs (Definition 1.3.1). In the other direction, let j:Z→N be j(k):=2k for k≥0 and j(k):=−2k−1 for k<0. Its values are in N, even for k≥0 and odd for k<0; since no natural number is both even and odd (Theorem 2.2.3, uniqueness), j(k)=j(k′) forces k and k′ to have the same sign, and then k=k′. So j is injective, and so is (m,k)↦(m,j(k)). Following it by the injection (m,n)↦2m3n from the proof of Theorem 3.2.6 gives an injection N×Z→N (Theorem 1.4.4 (a)).

  • (c) The inclusion (0,1)→(0,1)∪(2,3) is injective. The map x↦x/4 is injective and sends (0,1)∪(2,3) into (0,14)∪(12,34)⊆(0,1).

Hence, by Theorem 3.5.3, the three equalities hold.

Exercise (B2: A proper subset of the same size)

Give an example of sets A⊊B⊆R with |A|=|B|, such that A is uncountable and B∖A is uncountable. Check each property, and list the properties any answer must have.

Solution. An answer must have: (1) A⊆B⊆R; (2) A≠B; (3) a bijection A→B, or injections both ways; (4) A uncountable; (5) B∖A uncountable. (Then B is uncountable too, since it contains A, by Proposition 3.2.3.)

Example: A=(0,1), B=(0,3). (1) and (2): (0,1)⊆(0,3) and 2∈B∖A. (3): x↦3x is a bijection (0,1)→(0,3), with inverse y↦y/3. (4) and (5): A and B∖A=[1,3) are intervals with more than one point, hence equinumerous with R by Example (The real line and its intervals), hence uncountable, as shown after it.

Another correct answer: A=(0,1), B=R, with B∖A⊇(1,2) uncountable. Any answer can be checked against (1)–(5).

Exercise (B3: Interleaving two sequences)

Prove that |{0,1}N×{0,1}N|=|{0,1}N| by an explicit bijection.

Hint: put one sequence in the even places and the other in the odd places.

Solution. Every m∈N is 2n or 2n+1 for exactly one n∈N, and not both (Theorem 2.2.3 with divisor 2, the quotient in N, as in the proof of Proposition 3.2.5). So for a,b∈{0,1}N we may define c=Φ(a,b)∈{0,1}N by c(2n):=a(n),c(2n+1):=b(n)(n∈N). Define Ψ:{0,1}N→{0,1}N×{0,1}N by Ψ(c):=(a,b) with a(n):=c(2n) and b(n):=c(2n+1). Then Ψ(Φ(a,b))=(a,b): its coordinates n↦c(2n)=a(n) and n↦c(2n+1)=b(n) are a and b by Proposition 1.4.1, so the pairs are equal (Definition 1.3.1). And Φ(Ψ(c)) agrees with c at every even place 2n and every odd place 2n+1, which are all the places, so Φ(Ψ(c))=c (Proposition 1.4.1). By Theorem 1.5.4, Φ is a bijection.

C. Going deeper

Exercise (C1: The real line and the subsets of N)

Prove that |R|=|P(N)|, using the decimal facts (D1)–(D3) of Section 3.4.

  • (a) For x∈[0,1) let d1d2… be its decimal expansion that does not end in all 9s, and let E(x):={10k+dk:k∈Z>0}. Show that E is a well-defined injection [0,1)→P(N).
  • (b) For S⊆N let yS be the number with decimal expansion 0.e1e2e3…, where ek+1:=1 if k∈S and ek+1:=2 if k∉S, for k∈N. Show that S↦yS is a well-defined injection P(N)→[0,1).
  • (c) Conclude.

Solution (Hint 1). The tools are the decimal facts (D1)–(D3), and Theorem 2.2.3 with divisor 10 for reading digits back out of E(x).

Solution (Hint 2). Begin (a) with: “By (D1), x has an expansion that does not end in all 9s, and by (D3) it has only one.”

Solution.

  • (a) Well defined. By (D1), x has an expansion not ending in all 9s. It has only one: if two different expansions of x both failed to end in all 9s, (D3) would make one of them end in all 9s. So d1d2… is determined by x, and E(x)⊆N because 10k+dk∈N.

    Injective. By Theorem 2.2.3 with divisor 10, the number 10j+dj, with 0≤dj≤9, has quotient j and remainder dj, and these are unique. So for each k≥1, the only element of E(x) with quotient k is 10k+dk, and E(x) determines every digit dk. If E(x)=E(x′), then x and x′ have the same expansion d1d2…, and by the uniqueness half of (D2) a digit sequence is an expansion of exactly one number; so x=x′.

  • (b) Well defined. By (D2), the digit sequence e1e2… is an expansion of exactly one yS∈[0,1]. With t1=e1/10 as in Definition 3.4.1, yS≤t1+110≤210+110=310, so yS∈[0,1).

    Injective. Let S≠S′, say k∈S∖S′ or k∈S′∖S. Then the two digit sequences differ at place k+1. Neither contains a 0 or a 9, so neither ends in all 9s or in all 0s. If yS=yS′, the number would have two different expansions, and by (D3) one would end in all 9s, which is false. So yS≠yS′. The index shift ek+1 is there so that whether 0∈S is recorded too, in the first digit.

  • (c) By (a), (b) and Theorem 3.5.3, |[0,1)|=|P(N)|. By Example (The real line and its intervals), [0,1), an interval with more than one point, has |[0,1)|=|R|. By Proposition 3.1.1, |R|=|P(N)|.

Marking scheme. (10 points) - 2: shows the expansion in (a) is unique, citing (D1) and (D3), so E is a function. - 2: shows E is injective: the set determines each digit, and one digit sequence names one number (D2). - 2: shows yS exists, is unique and lies in [0,1). - 2: shows S↦yS is injective, using that the digits avoid 0 and 9 and (D3). - 2: applies Theorem 3.5.3 and passes from [0,1) to R with a cited bijection or injections both ways. Fatal errors (0 for the step): treating “the expansion of x” as unique without (D1) and (D3); concluding yS≠yS′ from different digit sequences without ruling out the 0.4999…=0.5 case.

Exercise (C2: Find the error)

Here is a proof that |[0,1]|=|(0,1)|.

Proof. (1) Let u:[0,1]→(0,1), u(x):=x/2+1/4. For 0≤x≤1 we have 1/4≤u(x)≤3/4, so u does map into (0,1). (2) If u(x)=u(y), then x/2=y/2, so x=y; hence u is injective. (3) The inclusion ι:(0,1)→[0,1] is injective. (4) So there are injections in both directions between [0,1] and (0,1). (5) Therefore u is a bijection, and |[0,1]|=|(0,1)|.

Is the conclusion true? Does the argument prove it? If not, name the line that fails, say why, and give a counterexample to the step it takes.

Solution. The conclusion is true: Example (The closed and the open unit interval) proves it twice.

The argument does not prove it. Lines (1)–(4) are correct. Line (5) fails: it infers that a particular injection is a bijection from the existence of injections both ways. The step cites a general “fact”, that injections both ways make a given injection a bijection. That fact is neither proved nor a school fact, and it is false, so the line cites nothing: entry (N9) of Logic and Proof, Example (What is not allowed). And u is in fact not onto: 910∈(0,1) is not a value, since every value lies in [14,34].

Counterexample to the step. Take A=B=N and f=g=(n↦2n). These are injections both ways, and the step would conclude that n↦2n is a bijection N→N; but 1 is not a value.

Repair. Replace line (5) by: “By Theorem 3.5.3, |[0,1]|=|(0,1)|.” The theorem produces a bijection, but a different one, built from both u and ι.