I want to do a proof by contradiction. You guys let me know if I goofing up.
- Anybody can ask a question
- Anybody can answer
- The best answers are voted up and rise to the top
Suppose $f$ is non-constant. Since $f$ is continuous, it satisfies the Intermediate value theorem [in the most general sense, $f$ satisfies the theorem as long as $f$ is a mapping from any connected space $M$ to $\mathbb R$].
Pick any two irrational numbers $a<b$ in the image of $f$. Since $f$ satisfies the Intermediate value theorem, then $f$ attains all the intermediate values from $[a,b]$. We know that between any two irrationals, lies a rational--a contradiction. $f$ has a value that is not irrational.
This means the assumption of $f$ being non-constant is false. QED