# clopen sets are both functionally open and functionally closed

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 $U\subset X$ is clopen in $X$, define $f:X\to \{0,1\}$ to be the characteristic function of $U$, where $\{0,1\}$ has the discrete topology. Then this function is continuous because $f^{-1}(0)=X\setminus U$, which is open (because $U$ is closed) and $f^{-1}(1)=U$, which is also open. – user561348 May 27 '18 at 10:18
• the definition of $A$ being functionally closed if $A=f^{-1}(0)$ for some continuous map $f:X\longrightarrow [0,1]$. – Shen Chong May 27 '18 at 10:32
• according to your idea, define $f:X\longrightarrow[0,1]$: $f(U)=0$, $f(X-U)=1$, then it is continuous. – Shen Chong May 27 '18 at 10:38
• If $U\subset X$ is clopen in $X$, define $f:X\to [0,1]$ to be the characteristic function of $U$. This function is continuous, because $f^{-1}(V)$ of an open set that contains $1$ and not $0$ is equal to $U$, which is open. If $V$ contains $0$ and not $1$, then $f^{-1}(V)$ is $X\setminus U$, which is also open. If $V$ contains neither $0$ nor $1$, then $f^{-1}(V)=\emptyset$, which is open. If $V$ contains both $0,1$ then $f^{-1}(V)$ is $X$, which is open. – user561348 May 27 '18 at 10:38

## 1 Answer

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.