Suppose that $f:I\rightarrow R$ is uniformly continuous--prove that the righthand limit at the endpoint exists

Suppose $f$ is a uniformly continuous function mapping from an open real interval $(a,b)$ into the real numbers. Then the limit as $x$ approaches $a$ from the right of $f(x)$ exists.

I'm having trouble proving this-- I started out with the definition of uniformly continuity. So $f$ is uniformly continuous if for every $\epsilon>0$ there exists a $\delta>0$ such that $\lvert x-y \rvert < \delta$ implies $\lvert f(x)-f(y) \rvert < \epsilon$ for $x,y \in (a,b)$.

Then to prove that the right-hand limit at $a$ exists, I thought to just let $y=a$ and that that would give me the definition of limit; so that $0<x-a<\delta$ implies $\lvert f(x)-f(a) \rvert < \epsilon$, but then I realized that I couldn't do this because $a$ isn't in the interval $(a,b)$.

How can I prove this?

From a broader point of view, you can show that if you have a uniformly continuous map $f:X\to Y$ from a metric space $X$ to a complete metric space $Y$, then $f$ extends uniquely to a map $\hat f:\widehat X\to Y$ where $\widehat X$ is the completion of $X$. This shouldn't come as a surprise since the completion $\widehat X$ is defined in terms of classes of cofinal sequences, and the uniformly continuous maps are exactly those that preserve cofinal sequences. The uniqueness comes for free since $X$ is dense in its completion and $\tilde f\mid X=f$.

To be a bit more concrete, suppose you have a subset $A\subseteq X$ and $f:A\to Y$ is uniformly continuous. Then it can be extended uniquely to a uniformly continuous map $\tilde f:\overline A\to Y$.

We want to define $\tilde f$ on $\overline A$ so that $\tilde f\mid A=f$. Hence suppose that $x\in\hat A$ and $(a_n)$ converges to $x$ with $a_n\in A$. You can show $f(a_n)$ is Cauchy in $Y$, so since $Y$ is complete, we may define $\tilde f(x)=\lim\limits_{n\to\infty} f(a_n)$. That this is independent of the choice of sequence $(a_n)$ stems from the fact uniformly continuous functions send cofinal squences to cofinal sequences, i.e. if $d_X(a_n,a_n')\to 0$ then $d_Y(f(a_n),f(a_n'))\to 0$. Prove this!

At any rate, note that this definition agrees on all $A$ with $f$, since when $a\in A$ the constant sequence $(a,a,\ldots,)$ converges to $a$.

It remains to show $\tilde f:\overline A\to Y$ is uniformly continuous. It suffices to show it maps cofinal sequences to cofinal sequences. So suppose $(x_n)$ and $(y_n)$ are sequences in $\overline A$ such that $d(x_n,y_n)\to 0$. We aim to show that $d(\tilde f(x_n),\tilde f(y_n))\to 0$.

For each $n$ we have $x_n=\lim\limits_{i\to \infty}x_n^i$ and $y_n=\lim\limits_{i\to \infty} y_n^i$ for sequences $(x_n^i),(y_n^i)$ in $A$. Let's take $x_n^i$ such that $d(x_n,x_n^i)<1/i$ (and the same for $y_n$). This is actually key in the argument: we can control the convergence of all this (infinitely many!) sequences globally. Given $\varepsilon >0$ we want to obtain $N>0$ such that $n>N$ gives $d(f(x_n),f(y_n))<\varepsilon$.

Given this $\varepsilon>0$, we can find $\delta >0$ such that $x,y\in A$ and $d(x,y)<\delta$ implies $d(f(x),f(y))<\varepsilon/2$. Now there is $J$ such that if $i,j>J$ then for all $n$ we have $d(x_n,x_n^j),d(y_n,y_n^i)<\delta /3$, and we can find $N$ such that $n>N$ implies $d(x_n,y_n)<\delta/3$. This means that when $n>N$ and $i,j>J$, $$d(x_n^j,y_n^i)\leqslant d(x_n^j,x_n)+d(x_n,y_n)+d(y_n^i,y_n)<\delta$$

It follows that if $i,j>J$ then $d(f(x_n^j),f(y_n^i))<\varepsilon/2$. Since $d(-,-)$ is continuous in both variables, this gives upon taking iterated limits that $d(\tilde f(x_n),\tilde f(y_n))\leqslant \varepsilon/2<\varepsilon$ for $n>N$, and hence we conclude $\tilde f$ is uniformly continuous.