TITLE: Uniformly continuous homeomorphism onto $\mathbb{R}^n$
QUESTION [6 upvotes]: Let $f:U\to\mathbb{R}^n$ be a homeomorphism from an open subset of $\mathbb{R}^n$ onto $\mathbb{R}^n$, where $f$ is also uniformly continuous. Show that $U=\mathbb{R}^n$.
The solution I found here Uniformly continuous homeomorphism from open set to $\mathbb{R}^n$. but I don't understand the last part of the accepted answer: Since $f$ is uniformly continuous with image in a complete metric space, $f$ can be continuously extended $F:\overline{U}\to\mathbb{R}^n$. If $U\not=\mathbb{R}^n$, then $\overline{U}\not=U$ (otherwise, $U$ is a proper clopen subset of the connected space $\mathbb{R}^n$). Since $f$ maps $U$ onto $\mathbb{R}^n$, $F$ can't be injective, which contradicts $f$ being a homeomorphism.
I'm confused about the last line. Why does this contradict $f$ being a homeomorphism. Does it have something to do with connectedness? I know $U$ and hence $\overline{U}$ must be connected, but what is the contradiction?

REPLY [4 votes]: Under the supposed conditions, there are points $x \in U$ and $y \in \overline{U} \setminus U$ such that $F(x) = F(y) = z$.  Then there is a sequence $\{y_n\} \subset U$ with $y_n \to y$.  By the continuity of $F$, we have $F(y_n) \to F(y) = z$.  By the continuity of $f^{-1}$, we have $$y_n = f^{-1}(F(y_n)) \to  f^{-1}(z) = x$$
Limits in a metric space are unique, so this could only happen if $x=y$ which is absurd.