3
$\begingroup$

I was thinking about this. My intuition is that there is a counterexample. Suppose $f:[0,1]\longrightarrow \mathbb{R}$ is continuous. Also suppose

  1. If $q\in\mathbb{Q}$, then $f(q)\in\mathbb{Q}$.
  2. $f(0)<0$
  3. $f(1)>1$

By the Intermediate Value Theorem, for any rational number $r$ with $0 there is an $x$ with $0 such that $f(x)=r$. Is this true of the restriction $f:\mathbb{Q}\longrightarrow\mathbb{Q}$.

  • 1
    @Sigur Thanks for the edit.2012-12-08

1 Answers 1

8

$ f(q) = 3 q^2 - 1 {}{}{}{}{}{}{} $