Continuous function with non-negative derivative a.e. implies non-decreasing?

Let $f \colon [a,b] \rightarrow \mathbb{R}$ be a continuous function on a compact interval of the real line. Suppose that $f$ is differentiable almost everywhere and that $f'(x) \geq 0$ at every point of differentiability. Is it true that $f$ is non-decreasing on [a,b]?

(If $f$ is $\textit{absolutely}$ continuous, this is certainly true, but I'm not so sure what happens if you weaken the assumption to mere continuity.)

• Take whatever piece-wise differentiable and increasing function you like. No reason for it to be increasing on the whole interval. – Qiyu Wen Jul 1 '16 at 16:26
• @Arthur True, but I don't see what that has to do with the question... – David C. Ullrich Jul 1 '16 at 16:55

No. The Cantor-Lebesgue function $f$ is continuous, non-decreasing, non-constant, and satisfies $f'=0$ almost everywhere. It's not hard to see that $f$ is non-differentiable at every point of the Cantor set. So $g=-f$ is a counterexample to your question: $g$ is continuous, differentiable almost everywhere, satisfies $g'\ge 0$ at every point of differentiability, but $g$ is not non-decreasing.