[Math] Prove the cardinality of $\mathbb{Z}$ and $\mathbb{N}$ is the same.

elementary-set-theory

Prove the cardinality of $\mathbb{Z}$ and $\mathbb{N}$ is the same.

For the cardinality to be the same, there must exists a bijective function $f:\mathbb{N}\mapsto\mathbb{Z}$. If there exists a bijective function, then there exists an inverse $g:\mathbb{Z}\mapsto\mathbb{N}$ of it.

Suppose there exists such function. Then if $n\in\mathbb{N}$ and $z\in\mathbb{Z}$,

\begin{align}
(g\circ f)(n)&=n\\
g(f(n))&=n\\
g(z)&=n\\
f(g(z))&=f(n)\\
z&=f(n)\\
f(n)&=f(n)\\
f(n)-f(n)&=0\\
0&=0
\end{align}

Clearly this is true, so there exists such bijective function. Which means $\mathbb{Z}$ and $\mathbb{N}$ have the same cardinality.


But I feel this is incorrect, because if instead of $\mathbb{Z}$ and $\mathbb{N}$ I have to prove the equality of the cardinalities of $\mathbb{Z}$ and $\mathbb{R}$, the conclusion would be the same, but clearly this is not true.

Best Answer

This appears to be your argument, boiled down to the essentials:

"If a bijection exists, then it follows that 0=0. Clearly 0=0 is true. Therefore a bijection must exist."

The problem is that this is NOT a valid argument. This is an instance of a logical fallacy known as 'Affirming the Consequent'.

Related Question