I want to prove the following nice statement I've found:
A function $f: [0,1] \rightarrow \mathbb{R}$ takes every function value twice - proof it is not continuous
I've already found an answer to my question but one thing is still not clear to my mind. The answer I found was here on math.StackExchange posted by Arthur:
Whole post:
"Assume that you have a function $f$ that does take every real value exactly twice. Let $f(a) = f(b) = 0$ with $a < b$. Let $c \in (a,b)$ be given, and assume without loss of generality $f(c) > 0$. Then for every $0 < \epsilon < f(c)$ there exist $d \in (a,c)$ and $e \in (c,b)$ such that $f(d) = f(e) = \epsilon$. So on the intervals $[0,a)$ and $(b,1]$ our function cannot go any higher than zero. That means that $f$ should take every positive real value on the interval $[a,b]$. However the restriction of $f$ to $[a,b]$ is continuous from a closed interval to $\mathbb{R}$ and thus bounded. Contradiction."
Now everything is clear here except for:
"However the restriction of $f$ to $[a,b]$ is continuous from a closed interval to $\mathbb{R}$ and thus bounded. Contradiction."
Well I think know what Arthur is telling there: Because of the boundary there is always at least one function value that can't be taken twice by the function, e.g. just like the peak of $-x^2$.
But that is exactly where I was stuck before I started researching that issue. Is it really possible to just say it the way Arthur did? I thought that I'd have to further somehow prove the statement that boundary leads to that contradiction.
I hope that it is clear what I was trying to express here...
Anyways as always - thank you for your help!
FunkyPeanut