Cantor-Lebesgue function and an increasing function are equal almost everywhere Denote by $\varphi$ the cantor-lebesgue function and suppose $f$ is a certain increasing function defined on [0,1] and such that $f(x)=\varphi (x)$ for all $x\in[0,1]-C$ where $C$ is the cantor set. Prove that $f(x)=\varphi(x)$ for all $x\in[0,1]$.
Any help will appreciated.
 A: For each $x \in C$, we have
$$ \sup\{f(y) : y \le x, \ y \in [0,1]-C\} = \sup\{\varphi(y) : y \le x,\  y \in [0,1]-C\} $$
and
$$ \inf\{f(y) : y \ge x, \ y \in [0,1]-C\} = \inf\{\varphi(y) : y \ge x, \ y \in [0,1]-C\} $$
Now determine that
$$ \sup\{\varphi(y) : y \le x,\  y \in [0,1]-C\} = \inf\{\varphi(y) : y \ge x,\  y \in [0,1]-C\} = \varphi(x)$$
and you will be done.
A: This is not true as stated. A counterexample is 
$$
f(x) = \begin{cases} \phi(x) \quad &x\in [0,1) \\ 10 & x=1\end{cases}
$$
The correct statement is that $f=\phi$ on $(0, 1)$, which is a special case of the following claim. 
Claim. If $f, \phi:(a,b)\to\mathbb{R}$ are increasing, $\phi$ is continuous, and $f=\phi$ on a dense subset of $\mathbb{R}$, then $f=\phi$ on $(a,b)$.
Proof. Suppose that $f(c)> \phi(c)$ for some $c\in (a,b)$. Let $\epsilon=f(c)-\phi(c)$. Since $\phi$ is continuous, there is $\delta>0$ such that $\phi(x)<\phi(c)+\epsilon$ whenever $c<x<c+\delta$. On the other hand, $f(x)\ge f(c) = \phi(c)+\epsilon$, hence $f(x)> \phi(x)$ for all $x\in (c, c+\delta)$. This contradicts the assumption.
The case $f(c)<\phi(c)$ is treated similarly, considering a left neighborhood of $c$. $\quad\Box$
