Let $f$ be an arbitrary complex function on $\Bbb{R}$, and define $\varphi(x,\delta) = \sup \{|f(s)-f(t)| : s,t \in (x-\delta, x+ \delta) \}$ and $\varphi (x) = \inf \{\varphi(x,\delta) : \delta > 0 \}$. Prove that $\varphi$ is upper semicontinuous, that $f$ is continuous at a point if and only if $\varphi(x)=0$.
Is this mistake in Rudin's book RCA? Which $\varphi$ am I asked to show is upper semicontinuous? The first or second? I suspect it is the second one.
EDIT:
Okay. I am having some trouble with this problem. Let
$$\varphi(x,\delta) = \sup \{|f(s)-f(t)| : s,t \in (x-\delta, x+ \delta) \}$$
and
$$\phi(x) = \inf \{\varphi(x,\delta) : \delta > 0 \}.$$
I am trying to show that $\varphi(x) = \varphi(x,\delta)$ is USC for each $\delta$, whereby I can conclude $\phi$ is USC. Letting $\delta > 0$ be fixed, we want to show that $\varphi^{-1}(-\infty,\alpha)$ is open for every $\alpha \in \Bbb{N}$. If $\alpha \le 0$, then the preimage is empty; so we may assume $\alpha > 0$. If $x \in \varphi^{-1}(-\infty,\alpha)$, then
$$|f(s)-f(t)| \le \sup \{|f(s)-f(t)| : s,t \in (x-\delta, x+ \delta) \} < \alpha$$
for every $s,t \in B(x,\delta) = (x-\delta,x+\delta)$, which reminds me of continuity.
Indeed, suppose that $f$ is continuous at $x$. Then given $\frac{\alpha}{4} > 0$, choose $\gamma < \delta$ positive so that $|x-t| < \gamma$ implies $|f(x)-f(t)| < \frac{\alpha}{4}$. Then given $|x-t|$ and $|x-s|$ both less than $\gamma < \delta$, we get
$$|f(x)-f(t)| < \frac{\alpha}{4} ~~~~~\mbox{and}~~~~|f(x)-f(s)| < \frac{\alpha}{4}$$
imply $|f(s)-f(t)| < \frac{\alpha}{2}$ and therefore
$$\varphi(x) = \sup \{|f(s)-f(t)| : s,t \in (x-\delta, x+ \delta) \} \le \frac{\alpha}{2} < \alpha$$
and therefore $x \in \varphi^{-1}(-\infty,\alpha)$. However, I don't think the converse holds, so it isn't clear to me how to show $\varphi^{-1}(-\infty, \alpha)$ is open.