Example where Tietze Extension fails?
I can't think of an example of a function from closed set of topological space to [-1,1] which cannot be extended to the whole of the space. Can anyone help me out with an example?
Solution 1:
If $X$ is not normal, there are disjoint closed sets $A$ and $B$ that cannot be separated by disjoint open sets. Define $f$ from the closed set $A\cup B$ to $[-1,1]$ via $f(A)=1$ and $f(B)=-1$. Then as the preimage of a closed set is closed, $f$ is continuous. Suppose $g$ is a continuous extension of $f$. Then $g^{-1}[-1,0)$ and $g^{-1}(0,1]$ will be disjoint open sets containing $B$ and $A$ respectively, a contradiction.
It should be noted that the result of the Tietze Extension Theorem is a characterization of normal spaces.
Solution 2:
Here's an explicit example of David Mitra's answer in the simplest possible case.
Consider $X = \{a,b,c\}$ with $U\subseteq X$ open iff $U$ is empty or contains $a$. Then $\{b,c\}$ is a closed set, being a complement of $\{a\}$. Let $f(b) = 1$ and $f(c) = -1$. This is continuous because the subspace topology on $\{b,c\}$ is discrete.
This has no continuous extension to all of $X$. To see this, let $F:X\rightarrow [-1,1]$ be any set theoretic extension. By swapping $b$ and $c$, we may assume wlog that $F(a) \neq F(b)$. By Hausdorffness of $[-1,1]$, we may choose an open neighborhood $U$ of $[-1,1]$ containing $F(b)$ but not $F(a)$ or $F(c)$. Then $F^{-1}(U) =\{b\}$ which is not open, so $F$ isn't continuous.
Solution 3:
And here, to complement Jason's non-$T_1$ example, is a fairly simple completely regular example. Let $A$ be a set of cardinality $\omega_1$, $p$ a point not in $A$, and $X=A\cup\{p\}$. Topologize $X$ by making each point of $A$ isolated and giving $p$ a nbhd base of all sets of the form $X\setminus C$ such that $C$ is a countable subset of $A$. Let $Y=\Bbb N$, topologized by making each point of $\Bbb Z^+$ isolated and giving $0$ a nbhd base of sets of the form $\mathbb Z^+\setminus F$ such that $F$ is a finite subset of $\Bbb Z^+$. Finally, let $$Z=(X\times Y)\setminus\{\langle p,0\rangle\}$$ as a subspace of the product space $X\times Y$, let $H=A\times\{0\}$, and let $K=\{p\}\times\Bbb Z^+$.
Clearly $H$ and $K$ are disjoint closed subsets of $Z$. Suppose that $f:Z\to\Bbb R$ is continuous, and $f[K]=\{0\}$. Fix $n\in\Bbb Z^+$. For each $k\in\Bbb N$ let $$V_n(k)=f^{-1}\left[(-2^{-k},2^{-k})\right]\cap\Big(X\times\{n\}\Big)\;;$$ $V_n(k)$ is an open nbhd of $\langle p,n\rangle$ in $Z$, so there is a countable $C_n(k)\subseteq A$ such that $$V_n(k)=\Big(X\setminus C_n(k)\Big)\times\{n\}\;.$$ Now let $$\begin{align*}C&=\bigcup_{\langle n,k\rangle\in\Bbb Z^+\times\Bbb N}C_n(k)\text{ and}\\\\V&=X\setminus C\;;\end{align*}$$ $C$ is countable, so $V$ is an open nbhd of $p$ in $X$, and $f$ is constantly $0$ on $V\times\Bbb Z^+$. In particular, for any $x\in V\cap A$, $f(x,n)=0$ for all $n\in\Bbb Z^+$, so by continuity $f(x,0)=0$. Thus, $f$ must be $0$ on all but countably many points of $H$ and therefore cannot separate $H$ and $K$.