Proving if f has a continuous extension to [a,b] then f is uniformly continuous on (a,b). I want to show that if a function $f:(a,b) \rightarrow \mathbb{R}$ has a continuous extension to [a,b], then f is uniformly continuous. Also, assume that $(X, d_x)$ and $(Y, d_y)$ are nonempty metric spaces and all subsets of $\mathbb{R}^k$ are given the Euclidean metric. 
I know the proof is trivial, but I'm worried about my notation as I don't think I quite understand continuous extension correctly. I understand that for $E \subset F \subset X$, the function $g: F \rightarrow Y$ is an extension to f if $g(x)=f(x) \forall x \in E$. 
So, we have $(a,b) \subset [a,b] \subset \mathbb{R}$ and $f: (a,b) \rightarrow \mathbb{R}$. So if f has a continuous extension to a,b, then (f(x)) = f(y)) $\forall x \in (a,b), y \in [a,b]$. And so this then implies that d(f(x), f(y)) = 0, and so $\forall \epsilon > 0, \exists \delta > 0$ s.t. $d(x, y) < \delta$ implies $d(f(x), f(y)) < \epsilon$. 
Help and hints would be much appreciated!

We're assuming $a,b\in {\mathbb R}$. 
By continuous extension it is  meant that there exists $g:[a,b]\to {\mathbb R}$ satisfying: 
a. $g$ is  continuous; 
b. $g$ coincides with  $f$ on $(a,b)$. 
Since $g$ is continuous on a closed bounded interval, it follows that it is uniformly continuous. 
That is for every $\epsilon>0$, we have a $\delta = \delta(\epsilon)>0$ such that $|g(x) - g(y) |<\epsilon$  if $|x-y|<\delta$ and $x,y$ are in the domain of $g$, $[a,b]$. 
This clearly holds if restrict  $x,y$ to the (smaller) domain of $f$, $(a,b)$. Since on $(a,b)$, the functions $g$ and  $f$ coincide, the result follows. 
The converse is also true. 
Suppose that $f$ is uniformly continuous on $(a,b)$. Let $\epsilon>0$ and let $\delta$ be such that $|f(x) - f(y)|<\epsilon $ if $|x-y|<\delta$ and $x,y \in (a,b)$.  Observe that if $x,y \in (a,a+\delta)$, then $|f(x)-f(y) |<\epsilon$. It follows that 
$$ \limsup_{x\to a+}f(x) - \liminf_{x\to a+} f(x) \le \epsilon,$$
and since $\epsilon$ is arbitrary, this implies $\lim_{x\to a+} f(x)$ exists. Similarly $\lim_{x\to b-} f(x)$ exists. 
Defining $g:[a,b]\to {\mathbb R}$ by letting  be $g(x)=f(x)$ if $x\in(a,b)$, and setting $g$ as the corresponding one-sided limits at $a$ and at $b$ respectively, then $g$ is a continuous extension of $f$. 
