Existence of an injection between $\mathbb{Z}$ and $[0,1]$ Is the statement that there is an injection between $\mathbb{Z}$ and $[0,1]$ true or false
$\mathbb{Z}\xrightarrow{(1-1)} [0,1]$
i've build it on the definition of cardinality that is if $\lvert A \lvert \leq \lvert B \lvert$
then there exists an injection $f:A\longrightarrow B$ and one knows that
$\lvert \mathbb{Z} \lvert \leq \lvert [0,1]\lvert$
thus there exists an injection
 A: Consider the function $f : \Bbb Z \longrightarrow [0,1]$ defined by $$
f(n) = \left\{
        \begin{array}{ll}
            \dfrac {1} {1-2n} & \quad n \leq 0 \\
            \dfrac {1} {2n} & \quad n > 0
        \end{array}
    \right.
$$
A: I see many answers with piecewise functions for positive and negative parts, but you can simply send $\mathbb Z^{-}\hookrightarrow[0,\frac 12]$ and $\mathbb Z^+\hookrightarrow[\frac 12,1]$ with $$\begin{cases}f(n)=\frac 12+\frac 1{2n}\\f(0)=\frac 12\end{cases}$$
The only residual issue is zero, which you still need to set separately though.
Another idea which is common when building injections to send integers to powers of primes, because it ensures injectivity.
The idea is $\mathbb Z\hookrightarrow\mathbb N^2\hookrightarrow [0,1]$
$$\begin{cases}
f(n)=\frac 1{2^n} & n\ge 0\\
f(n)=\frac 1{3^{|n|}}& n\le 0\end{cases}$$
Yet it is also possible to proceed like this $\mathbb Z\hookrightarrow\mathbb R\hookrightarrow[-1,1]\hookrightarrow[0,1]$ and use known bijections from $\mathbb R\mapsto(-1,1)$ like:
$$\dfrac{x}{|x|+1} \text{ or }\tanh(x)\text{ followed by } x\mapsto \frac{x+1}2$$.
A: It is true, take for example a function $f:\mathbb{Z} \to [0,1]$ $$f(n)=\cases{{1\over 2|n|+1};\;\;\; n\leq0\\{1\over 2n};\;\;\; n>0}$$
A: Define $f : \mathbb{Z} \rightarrow [0,1]$ by
$$f(n) = \frac{1}{2(n+1)} \quad \quad \text{if} \quad n \geq 0$$
$$f(n) = \frac{1}{1-2n} \quad \quad \text{if} \quad n < 0$$
