Originally Posted by
Plato Let’s assume $\displaystyle \left( {\forall x \in \left[ {0,1} \right]} \right)\left[ {f(x) \in \mathbb{Q}} \right]$ and suppose that $\displaystyle \left( {\exists \left\{ {a,b} \right\} \subseteq \left[ {0,1} \right]} \right)\left[ {f(a) \ne f(b)} \right]$.
Because the irrationals are dense there is an irrational number $\displaystyle \gamma$ between $\displaystyle f(a)\;\&\; f(b)$ but by the intermediate value theorem we know that $\displaystyle {\exists c}$ between $\displaystyle a\;\&\; b$ such that $\displaystyle f(c)=\gamma$.
Do you see a contradiction?
How does that imply the $\displaystyle f$ is constant?