Disproving a calculus statement Statement:

If $f'(a^+)$ and $f'(a^-)$ exist finitely at a point, then $f$ is continuous at $x=a$.

My disproof:
If $f(x)=\{x\}$ (fractional part function), then around $x=1$, $f(x)=x$ for $x<1$ and $f(x)=x-1$ for $x\geq1$. Either way, $f'(1^+)$ = $f'(1^-)=1$, yet  the function $f(x)$ is discontinuous at $x=1$.

I am a bit weak in calculus. Hence, I wish to know if my disproof is correct. Thank you!
 A: By definition,
$$ f'(a^+) = \lim_{x\to a^+} \frac{f(x) - f(a)}{x-a}
\qquad\text{and}\qquad
f'(a^-) = \lim_{x\to a^-} \frac{f(x) - f(a)}{x-a}. $$
We claim that if $f'(a^+)$ and $f'(a^-)$ both exist and are finite, then $f$ must be continuous.  To see this, first note that in order for these two limits to exist, $f(a)$ must be defined (and, implicitly, be finite).  Next, note that
$$ \lim_{x\to a^+} [f(x)-f(a)] = 0, $$
for, if not, then $f'(a^+)$ would not exist.  This implies that $f(a^+) = f(a)$.  Similarly, $f(a^-) = f(a)$.  But then we have
$$ f(a^-) = f(a) = f(a^+), $$
which implies that $f$ is continuous at $a$.

Now, to address what went wrong with your example:  let $f(x) = \{x\}$.  At $a=1$, we have
$$
f(1) = 0, \qquad
f(1^+) = 0,
\qquad\text{and}\qquad
f(1^-) = 1. $$
This causes no difficulty with $f'(1^+)$, since
$$ f'(1^+)
= \lim_{x \to 1^+} \frac{f(x) - f(1)}{x-1}
= \lim_{x\to 1^+} \frac{(x-1) - 0}{x-1}
= 1. $$
On the other hand,
$$ f'(1^-)
= \lim_{x\to 1^-} \frac{f(x) - f(1)}{x-1}
= \lim_{x\to 1^-} \frac{x - 0}{x-1}
= -\infty. $$
Thus the left-sided derivative does not exist, which means that your function fails to satisfy the hypothesis of the proposition.
