Baby Rudin 2.17

I'm reading baby Rudin and trying problem 17 of chapter 2.

Let $$E$$ be the set of all $$x\in [0,1]$$ whose decimal expansion contains only the digits $$4$$ and $$7$$. Is $$E$$ countable? Is $$E$$ dense in $$[0,1]$$? Is $$E$$ compact? Is $$E$$ perfect?

My argument is the following:

1. Is $$E$$ countable? No. - Use Cantor's diagonal process as in the proof of theorem 2.14 of baby Rudin: Take a countable subset of $$E$$, namely $$A=\{a_n:n\in\mathbb{N}\}$$ and construct a sequence whose $$n$$-th member is $$7$$ if $$n$$-th digit of $$a_n$$ is $$4$$ and $$4$$ if $$n$$-th digit of $$a_n$$ is $$7$$. Then this new sequence differs from any other member of $$A$$. Thus every countable subset of $$E$$ is proper, it follows that $$E$$ is uncountable (for otherwise $$E$$ would be a proper subset of $$E$$).

2. Is $$E$$ dense in $$[0,1]$$? No. - There's no member of $$E$$ between $$0.1$$ and $$0.2$$: Because it must start with $$0.1...$$ and $$1$$ is not allowed for a member of $$E$$.

3. Is $$E$$ compact? No. - Since by theorem 2.34 of baby Rudin, compact subsets of metric spaces are closed. So if $$E$$ is not closed, then it must not be compact. I will show that $$E^c$$ is not open. Take $$x\in E^c$$. Then we need to find a open ball $$B_r(x)=\{y\in [0,1]:|x-y|. But for every $$r>0$$, $$B_r(x)$$ must contain a number at least one of whose digits contains $$4$$ or $$7$$; otherwise there would be a gap inside the ball (a segment, actually). So $$E$$ is not closed (since $$E$$ closed $$\iff$$ $$E^c$$ open).

4. Is $$E$$ perfect? No. - Direct from the definition: a perfect set is a closed set whose members are limit points.

Is my argument valid?

• E is closed, so your argument for (3) is incorrect. Specifically, you wrote "For every $r>0$, $B_r(x)$ must contain at least one of whose digits contains $4$ or $7$", but the digits of that number may not contain $4$ and $7$ only. – YuiTo Cheng Apr 26 at 7:56

1. Your application of Cantor's diagonal process is correct.
2. Nice observation that $$[0.1,0.2] \subseteq E^\complement$$.
3. $$E$$ is in fact closed. Take $$x = \overline{0.a_1a_2\cdots} \in E^\complement$$, where the $$n$$-th decimal place $$a_n \in \{0,\dots,9\}$$ for all $$n \in \Bbb{N}$$. Since $$x \notin E$$, there exists $$m \in \Bbb{N}$$ such that $$a_m \notin \{4, 7\}$$. Let's choose the least possible value of $$m$$, and choose $$r$$ sufficiently small so that $$B_r(x) \subseteq E^\complement$$ by defining $$r = \color{red}{\frac{1}{100}\min}\{|x - c_i| \mid i \in \{1,\dots,4\}\}$$. Observe that $$E$$ is "locally bounded" by the intervals $$[c_1,c_2]$$ and $$[c_3,c_4]$$.

$$\bbox[36px, yellow, border: 2px solid red]{\begin{array}{rrrrrrrrrr} \rlap{\style{display: inline-block; transform: scale(10,1)}{-}} {\Large [} & {\large \bullet} & \llap{\style{display: inline-block; transform: scale(10,1)}{-}} {\Large ]} & {\style{display: inline-block; transform: scale(10,1)}{-}} & {\Large |} {\style{display: inline-block; transform: scale(10,1)}{-}} & {\style{display: inline-block; transform: scale(10,1)}{-}} {\Large |} & {\style{display: inline-block; transform: scale(10,1)}{-}} & \rlap{\style{display: inline-block; transform: scale(10,1)}{-}} {\Large [} & {\large \bullet} & \llap{\style{display: inline-block; transform: scale(10,1)}{-}} {\Large ]} \\ c_1 & \begin{matrix}\uparrow \\ E\end{matrix} & c_2 & \rlap{\small\overline{0.a_1a_2\cdots a_{\color{red}{m-1}}5/6}} & & & & c_3 & \begin{matrix}\uparrow \\ E\end{matrix} & c_4 \end{array}}\\ \text{Figure 1: range of possible values of numbers in E}$$

• $$c_1 = \overline{0.a_1a_2\cdots a_{\color{red}{m-1}} \color{red}{4}4}$$
• $$c_2 = \overline{0.a_1a_2\cdots a_{\color{red}{m-1}} \color{red}{4}8}$$
• $$c_3 = \overline{0.a_1a_2\cdots a_{\color{red}{m-1}} \color{red}{7}4}$$
• $$c_4 = \overline{0.a_1a_2\cdots a_{\color{red}{m-1}} \color{red}{7}8}$$

Recall that $$x = \overline{0.a_1a_2\cdots a_{\color{red}{m-1}} a_m a_{m+1} a_{m+2} \cdots}$$, so $$r \le \frac{44 \cdot 10^{-(m+1)}}{100} < \frac{50 \cdot 10^{-(m+1)}}{100} = \frac{5}{10^{m+2}}.$$ When we add/minus $$r$$ to/from $$x$$, the new number $$x \pm r$$ "won't differ too much from $$x$$". Consider $$x - r$$ ( or $$x + r$$). Either one of the following cases occurs:

• the $$m$$-th decimal place is still $$a_m \notin \{4,7\}$$, so $$x - r \notin E$$.
• the $$m$$-th decimal place is changed by $$1$$ (digit $$0 \to 9$$ also counts). A necessary condition for this to happen is that $$a_{m+1} \in \{0,9\}$$. (To see this, imagine examples like $$0.95 + 0.05 = 1$$.) In this case, the $$(m + 1)$$-th decimal place of $$x-r$$ would be either $$0$$ or $$9$$, so $$x - r \notin E$$.

Thus, any number in $$B_r(x)$$ can't belong to $$E$$. Therefore, $$E^\complement$$ is open and $$E$$ is closed. Since $$E$$ is bounded, Heine–Borel Theorem tells us that $$E$$ is compact.

Your mistake is the wrong deduction from "$$B_r(x)$$ must contain a number at least one of whose digits contains $$4$$ or $$7$$" to "$$E^\complement$$ is not open". To be a member of $$E$$, the decimal $$y \in B_r(x)$$ should consist merely in digits $$4$$ and $$7$$, not just "at least one" digit.

Remarks: The choice of $$r$$ is a bit tricky and the verification is a bit tedious, but it's still doable.

4. $$E$$ is a perfect set. The idea is that $$0.4\overset{\bullet}{7}, 0.44\overset{\bullet}{7}, 0.444\overset{\bullet}{7}, \cdots \to 0.\overset{\bullet}{4}.$$ Each term $$0.4\dots4\overset{\bullet}{7}$$ on LHS contains digit $$7$$, so it's different from RHS $$0.\overset{\bullet}{4}$$, and thus it lies in a deleted neighbourhood of $$0.\overset{\bullet}{4}$$. To finish the proof, just repeat this idea for any $$x \in E$$.

For any $$x = \overline{0.a_1a_2\cdots} \in E$$ I'm going to construct a sequence $$(y_n)_n$$ in $$E$$ so that $$\lim\limits_n y_n = x$$. For all $$n \in \Bbb{N}$$, define $$y_n = \overline{0.b_1b_2\cdots b_{m-1} b_m b_{m+1}}$$, where $$b_m = \begin{cases} a_m \quad &\text{ if } m \le n \\ \max(\{4,7\}\setminus\{a_m\}) & \text{ if } m > n \end{cases}.$$ $$\require{HTML}$$ $$\bbox[yellow, 5px, border: 2px solid red]{ \begin{array}{rrrrrrrrrr} x & = & 0. & a_1 & a_2 & \cdots & a_{n-1} & a_n & a_{n+1} & \cdots \\ \style{display: inline-block; transform: rotate(90deg)}{\ne} & & & \style{display: inline-block; transform: rotate(90deg)}{=} & \style{display: inline-block; transform: rotate(90deg)}{=} & \style{display: inline-block; transform: rotate(90deg)}{=} & \style{display: inline-block; transform: rotate(90deg)}{=} & \style{display: inline-block; transform: rotate(90deg)}{=} & \style{display: inline-block; transform: rotate(90deg)}{\ne} & \style{display: inline-block; transform: rotate(90deg)}{\ne} \\ y_n & = & 0. & b_1 & b_2 & \cdots & b_{n-1} & b_n & b_{n+1} & \cdots \end{array}} \\ \text{Figure 2: construction of approaching sequence (y_n)_n in E' from x \in E}$$ It's clear that for all $$n \in \Bbb{N}$$, $$y_n \ne x$$ and $$y_n \in E$$, but $$\lim\limits_n y_n = x$$, so $$x \in E'$$.

A possible cause of your mistake: Since your response to the previous question is incorrect, you might think that $$E$$ is not closed, so there exists a sequence $$(y_n)_n$$ in $$E$$ "escaping" from $$E$$, so there might exists limit point $$y$$ not in $$E$$

• I don't think it's OK to answer a proof-verification question with an alternative proof only. You should state the error the OP made in the first place. – YuiTo Cheng Apr 26 at 8:23
• @user642721 Under metric topology, sequential convergence criterion suffices. For the last question, I just construct one. I admit that the notation used while defining $b_m$ isn't elegant, but I don't know a better way to write that in symbols. I should have included an example like $0.7, 0.47, 0.447, 0.4447, ... \to 0.4444....$. – GNUSupporter 8964民主女神 地下教會 Apr 29 at 8:19
• I prefer borrowing English words for further explaining stuff. Let's call $U_n\setminus \{l\}$ deleted $\epsilon_n$-neighbourhood about $\ell$. The elementary topological definition "$\forall n: U_n\setminus \{l\}\cap E\not=\varnothing$" simply means that "no matter how small our radius $\epsilon_n$ is, you can always find an element in $E$ belonging to the deleted $\epsilon_n$-neighbourhood about $\ell$" Note that the limit point $\ell \in E'$ is fixed in the definition. Forget about deleted for the moment, so you simply need a sequence $b_n \to \ell$ as $n \to \infty$ – GNUSupporter 8964民主女神 地下教會 Apr 29 at 8:39
• Translated to words: no matter how small $\epsilon_n$-nhbd about $\ell$ is, the "tail" of $b_n$ stays inside the small $\epsilon_n$-nhbd. If you can prove that $\forall n: b_n \ne \ell$, then $(b_n)_n$ belongs to a deleted nbhd about $\ell$ for sure. – GNUSupporter 8964民主女神 地下教會 Apr 29 at 8:42
• – GNUSupporter 8964民主女神 地下教會 Apr 29 at 9:07