Show that the set of all nonnegative integers is countable by exhibiting a one-to-one correspondence between Z+ and Znonneg.
Proof:
In order to show that Znonneg is countable we must construct a well-defined function f: Z+ ā Znonneg that is both one-to-one and onto. We will show that the following is a function from Z+ to Znonneg that satisfies these requirements. (Choose one definition for f and use it for the rest of the proof.)
f(n) = n - 1 for each positive integer n
Proof that f is a well-defined function from Z+ to Znonneg:
Given any element n in Z+, by definition of Z+, n ā„ 1. Thus, when the value of f(n) is computed, the result is that f(n) ā„ 0, and so f(n) is in Znonneg. Since nothing was assumed about n except for its being an element of Z+, this shows that f sends every element of Z+ to an element of Znonneg. Therefore, f is a well-defined function from Z+ to Znonneg.
Proof that f is one-to-one:
To show that f is one-to-one, let n1 and n2 be any integers in Z+ and assume that f(n1) = f(n2).
By definition of f, we have the following.
f(n1) = n1 - 1
f(n2) = n2 - 1
Substituting the expressions for f(n1) and f(n2) into the equation f(n1) = f(n2) and simplifying the result shows that n1 = n2. Thus, f is one-to-one.
Proof that f is onto:
To show that f is onto, let m be any nonnegative integer in Znonneg.
On a separate piece of scratch paper, find an element of Z+ written as an expression using the variable m, with the property that when f is applied to it, the result is m. Write the expression in the box below.
m + 1
By construction, the quantity in the box is a positive integer and when the function f is applied to it, the result is m.
Thus we have shown that there exists an element of Z+ that is sent to m by f, and so f is onto.
Conclusion: Since f is a well-defined function from Z+ to Znonneg that is one-to-one and onto, we conclude that Z+ and Znonneg have the same cardinality. It follows that Znonneg is countably finite, and hence countable.