Questing about Tietze Extension Theorem implying Urysohn Lemma

general-topology

I was reading a proof that Tietze Extension theorem implies the Urysohn lemma, and I'm confused about one part in particular. Suppose I have two disjoint closed sets $A$ and $B$. I define $f : A\cup B\to \mathbb{R}$ by $f(x) = 0$ if $x \in A$ and $f(x) = 1$ if $x\in B$. The claim is that $f$ is continuous on $A\cup B$. But I don't see how. E.g. $f^{-1}((-1/2,1/2)) = A$, where $(-1/2,1/2)$ is an open set, but $A$ is not necessarily open, e.g. if it's a closed disk in $\mathbb{R}^2$.

I know it relates to the pasting lemma, and constant function being continuous, but from this example I don't see how this can be true.

Best Answer

Although $A$ may not be open as a subset of $X$, it is an open subset of $A \cup B$.

To see that $A$ is an open subset of $A \cup B$, note that $A = (A \cup B) \cap B^c$, because $A$ and $B$ are disjoint. By definition, the open subsets of $A \cup B$ are precisely the sets of the form $(A \cup B) \cap S$, with $S \subseteq X$ open. Since $B$ is closed, $B^c$ is open, so it follows that $A$ is an open subset of $A \cup B$.

Related Question