Let $$f(x)= \left\{ \begin{array}{lcc} 1-x & if & x \in [0,1]- \{\frac{1}{10}, \frac{1}{2}\} \\ \\ \frac{1}{2} & if & x=\frac{1}{10} \\ \\ \frac{1}{10} & if & x= \frac{1}{2} \end{array} \right.$$
Let $C_5$ the fifth middle Cantor set and $C^{\circ}=\{x \in C_{5}: x \text{ is not an end point of a contiguous interval of } C_{5}\}.$ Prove $f(C_5)=C_5$ and $f(C^{\circ})=C^{\circ}$.
Just what I have is that $|x-\frac{1}{2}|= |f(x)-\frac{1}{2}|$, for all $x \in [0,1]- \{\frac{1}{10}, \frac{1}{2}\}$. But I don't know if its enough to prove it. Could you help me?