Extending a continuous function in a special way from a non-closed set in a compact Hausdorff space

general-topology

Suppose $X$ is a compact Hausdorff space and that $A$ is a (not necessarily closed) subset of $X$. Assume we are given a continuous function $f\colon \overline{A}\to [0,1]$. Let $U$ be an open set containing $A$. My goal is to extend $f$ to a continuous function on all of $X$ that vanishes outside of $U$.

If $A$ were closed, then one could apply the Tietze Extension Theorem to get a continuous extension $g_{1}\colon X\to [0,1]$ of $f$ and then apply Urysohn's Lemma to get a continuous function $g_{2}\colon X\to [0,1]$ such that $g_{2}|_{A}\equiv 1$ and $g_{2}|_{u^{c}}\equiv 0$. Then, $g:=g_{1}\cdot g_{2}$ could serve as the desired extension.

Since $A$ need not be closed, my question is the following.

Suppose we know that for each $y\in \overline{A}\setminus A$, $f(y)=0$. Then can we extend $f$ to a continuous function on all of $X$ that vanishes outside of $U$?

Best Answer

$B = X \backslash U$ is closed and $B \cap \overline{A} = \overline{A} \backslash U \subset \overline{A} \backslash A$. Therefore $f' : B \cup \overline{A} \to [0,1], f'(x) = 0$ for $x \in B$, $f'(x) = f(x)$ for $x \in \overline{A}$ is well-defined and continuous. Extend $f'$ to $f'' : X \to [0,1]$.

This argument shows that $f : \overline{A} \to [0,1]$ has an extension $F : X \to [0,1]$ which vanishes outside of $U$ if and only if $f$ vanishes on $\overline{A} \backslash U \subset \overline{A} \backslash A$. Note that if $A$ is closed, then $\overline{A} \backslash U = \emptyset$.

By the way, we do not need the assumption that $X$ is compact. If suffices to assume that it is normal.