In a Calculus book, I had read the following proposition:
For a function $f:X\to \mathbb{R}$, $X\subseteq \mathbb{R}$ then $\lim\limits_{x\to x_0}f(x)$ exists if and only if $\lim\limits_{x\to x_0^+}f(x)$ and $\lim\limits_{x\to x_0^-}f(x)$ exist and $\lim\limits_{x\to x_0^+}f(x)=\lim\limits_{x\to x_0^-}f(x)$.
It has come to my attention however that this is wrong.
Let $f:\left[a,b\right] \to \mathbb{R}$, $f(x)=x$. Note that $a$ is an accumulation point (from the right) of the domain of $f$.
Obviously, $\lim\limits_{x\to a^-}f(x)$ does not exist since $a$ is not an accumulation point from the left of the domain of $f$. Using the definition of a limit of a real function (or using the fact that $f$ is continuous on $a$) we can derive that $\lim\limits_{x\to a}f(x)=a$ which is a contradiction to the proposition above.
My question is, in the proposition do we need to additionaly suppose that $x_0$ is an accumulation point from the right and the left of $X$?
If $x_0$ is an accumulation point of $X$ only from the right and $\lim\limits_{x\to x_0^+}f(x)$ exists then is it true that $\lim\limits_{x\to x_0}f(x)$ exists and $\lim\limits_{x\to x_0}f(x)=\lim\limits_{x\to x_0^+}f(x)$?