1
$\begingroup$

Hello there everyone,

I was told that the standard proof for showing that

$$| \mathbb{N} | = | \mathbb{Z} |$$

is to define $$f: \mathbb{Z} \to \mathbb{N}$$ as $$f(x)= \begin{cases} 2x &\text{ if $x \ge 0$} \\ -2x-1 &\text{ if $x \lt 0$} \end{cases}$$

Now, I am a bit confused. I am used to working with non piece wise functions, were we must show that $f(x_1)=f(x_2)$ implies $x_1=x_2$ and that for every $n \in \mathbb{N}$ there must exist a $z \in \mathbb{z}$ such that $f(z)=n$

But I am not sure how to do this for this type of function.

Can anyone please help shed some light on this for me?

Thank you all

$\endgroup$
1
  • $\begingroup$ Do it by cases. Case 1: $x_1\ge0,x_2\ge0.$ Case 2: $x_1\ge0,x_2\lt0.$ Case 3: $x_1\lt0,x_2\ge0.$ Case 4: $x_1\lt0,x_2\lt0.$ $\endgroup$
    – bof
    Aug 9, 2015 at 0:52

3 Answers 3

1
$\begingroup$

For a positive integer, $x$, $2x$ is even and positive. For a negative integer, $x$, $-2x-1$ is positive and odd.

So the function maps zero to zero, the positive integers to even positive integers, and negative integers to positive odd integers.

$\endgroup$
1
$\begingroup$

I always liked the visual presentation:

${\color{red}0},{\color{blue}{-1}},{\color{red}1},{\color{blue}{-2}},{\color{red}2},{\color{blue}{-3}},{\color{red}3},...,{\color{blue}{-n}},{\color{red}n},... \longrightarrow {\color{red}0},{\color{blue}{1}},{\color{red}2},{\color{blue}{3}},{\color{red}4},{\color{blue}{5}},{\color{red}6},...,{\color{blue}{2n-1}},{\color{red}{2n}},...$

$\endgroup$
0
$\begingroup$
  1. Assume $f(x_1) = f(x_2)$ and wlog assume it to be an even number, then clearly $x_1 = x_2$ because we know the function $x \mapsto 2x$ to be a bijection.

  2. For the reverse direction, consider the function $g(n) = n/2$ if $n$ is even and $-(n+1)/2$ if $n$ is odd.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .