Continuous extension from $(0,1)$ to $[0,1]$ If $f:(0,1)\to[0,1]$ is a $C_1$ diffeomorphism such that the closure of $f((0,1))$ is $[0,1]$, does $f$ have a continuous extension to $[0,1]$?
This was stated as fact in my notes, but I can't convince myself why it's true. The only fact I know about continuous extensions is the Tietze extension theorem: If X is a normal topological space and $f : A \to R$ 
is a continuous map from a closed subset $A$ of $X$ into the real numbers carrying the standard topology, then there exists a continuous map $F : X \to R$ with $F(a) = f(a)$ for all $a$ in $A$.
I don't think this applies to my situation, since the domain of $f$ is open. So how can we show this?
 A: It need not have a continuous extension if $f$ is only assumed continuous, consider
$$f(x) = \biggl(\sin \frac{1}{x}\biggr)^2.$$
$f$ has a continuous extension to $[0,1]$ if and only if $f$ is uniformly continuous on $(0,1)$.
If $f$ has a continuous extension $F \colon [0,1] \to [0,1]$, then by compactness of $[0,1]$ we have the uniform continuity of $F$. Since every restriction of a uniformly continuous function is uniformly continuous (If $\lvert x-y\rvert < \delta$ implies $\lvert F(x) - F(y)\rvert < \varepsilon$, then the same implication holds for the restrictions of $F$), this implies the uniform continuity of $f$. And if $f$ is uniformly continuous, then the limits of $f(x)$ at $0$ and at $1$ exist, and
$$F(x) = \begin{cases}\lim_{y\to 0} f(y) &\text{if } x = 0 \\ \quad f(x) &\text{if } 0 < x < 1 \\ \lim_{y\to 1} f(y) &\text{if } x = 1 \end{cases}$$
is the (unique) continuous extension of $f$ to $[0,1]$. Once the existence of the limits is established, the continuity of $F$ at $0$ and at $1$ follows directly from the definitions, and the continuity of $F$ at all points of $(0,1)$ is just the assumed continuity of $f$. To see that the limits exist, let
$$A_n = \overline{f\bigl((0,1/n)\bigr)}.$$
Then $A_n$ is a nonempty compact subset of $[0,1]$, and $A_{n+1} \subset A_n$ for all $n$. Hence
$$A := \bigcap_{n = 1}^{\infty} A_n$$
is not empty. Since the diameter of $(0,1/n)$ shrinks to $0$, the uniform continuity of $f$ implies that the diameters of $A_n$ also shrink to $0$, whence $A$ must be a singleton set, $A = \{\xi\}$ for some $\xi \in [0,1]$. And this means
$$\xi = \lim_{y\to 0} f(y).$$
If $f$ is a $C^1$ diffeomorphism (from $(0,1)$ to its image), then $f$ is in particular injective. And a continuous injective real-valued function on an interval is (strictly) monotonic. For monotonic functions, the existence of the limits at the endpoints of the interval is easily established. If $f$ is monotonically increasing, then
$$\lim_{y\to 0} f(y) = \inf \{ f(x) : x \in (0,1)\}$$
and
$$\lim_{y\to 1} f(y) = \sup \{ f(x) : x \in (0,1)\}.$$
If $f$ is monotonically decreasing, switch $\inf$ and $\sup$. Without further restrictions, these limits are only known to exist in $\mathbb{R} \cup \{ +\infty, -\infty\}$, and the finiteness of both of these limits is equivalent to the boundedness of $f$. Here, we are given that $f \colon (0,1) \to [0,1]$, so $f$ is bounded, and the limits are finite. Since we further have the assumption that $f\bigl((0,1)\bigr)$ is dense in $[0,1]$, it follows that $f\bigl((0,1)\bigr) = (0,1)$ and either $F(0) = 0,\, F(1) = 1$ (if $f$ is increasing) or $F(0) = 1,\, F(1) = 0$ (if $f$ is decreasing).
