Let $f \colon \mathbb{R} \to \mathbb{R} $ be a continuous function so that $ f(x) \in \mathbb I = \mathbb R\setminus \mathbb Q,\ \forall x \in \mathbb{R}$. Prove that $f$ is constant.

I tried assuming it's not a constant but I can't get to a contradiction with continuity.

closed as off-topic by user21820, Xander Henderson, Did, TheSimpliFire, Chinnapparaj R Nov 20 at 2:58

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question is missing context or other details: Please improve the question by providing additional context, which ideally includes your thoughts on the problem and any attempts you have made to solve it. This information helps others identify where you have difficulties and helps them write answers appropriate to your experience level." – user21820, Xander Henderson, Did, TheSimpliFire, Chinnapparaj R
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 2
    What's $\mathbb{I}$? – Dante Grevino Nov 19 at 12:26
  • @DanteGrevino it's set of irrational numbers – user560461 Nov 19 at 12:27
  • 5
    Hint: assume it is not and then use the Intermediate Value Theorem to show that $f$ must take on a rational value. – John Douma Nov 19 at 12:29
  • 1
    Basically, rationals are everywhere. You cannot move an inch, a millimeter or an angstrom without stepping on a rational, or, for that matter, an infinity of rationals. – Eric Duminil Nov 19 at 15:50

Assuming we know 1. The Intermediate Value Theorem and 2. that between any two irrationals there is a rational, then the proof by contradiction should work fine.

If $f(a)<f(b)$ then there has to be a rational number $r$ with $f(a)<r<f(b).$ By IVT, there is a $c$ such that $f(c)=r$, contradiction.

The image $f(\mathbb{R})$ is path-connected and the only non-empty path-connected subspaces of $\mathbb{I}$ are the points. So $f$ is constant.

The continuous image of a connected set is connected.

The only connected sets in $\mathbb R\setminus \mathbb Q$ are single points.


Suppose that $f$ is not constant. Then there are $i_1, i_2 \in \mathbb I$ such that $i_1 \ne i_2$ and $i_1,i_2 \in f(\mathbb R)$. WLOG we can assume that $i_1 <i_2$. Now pick some rational number in $(i_1, i_2)$. The intermediate value theorem gives $r \in f(\mathbb R)$, a contradiction.

Not the answer you're looking for? Browse other questions tagged or ask your own question.