How to prove: closed-and-open sets are both functionally open and functionally closed?
This result comes from RYSZARD ENGELKING,General topology, Page 65.
How to prove: closed-and-open sets are both functionally open and functionally closed?
This result comes from RYSZARD ENGELKING,General topology, Page 65.
If $A$ is closed-and-open (clopen) in $X$, define $f: X \to [0,1]$ by
$f(x) = 1$ if $x \in A$, $f(x) = 0$ if $x \notin A$.
If $O \subseteq [0,1]$ is open, then $f^{-1}[O]$ is either $A$ (iff $1 \in O, 0 \notin O$), $X\setminus A$ (iff $0 \in O, 1 \notin O$), $\emptyset$ (iff $0,1 \notin O$) or $X$ (iff $0,1 \in O$). So $f^{-1}[O]$ is always open, when $A$ is open and closed, hence $f$ is continuous.
As $A = f^{-1}[\{1\}]$, $A$ is functionally closed.
And because $A = f^{-1}[(0,1]]$, $A$ is functionally open.