4

I am taking a metric spaces class, and I am struggling to show how to prove that the closure of $\mathbb{R}\setminus\mathbb{Q}$ is $\mathbb{R}$. Taking this question's answer as a reference, I have done the following:

My Attempt

We want to show that for every real number $r$ and $\epsilon\gt 0$, there exist an at least one $q$ in $\mathbb{R}\setminus\mathbb{Q}$ such that $|r-q| \lt \epsilon$ which will mean that complement of closure of $\mathbb{R}\setminus\mathbb{Q}$ is empty in $\mathbb{R}$, therefore closure of $\mathbb{R}\setminus\mathbb{Q}$ must equal to $\mathbb{R}$.

Let $r$ be a real number. Then, there exist at least one $q$ such that $|r-q| \lt \epsilon$ holds. I am not sure if I can choose $q$ such as:

Write $r$ in decimal expansion, and let $q$ be the rational that has the same decimal expansion as $r$ up to the $n$th digit after the decimal point, and terminates there.

Since we are in $\mathbb{R}\setminus\mathbb{Q}$ and we cannot choose $q$ to be a rational that has the same decimal, since rational are excluded, and I am not sure if we can choose a real and non-rational number that holds to be true.

I would appreciate any help!

Zek
  • 309
  • 6
    Take a rational number to the desired precision then cut off the tail and truncate the digits of $pi$ to make it irrational. – CyclotomicField Oct 30 '23 at 22:00
  • @CyclotomicField How do you know the resulting number isn't itself $r$? You need to tweak this very slightly. – Robert Shore Oct 30 '23 at 22:07
  • Let $q \in \mathbb{Q}$. Define $a_n = q + \frac{\pi}{10^n}$. Then, $\lim_{n\to\infty} a_n = q$. Assume by contradiction that $\frac{\pi}{10^n}$ is rational, and we know that $10^n$ is rational, then $\pi$ is rational. The same proof goes for $ q + \frac{\pi}{10^n} \in \mathbb{R}\setminus\mathbb{Q}$. – Kuzja Oct 30 '23 at 22:20
  • @Kuzja How do you know $a_n \notin \Bbb Q$? – Robert Shore Oct 30 '23 at 22:21
  • Just pressed enter instead of shift+enter, edited in the full proof. – Kuzja Oct 30 '23 at 22:25
  • 2
    @CyclotomicField: did you mean concatenate when you typed truncate? – J. W. Tanner Oct 30 '23 at 22:30
  • @RobertShore: Why is $q=r$ a problem? Then for sure $|r-q|<\varepsilon$? Isn't that sufficient? OP asks for $q\in \mathbb{R}\backslash\mathbb{Q}$. – user408858 Oct 30 '23 at 22:38
  • 1
    Did you intend to write that the complement of the closure of $\mathbb R\setminus \mathbb Q$ is empty in $\mathbb R$? – J. W. Tanner Oct 31 '23 at 01:01
  • 1
    @J.W.Tanner Yes, thank you for pointing that out. I have edited it. – Zek Oct 31 '23 at 14:16
  • @RobertShore How can the resulting number be $r$, which is in $\mathbb{Q}$, when we have created $q$ using an irrational number? The tail of the newly created number $q$ cannot be rational since we are adding the digits of $\pi$ at the end, right? – Zek Oct 31 '23 at 20:11
  • You defined $r$ as a real number, not necessarily a rational number. – Robert Shore Oct 31 '23 at 21:49
  • 1
    @RobertShore I now understand what you mean, thank you. – Zek Nov 01 '23 at 17:51

3 Answers3

1

Let $r\in\mathbb{R}$. For any $\varepsilon>0$, there exists $N\in\mathbb{N}$ by the Archimedean property, such that $2<\varepsilon N<\varepsilon 10^N$. Define

$$q:=10^{-N}\lfloor 10^{N}r\rfloor+\Big(\pi-10^{-N}\lfloor 10^{N}\pi\rfloor\Big),$$

such that $$|r-q|=|10^{-N}\underbrace{(10^Nr -\lfloor 10^Nr\rfloor)}_{\in[-1,1]}-10^{-N}\underbrace{(10^N\pi-\lfloor 10^N\pi\rfloor)}_{\in[-1,1]}|\le2\cdot10^{-N}<\varepsilon.$$

Note: Suppose $q\in\mathbb{Q}$, then $\pi = q-10^{-N}\lfloor 10^{N}r\rfloor+ 10^{-N}\lfloor 10^{N}\pi\rfloor\in\mathbb{Q}$, which is contradictory, i.e. $q\in\mathbb{R}\backslash\mathbb{Q}$.

(Following the idea of CyclotomicField)

user408858
  • 2,463
  • 12
  • 28
0

Here's a proof based on cardinality. I'll assume you know that $\Bbb Q$ is countable and (via Cantor's diagonalization proof or in some other way) that $\Bbb R$ is not countable.

First, note that $f(x) = \tan^{-1} x$ provides a $1$-$1$ surjection $f: \Bbb R \to U$, where $U$ is an open interval. That means the open interval $U$ is uncountable. By translating and scaling $U$ via another $1$-$1$ surjection, you can easily see that any open interval of $\Bbb R$ is uncountable. In particular, any ball of the form $B(r, \varepsilon)$ is uncountable.

Let $V=B(r, \varepsilon)$ be any open set. $V \cap \Bbb Q \subseteq \Bbb Q$ must be countable because $\Bbb Q$ is countable. Also, $V=(V \cap \Bbb Q) \cup (V \setminus \Bbb Q)$, so since $V$ is uncountable and the union of two countable sets is countable, $V$ can't be the union of two countable sets. Since $V \cap \Bbb Q$ is countable, this means $V \setminus \Bbb Q$ must be uncountable. In particular, $V \setminus \Bbb Q \neq \varnothing$ so any ball contains an irrational number outside its center.

Robert Shore
  • 23,332
0

Let $x\in \mathbb{R}$ and $\epsilon>0$. Find $q\notin \mathbb{Q}$ such that $|x-q|<\epsilon$.