Is every subset of $\mathbb{Z^+}$ countable?

This question already has an answer here:

  • An infinite subset of a countable set is countable

    2 answers

Solutions Collecting From Web of "Is every subset of $\mathbb{Z^+}$ countable?"

Definition: $A$ is countable if and only if there exists a function $f\colon A\to\mathbb Z^+$ which is injective.

Now take the identity map, which is obviously injective since $id(x)=x$.


Definition: $A$ is countable if and only if there exists a function $g\colon\mathbb Z^+\to A$ which is surjective or $A=\varnothing$.

Now let $A\subseteq\mathbb Z^+$, if $A$ is empty then we are done. Otherwise pick $a\in A$ and define $g$ as follows:

$$g(n)=\begin{cases} n &n\in A\\ a &n\notin A\end{cases}$$

It is clear that this is a surjective function, as wanted.


Definition: $A$ is countable if and only if it is finite or there is $h\colon\mathbb Z^+\to A$ which is a bijection.

Suppose $A$ is a subset of $\mathbb Z^+$. If it is finite then we are done. Otherwise define by induction:

  • $h(0)=\min\{a\in A\}$.
  • Suppose $h(n)$ was defined, $h(n+1)=\min\{a\in A\mid h(n)<a\}$.

Now we claim that $h$ is a bijection. By induction we can easily show that $h(n)<h(n+1)$ and therefore $h$ is injective,

It is surjective since every $a\in A$ has only finitely many numbers smaller than itself therefore after at most $k$ steps (for some $k$) we have that $a<h(k)$ and therefore for some $n<k$ we had to have $a=\min\{x\in A\mid x<h(n)\}$ therefore $a=h(n)$.


Theorem: All three definitions above are equivalent.

Proof: If $A$ is finite then this is clear.

Suppose $A$ is infinite, if there exists a bijection of $A$ with $\mathbb Z^+$ then it is injective and its inverse is surjective, so the third definition implies the other two.

If there exists a surjective function $g\colon\mathbb Z^+\to A$ define $f(a)=\min\{n\in\mathbb Z^+\mid g(n)=a\}$, since $g$ is a surjecitve function this is well-defined, and it is injective since $g$ is a function.

Lastly if there exists an injection $f$ from $A$ into $\mathbb Z^+$ we can define $h\colon\mathbb Z^+\to\{f(a)\mid a\in A\}$ as in the third definition. Since $A$ is infinite the set to which we want $h$ to be defined into is infinite. Now $(f^{-1}\circ h)\colon\mathbb Z^+\to A$ is a bijection.

You asked if for all sets $A \subset \mathbb{Z}^{+}$, is $A$ countable. Consider the set

$$A = \{1,2,3\} \subset \mathbb{Z}^{+}.$$

This set is a finite subset of $\mathbb{Z}^{+}$ that is not countable. Or in your question did you mean to ask if for all subsets of $\mathbb{Z}^{+}$ is it the case that they are at most countable?

Note: I am taking the definition of countable from Rudin’s Principles of Mathematical Analysis that a set $A$ is said to be countable if there is a bijective function $f$ from $A$ to $\mathbb{Z}^{+}$.