Let $E$ be a compact metric space and let $f:E\rightarrow E$ be such that $d(f(x),f(y))<d(x,y)$ when $x\neq y$. Prove or give a counter example to the following statement:
There exists $0\leq \alpha <1$ such that $d(f(x),f(y))<\alpha d(x,y)$ for all $x,y\in E$
I think this is false and gave the following counter example:
$f:[0,1] \rightarrow [0,1]$ such that $x\mapsto\begin{cases} x & ,0<x<1\\ \frac{1}{2} & ,x=1\lor x=0 \end{cases}$
My intuition is that in this mapping the distance can be arbitrarily close to 1 but never 1 and hence there's no such $\alpha$. Is my reasoning correct?
Your counter-example is not correct: $f$ should be a continuous function with respect to the distance $d$ (see Giuseppe Negro's comment).
Take $E=[0,1]$ with the euclidean distance $d(x,y)=|x-y|$ and $f(x)=\arctan(x)$. Then $f:E\to E$ and if $x,y\in [0,1]$ with $x\not=y$, by the Mean Value Theorem, there is $t\in (0,1)$ such that $$|f(x)-f(y)|=|f'(t)||x-y|=\frac{1}{1+t^2}|x-y|<|x-y|.$$ Is there $\alpha \in [0,1)$ such that $|f(x)-f(y)|<\alpha |x-y|$ for all $x,y\in [0,1]$?