Exercise 4.13 from Rudin, what's wrong with this proof.

437 Views Asked by At

Here's the exercise:

enter image description here

I've already constructed $g(x)$ as suggested in the exercise, the problem is my "proof" that $g(x)$ is continuous.

So, let $p\in{X}$ and $\{p_n\} \to{p}$. Now define a new sequence $\{q_n\}$ such that

$$q_n=\begin{cases}p_n, & \text{if $\ p_n\in{E}$}\\x, & \text{such that $d_X(p_n, x) \lt 1/n$ and $x\in{E}$}\end{cases}$$

Now, it's clear that $$\{d_X(p_n, q_n)\} \to{0}$$ and therefore $$\{q_n\} \to{p}.$$

Since $\{q_n\} \in{E}$ we also have that

$$\{f(q_n)\} \to f(p)$$

from which it (should) follow that

$$\{f(p_n)\} \to f(p).$$

Obviously my full proof is more elaborate, but this is basically the gist of it. The problem is that at no point am I assuming that $f(X)$ is complete and it should therefore for hold for any metric space. But I've seen examples of metric spaces where it doesn't hold so my proof must be faulty.

Edit:

So I realized that the second to last statement doesn't imply the last statement. I found a solution online here:

Chapter 4 Problem 13

However, I still don't why see $f(X)$ needs to be complete.