A function $f: [0,1) \rightarrow [0,1)$ that satisfies $\forall x \in [0,1)~ f(x) \neq x$? I was wondering whether there was a (pretty) function $f$ in $[0,1)^{[0,1)}$ that satisfies $\forall x \in [0,1)~ f(x) \neq x$. Actually, I think I did find such function, namely
$
\forall x \in [0,1) ~ f(x)= \left\{
\begin{array}{ll} 
\frac{x}{2} & x \geq 0.5 \\
2x & 0<x<0.5 \\
0.5 & x=0 \\
\end{array}
\right. 
$
However, I was looking for a 'prettier' function, preferably not a 'branch' one and also injective (if possible). 
Any help with finding such function would be appreciated! Thanks in advance.
 A: The first thing to note is that your function can't be both continuous and surjective (I know you didn't specifically ask for it, but you might have implied it by asking for a "nice" function). The reason why not is because of the intermediate value theorem (and its corrolary, Bolzano's theorem).
Notice that in order to satisfy $f(x) \neq x$, it means that $f(0) > 0$ because the domain only contains non-negative values. But if the function is surjective then there must be $a \in (0, 1)$ such that $f(a) = 0$. And if $f(x)$ is continuous, then $g(x) = f(x) - x$ will also be continuous, but that means that $g(0) > 0$ and $g(a) = -a < 0$ so there must be a value $b \in (0, a)$ such that $g(b) = 0$, implying that $f(b) = b$.
Continuous and injective is a bit easier - since 1 is in neither the domain nor the codomain, you can just pick a value for $f(0)$ and then any monotonically increasing function going from $(0, f(0))$ to $(1, 1)$ will work - for example, $f(x) = \frac{x + 1}{2}$.
You can even go as far as something that's injective, surjective, and piecewise continuous, but the easiest way to do that is still to define the function piecewise. For example:
$f(x) = \begin{cases} x + \frac{1}{2} & x \in [0, \frac{1}{2}) \\
x - \frac{1}{2} & x \in [\frac{1}{2}, 1)\end{cases}$
There are sneaky ways to write a piecewise function so that it doesn't look piecewise, e.g. by using the floor function or taking absolute values of things, but that's basically just sophistry.
