6

Prove or disprove that there does not exist a monotone function $f:\mathbb{R}\rightarrow\mathbb{Q}$ which is onto.

Clearly $f$ can not be continuous. Suppose $f$ is discontinuous. Then it can have only countably many points of discontinuity. From this how to proceed?

vqw7Ad
  • 2,055
  • 2
    You need more than that. Such functions exist whose range is $\Bbb Z$. You need to use the density of $\Bbb Q$. – Robert Shore Aug 18 '19 at 07:06
  • Why can't $f$ be continuous or what's so 'clearly' about it? – AlvinL Aug 18 '19 at 09:25
  • One way to see the "clearly $f$ can not be continuous" is by the intermediate value theorem: a continuous function would have to map $\mathbb R$ to a connected set, which $\mathbb Q$ is not. – D.R. Aug 13 '23 at 21:44

2 Answers2

12

Assume without loss of generality that $f$ is non-decreasing. First of all,

Claim: As an $\mathbb R\to\mathbb R$ function, $f$ cannot be continuous everywhere.

Proof: Suppose $f$ is continuous on $\mathbb R$. Then we find a sequence $\{a_n\}$ in $\mathbb Q$ such that $a_n\nearrow\sqrt{2}$. By the surjectiveness (when considered as a $\mathbb R\to\mathbb Q$ function) we can find $\{x_n\}$ in $\mathbb R$ such that $$f(x_n)=a_n$$ and by the monotonicity of $f$ we assume $\{x_n\}$ is an increasing sequence. Clearly $\{x_n\}$ is bounded, otherwise $f$ is bounded by $\sqrt 2$, which contradicts $f$ being onto $\mathbb Q$. Hence $\{x_n\}$ tends to its upper bound (denoted by $\alpha<\infty)$ as $n\to\infty$. Now by the continuity of $f$, $$f(\alpha)=\lim_{n\to\infty}f(x_n)=\lim_{n\to\infty}a_n=\sqrt{2}$$ which contradicts the range of $f$ being $\mathbb Q$.

By this claim, $f$ is non-decreasing and discontinuous at at least one point, say $\beta$, then $$\lim_{x\to\beta^-}f(x)<\lim_{x\to\beta^+}f(x)$$ (The limits may not lie in $\mathbb Q$) Now again by the non-decreasing property, $f$ cannot assume any value inside the interval $$(\lim_{x\to\beta^-}f(x),\lim_{x\to\beta^+}f(x))$$ which surely contains a rational number. This contradicts $f$ being onto $\mathbb Q$.

trisct
  • 5,221
  • 1
    ok. For continuity part, can we say that $f$ can not be continuous because any continuous function defined from $\mathbb{R}$ to $\mathbb{Q}$ must be constant and as such $f$ can not be onto. We can use Intermediate value property to show this. Here it is: https://math.stackexchange.com/questions/112043/continuous-functions-from-mathbbr-to-mathbbq – vqw7Ad Aug 18 '19 at 07:26
  • Oh, yeah, that too. There's definitely more than one way to show this. – trisct Aug 18 '19 at 15:05
  • Remark for others: this proof shows that there is no monotone function from $\mathbb R$ onto any dense proper subset $S\subsetneq \mathbb R$ (for example, $S:=$ the irrationals); and by considering inverses, there is no monotone bijection from any dense proper subset $S\subsetneq \mathbb R$ to $\mathbb R$. Contrast this with the Cantor isomorphism theorem https://en.wikipedia.org/wiki/Cantor%27s_isomorphism_theorem that says that any countable dense subset of $\mathbb R$ is order-isomorphic (i.e. there is a monotone bijection between) to $\mathbb Q$. – D.R. Aug 13 '23 at 21:44
3

There's nothing wrong with the proof above. I offer a slightly different approach.

If such a function $f$ exists, then (substituting $-f$ for $f$ if necessary) there is an increasing function that works.

Choose $y \in \Bbb R \setminus \Bbb Q$. Then $\exists r \in \Bbb Q$ with $y \lt r$. Since $f$ is surjective, $\exists t \in \Bbb R$ such that $f(t) = r$. Because $f$ is increasing, that means that $t$ is an upper bound for $A= \{ x \in \Bbb R ~\vert~ f(x) \lt y \}$ (which we know is non-empty because $f$ is surjective and $\exists s \lt y$ with $s$ rational), so $x = \sup A$ exists.

Since (by assumption) $y \notin \Bbb Q = \operatorname{range}(f)$, we have $f(x) \neq y$. If $f(x) \lt y$, then because $\Bbb Q$ is dense in $\Bbb R, \exists s \in \Bbb Q$ with $f(x) \lt s \lt y$. But then $f$ surjective $\Rightarrow \exists x_1$ such that $f(x_1) = s$. Since $f$ is increasing, $x \lt x_1$, but $x_1 \in A$ and $x = \sup A \Rightarrow x_1 \leq x$ so that's not possible.

Conversely, if $y \lt f(x)$, then $\exists s \in \Bbb Q$ with $y \lt s=f(x_2) \lt f(x)$. But then $x_2 \lt x$ is an upper bound for $A$, contradicting our definition of $x$.

So there is no value $f(x)$ can take, establishing a contradiction. Thus, no such function $f$ can exist.

Robert Shore
  • 23,332
  • 1
    Good. Doesn't this show that, if $X$ and $Y$ are linearly ordered sets, and if there is a monotone surjection $f:X\to Y$, and if $X$ is Dedekind complete, then $Y$ must also be Dedekind complete? – bof Aug 19 '19 at 09:54
  • I think it does, yes. – Robert Shore Aug 19 '19 at 15:23