This question is from Calculus by Spivak, Chapter 8 on Least Upper Bounds:
Suppose that $f$ is a function such that $f(a) \leq f(b)$ whenever $a<b$. Prove that $\lim_{x_\to a^-} f(x)$ and $\lim_{x_\to a^+} f(x)$ both exist.
Worked on it for a while but didn't get anywhere. Any help would be appreciated.