Prove that $\lim _{x\to x_0} f(x)=l$ if and only if $\lim _{x\to x_0^+}f(x)=l$ and $\lim _{x\to x_0^-}f(x)=l$
i know how to prove in genearlly but here im trying to prove by sequential criterion
suppose $x_n \to x_0 $ and $f(x_n)\to l$ then
$x_n<x_0 $ and converges $x_0$ then $f(x_n)\to l$
Also $x_n>x_0 $ and converges $x_0$ then $f(x_n)\to l$
so both left and right limits are exists and equal to $l$
how to prove converse part
thank you so much i'm confusing these concepts so i m trying solve
Suppose that $\lim_{x\to x_0^+}f(x)=\lim_{x\to x_0^-}f(x)=l$ and let $(x_n)_{n\in\mathbb N}$ be a sequence of real numbers such that $\lim_{n\to\infty}=x_0$. If the equality $x_n\geqslant x_0$ holds for all but finitely many $x_n$'s then since $\lim_{x\to x_0^+}f(x)=l$, it is clear that $\lim_{n\to\infty}=x_0$. By the same argument, if the equality $x_n\leqslant x_0$ holds for all but finitely many $x_n$'s then $\lim_{n\to\infty}=x_0$ too. Otherwise, let $(n_k)_{k\in\mathbb N}$ be the sequence of all naturals $n$ such that $x_n\geqslant x_0$, by increasing order, and let $(m_k)_{k\in\mathbb N}$ be the sequence of all naturals $n$ such that $x_n\leqslant x_0$, again by increasing order. Then$$\lim_{k\to\infty}f(x_{n_k})=\lim_{k\to\infty}f(x_{m_k})=l$$and it is easy to deduce from this that $\lim_{n\to\infty}f(x_n)=l$. Therefore, $\lim_{x\to x_0}f(x)=l$.