Give a continuous surjective function from the irrationals in $[0,1]$ onto the rationals in $[0,1]$. Can we at least prove the existence of such a function? I couldn't see a function off the top of my head. Here we assume $[0,1]\setminus\mathbb Q$ with its usual metric.
-
Look at this – leo Sep 26 '13 at 17:41
-
@leo That's a different question entirely. – Alex Kruckman Sep 26 '13 at 17:43
-
@AlexKruckman I'm not sure. This one is tagged as real- analysis not topology. I mean your answer is OK as far as we consider relative topolgies in your $I$ and $\Bbb Q\cap [0,1]$. As these details are not stated in the question, I assumed the standard topology for $\Bbb R$. – leo Sep 26 '13 at 17:52
-
I think the question should include mention to topology, because in the standard topology of $\Bbb R$ this not true. – leo Sep 26 '13 at 17:54
-
We're looking for a function with domain $[0,1]\setminus\mathbb{Q}$, not $\mathbb{R}$! Of course the topology matters, but the obvious choice of topology on the domain is the subspace topology inherited from the usual topology on $\mathbb{R}$. – Alex Kruckman Sep 27 '13 at 03:00
-
Oh, I didn't notice that since I answered the question and you commented, the OP has updated the question to clarify the topology. The usual metric topology on $[0,1]\setminus \mathbb{Q}$ is the same as the usual subspace topology. – Alex Kruckman Sep 27 '13 at 03:03
2 Answers
Let $I = [0,1]\setminus \mathbb{Q}$, the set of irrationals in the unit interval.
Partition $I$ into countably many nonempty pieces, each given by the intersection of an open set in $[0,1]$ and $I$, such that $I = \cup_{k=0}^\infty I_k$. For example,
$I_0 = \left(\frac{1}{2},1\right) \cap I$,
$I_1 = \left(\frac{1}{4},\frac{1}{2}\right)\cap I$,
and in general $I_k = \left(\frac{1}{2^{k+1}},\frac{1}{2^k}\right)\cap I$. Note that each $I_k$ is open in $I$.
Enumerate $\mathbb{Q} \cap [0,1]$ (in any way you like): $\{q_0, q_1, q_2,\dots\}$.
For any $x\in I$, $x\in I_k$ for exactly one $k$. Define $f(x) = q_k$.
Note that $f$ is surjective, since each $I_k$ is nonempty.
We want to show that $f$ is continuous. Let $O\subseteq \mathbb{Q}\cap [0,1]$ be an open set. We can write $O = \bigcup_{q_k\in O} \{q_k\}$.
$$f^{-1}[O] = \bigcup_{q_k\in O}\,f^{-1}[\{q_k\}] = \bigcup_{q_k\in O} I_k.$$
This is a union of open sets in $I$, so it is open.
Note that we didn't actually use that $O$ was an open set: our function $f$ is continuous even if we give $\mathbb{Q}$ the discrete topology!
- 14,877
- 86,811
-
As written, you have a problem. All numbers of the form $2^{-k}$ for $k\geq1$ isn't in $I_i$ for any $i$, so $I \neq \cup_i I_i$. – kahen Sep 26 '13 at 17:47
-
1
-
D'oh. I'm so used to $I$ meaning an interval of real numbers that I fooled myself into thinking it actually was one. – kahen Sep 26 '13 at 17:52
-
-
1@AlexKruckman - just one question, why is $I_k$ open for all $k$? – stoic-santiago Mar 05 '21 at 03:52
-
1@strawberry-sunshine $I_k$ is the intersection of an open interval with $I$, so it is open in the subspace topology on $I$. – Alex Kruckman Mar 05 '21 at 04:02
-
-
1@strawberry-sunshine Of course not: Every open set in $\mathbb{R}$ contains a rational number, and $I_k$ does not contain any rational numbers, since it is a subset of $I$. But whether $I_k$ is open in $\mathbb{R}$ is irrelevant, since the domain of the function is $I$, not $\mathbb{R}$. – Alex Kruckman Mar 05 '21 at 04:28
-
The function $x\mapsto\left\lfloor\frac1x\right\rfloor$ maps the irrationals in $[0,1]$ continuously onto the countable discrete space $\mathbb N=\{1,2,3,\dots\}$, which can be mapped continuously onto any countable (nonempty) topological space, such as the space $\mathbb Q\cap[0,1]$.
- 82,298