Understanding the proof of: set whose decimal expansion contains only $4, 7$ is perfect

general-topologyproof-explanationreal-analysis

I'm trying to understand the proof of the following:

Let $E$ be the set of all $x \in [0,1]$ whose decimal expansion contains only the digits $4$ and $7$. Prove the every point of $E$ is a limit point of $E$.

The proof that is provided to me is:

$E$ is perfect since it is closed and its every point is a limit point of $E$. We have already shown that $E$ is closed. Now, let $p \in E$ where $p = 0.p_1p_2 \dots p_n \dots$. It suffices to show that $p$ is a limit point of $E$. To this end, let $r > 0$. Then, $\exists N$ such that $\frac{3}{10^N} < r$. Let $p' = 0.p_1p_2 \dots p_n s_{n+1}\dots$ where $s_{n+1} = 4$ if $p_{n+1} = 7$ and $s_{n+1} = 7$ if $p_{n+1} = 4$. Then, $p' \in N_r(p), p' \in E,$ and $p' \ne p$. Since $r > 0$ was arbitrary, $p$ is a limit point of $E$.

Can someone please explain why "$\exists N$ such that $\frac{3}{10^N} < r$" and why "$p' \in N_r(p)$"?

Best Answer

I’ll take your questions in reverse order. First, $p'\in N_r(p)$ because it was constructed to ensure that this is the case. Specifically, the decimal expansions of $p$ and $p'$ both begin $0.p_1p_2\ldots p_n$, where $n$ is large enough that $\frac3{10^n}<r$. The next digit of the expansion of $p$ is $p_{n+1}$, and the next digit of the expansion of $p'$ is $7$ if $p_{n+1}=4$ and $4$ if $p_{n+1}=7$. Thus, the largest possible value for $|p-p'|$ is

$$0.\underbrace{0\ldots 0}_n3333\ldots<\frac1{10^n}\cdot\frac13<\frac3{10^n}<r\;.$$

Thus, $|p-p'|<r$, and that by definition (of $N_r(p)$) means that $p'\in N_r(p)$.

I suspect that the choice of $n$ such that $\frac3{10^n}<r$ embodies a typo, and that the author intended to choose $n$ large enough that $\frac1{3\cdot10^n}<r$, since, as I pointed out above, $\frac1{3\cdot10^n}$ is the largest possible value of $|p-p'|$ when $p'$ is constructed according to the recipe actually used.