I want to show $f$ is uniformly continuous on $(a,b)$ if and only if it is continuous and $\lim\limits_{x\to a^+}f(x)$ and $\lim\limits_{x\to b^-}f(x)$ exist. I saw the if statement on Show f is uniformly continuous on $(a,b)$ if it is continuous and $\lim\limits_{x\to a^+}f(x)$ and $\lim\limits_{x\to b^-}f(x)$ exist but I want to show if and only if. Here is what I've done:
Assuming $f$ is continuous on $(a,b)$ and $\lim\limits_{x\to a^+}f(x)$ and $\lim\limits_{x\to b^-}f(x)$ exist, we want to show that $f$ is uniformly continuous on $(a,b)$.
Proof from the right
Let $\{x_n\}$ be an arbitrary sequence in $(a,b)$ and $x_0\in(a,b)$ be arbitrary s.t. $\{x_n\}\to x_0$ as $n \to \infty$.
$\lim\limits_{x\to a^+}f(x):=l\;\;\text{for some}\;\; l\in\Bbb{R}$ exists $\implies$ If $\{a_n\}$ is an arbitrary sequence in $(a,a+\delta)$ s.t. $a_n\to a$ as $n \to \infty$, then $f(a_n)\to l$ as $n \to \infty$.
$\lim\limits_{x\to b^-}f(x):=k\;\;\text{for some}\;\; k\in\Bbb{R}$ exists $\implies$ If $\{b_n\}$ is an arbitrary sequence in $(b-\delta,b)$ s.t. $b_n\to b$ as $n \to \infty$, then $f(b_n)\to k$ as $n \to \infty$.
By continuity of $f$, we have that $x_n\to x_0$ as $n \to \infty\implies f(x_n)\to f(x_0)$ as $n \to \infty$. Hence, $f$ is uniformly continuous on $(a,b)$
My question is: I'm I right? Different kinds of sequential proofs, even $\epsilon-\delta$ proofs and criticisms are welcome!
Let $f:(a,b)\to\mathbb R$ be a function such that $\lim_{x\to a+}f(x)$ does not exist.
It is our aim to prove that $f$ is not uniformly continuous on $(a,b)$.
The absence of the limit implies the existence of a strict monotonically decreasing sequence $(x_k)_k$ in $(a,b)$ with $\lim_{k\to\infty} x_k=a$ such that $\lim_{k\to\infty} f(x_k)$ does not exist.
Then $(f(x_k))_k$ is not a Cauchy-sequence, so some $\epsilon>0$ exists such that for every $n$ we can find integers $m,k$ with $m,k>n$ and $|f(x_k)-f(x_m)|>\epsilon$.
This tells us that $f$ is not uniformly continuous on $(a,x_n]$ hence is not uniformly continuous on $(a,b)$.