Prove that there does not exist a continuous function over reals for which it takes on every value exactly twice. Can we replace two by four? an even number?
Note: By critical point here I mean one that goes from increasing or decreasing or decreasing to increasing (not like $x^3$).
Attempt
Firstly I am confused by what "every value" means. Does that mean every real number or every value in the range of the function? If it is the latter, we can prove the first statement first. Assume there does exist such a function that takes on every value exactly twice. Then for every $f(x)$ there exists $x_1$ and $x_2$ such that $x_1 \neq x_2$ and $f(x_1) = f(x_2)$. Thus given any $f(x_1)$ there exists exactly one other number $x_2 \neq x_1$ such that $f(x_1) = f(x_2)$.
To show this is impossible, first note that the function must have at least one critical point. But if it does have critical point that critical point will only get counted once so we must have another critical point somewhere. Therefore we will have counted every point $3$ times. Thus it is impossible for a continuous function over reals for which it takes on every value exactly twice.
Proving the general case as the question suggests shouldn't be much more difficult. I am wondering if my reasoning is sound or do I need to make it more rigorous. It makes sense to me when I graph it but I am wondering if I need to tweak my solution.