Prove that open subspace of a topologically complete space is topologically complete I'm trying to prove that an open subspace of a topologically complete space is topologically complete. I follow the hint in the book. We defined $\phi : U \rightarrow R$ by the equation 

$$\phi(x) := \frac 1{d(x, X-U)}$$

Imbed $U$ in $X \times R$ by setting $$f(x):= \big(x,\phi(x)\big)$$ I can prove that $f(x)$ homeomorphism. So the things remains is to prove that $f(U)$ is closed and $X \times R$ is topologically complete. But I can't find any hint to prove it.
Can someone help me finish my proof. Thanks so much
 A: First, show that $(X \times \mathbb{R},\delta)$ is complete where $\delta((x,r),(y,s))=\max(d(x,y),|r-s|)$.
Then, let $(f(x_n))$ be a sequence in $f(U)$ converging to some $y \in X \times \mathbb{R}$. In particular, $(\phi(x_n))$ is bounded so $d(x_n,\partial U)>\epsilon$ for some $\epsilon>0$ (because $\phi(x) \to + \infty$ as $x \to \partial U$). Therefore, $x_n \in W$ for some closed subset $W \subset U$, hence $y \in \overline{f(W)} = f(W) \subset f(U)$ because $f$ is a homeomorphism. Thus $U \times \mathbb{R}$ is closed in $X \times \mathbb{R}$.
A: Seirios has given one perfectly good proof. Almost any reasonable choice of product metric on $X\times\Bbb R$ will be complete, but his choice is probably the easiest to work with. I prefer to show that $U\times\Bbb R$ is closed in $X\times\Bbb R$ by showing that its complement is open, so I offer that argument as an alternative.
Suppose that $p=\langle x,r\rangle\in(X\times\Bbb R)\setminus f[U]$. Every space in sight is Hausdorff, and the set $f[U]$ is the graph of a continuous function from $U$ to $\Bbb R$, so it’s closed in $U\times\Bbb R$. Thus, if $x\in U$, then $p$ has a nbhd $V$ that is open in $U\times\Bbb R$ and disjoint from $f[U]$; and since $U\times\Bbb R$ is open in $X\times\Bbb R$, $V$ is an open nbhd of $p$ in $X\times\Bbb R$ that is disjoint from $f[U]$. If $x\in X\setminus\operatorname{cl}U$, then $(X\setminus\operatorname{cl}U)\times\Bbb R$ is an open nbhd of $p$ disjoint from $f[U]$. The only remaining possibility is that $x\in(\operatorname{cl}U)\setminus U$, so assume that this is the case.
Let $\epsilon>0$; we’ll decide in a bit just how small $\epsilon$ needs to be. If $y\in U$, and $d(y,x)<\epsilon$, then certainly $d(y,X\setminus U)<\epsilon$, so $\varphi(y)>\frac1\epsilon$. Note that $r$ must be positive, so we can choose $\epsilon<\frac1{2r}$, thereby ensuring that $\frac1\epsilon>2r$. Let $V=B_d(x,\epsilon)\times(0,2r)$; clearly $V$ is an open nbhd of $p$ in $X\times\Bbb R$. Moreover, for any $y\in U$, if $y\in B_d(x,\epsilon)$, then $\varphi(y)>2r$, so $f(y)\notin V$, and therefore $V\cap f[U]=\varnothing$.
Thus, every point of $(X\times\Bbb R)\setminus f[U]$ has an open nbhd disjoint from $f[U]$, which is therefore closed in $X\times\Bbb R$.
The diagram below may be useful in seeing what’s going on. Since $\varphi(y)$ increases as $y$ approaches the complement of $U$, the graph of $f$ is stretched upwards at the boundary of $U$; thus, for a point $p$ as in the diagram, finding an open nbhd of the $p$ disjoint from $f[U]$ is just a matter of squeezing the nbhd small enough horizontally tightly enough to allow it to project up above $p$ without running into $f[U]$. (Note that as a result of bad planning in my part, the $V$ is the diagram doesn’t quite match the description above: the $\epsilon$ in the picture is more like $\frac2{3r}$ than like $\frac1{2r}$.)

