Let $f:[0,1] \to \mathbb R$ is a continuous function which can accept only rational values. If we know that $f(0)=2$, $f(1)=?$
I think it should be $2$ because of the continuity but I don't know how to prove it formally.
Let $f:[0,1] \to \mathbb R$ is a continuous function which can accept only rational values. If we know that $f(0)=2$, $f(1)=?$
I think it should be $2$ because of the continuity but I don't know how to prove it formally.
If $f(1):=\alpha\ne 2$, then there is some irrational number $\eta$ in between $\alpha$ and $2$, and by Intermediate Value Theorem, $f(\gamma)=\eta$ for some $\gamma\in(0,1)$, this is a contradiction.