Definition of Semicontinuity: Confusion in Rudin's RCA Rudin's RCA defines upper and lower semicontinuity as follows:

Let $f$ be a real or extended-real function on a topological space. If $$\{x: f(x) > \alpha\}$$ is open for every real $\alpha$, $f$ is said to be lower semicontinuous. If $$\{x: f(x) < \alpha\}$$ is open for every real $\alpha$, $f$ is said to be upper semicontinuous.

Clearly, the author defines upper and lower semicontinuity only for real (or extended-real) valued functions, and not explicitly for complex functions.
Edit: I had confused this with Q2 of Chapter 2, which was unrelated for the most part. My question now boils down to extending the definition of semicontinuity to complex functions, or more generally.
Thank you for the clarifications!
 A: This is to show that there is nothing special about a function taking values in $\mathbb{C}$ that makes the problem of semicontinuity of the modulus of continuity more difficult to analyze. In fact, only distance between objects play a key role.
Let $(S,d)$ and $(S',\rho)$ be metric spaces and let $h:S\rightarrow S'$. For any point $x\in S$ and $\delta>0$, denote by $B(x;\delta)=\{y\in S: d(x,y)<\delta\}$.

*

*The modulus of continuity of $h$ on $T\subset S$ is defined as
$$\Omega_h(T):=\sup\{\rho(h(x),h(y)):x,y\in T\}.$$

*The modulus of continuity of $h$ at $x$ is
defined as
$$\omega_h(x)=\lim_{\delta\searrow0}\Omega_h(B(x;\delta))=\inf_{\delta>0}\Omega_h(B(x;\delta))$$
Claim: For any $r>0$, the set $J_r=\{x\in S:\omega_h(x)\geq r\}$ is closed. Indeed, if $x\in J^c_r$, $\omega_h(x)<r$ and by definition of infimum, there is $\delta>0$ such that
$\Omega_h(B(x;\delta))<r$. Clearly  $B(x;\delta)\subset J^c_r$.
From the claim, it follows that the map $x\mapsto \omega_h(x)$ is lower semicontionous: $\{\omega_x\in S: \omega_n(x)>r\}$ is open for all $r>0$.
