Let $f : [a,b] \to \mathbb{R}$ a function so that:
1) $f([a,b]) \subset [a,b]$;
2) $\forall x,y \in [a,b] : x \neq y \Rightarrow |f(x)-f(y)| < |x-y|$
I’d like to prove that $f$ is continuous. I can’t really get started however can anyone enlighten me please? Thanks