Tietze extension theorem with non-closed domain What happens if the domain is not closed in the Tietze extension theorem?
Here is the Tietze theorem:

Let $T=(S,\tau)$ be a topological space which is normal. Let $A\subseteq S$ be a closed set in $T$. Let $f:A\to\Bbb R$ be a continuous mapping from $A\subseteq S$ to the real number line under the usual topology. Then there exists a continuous extension $g:S\to\Bbb R$, i.e., such that $f(s)=g(s)$ for each $s\in A$.


Then the extension (your $g$) need not exist.  Examples of failure (all sets have the usual topology):


*

*Let $T = [0,1]$ and $A = (0,1]$ be subsets of $\Bbb{R}$ and let $f(x) = 1/x$.  It's pretty clear $f$ is continuous on $A$, but cannot be extended to a continuous function on $T$.

*Let $T = [-1,1]$ and $A = T \setminus \{0\}$ and let $f$ be the unit step function, i.e. $f(x) = \begin{cases} 0, &x < 0, \\ 1, &x > 0 \end{cases}$.  What value should $g$ have at $0$?

*Let $T = [0,1]$ and $A = (0,1]$ be subsets of $\Bbb{R}$ with the usual topology and let $f(x) = \sin(1/x)$.  What value should $g$ have at $0$?

*Let $T$ be the Riemann sphere and $A = T \setminus \infty$ and let $f(z) = z$.  (Equivalently, let $T$ be the closed disk, $A$ the disk without the origin, and let $f(z) = 1/z$, frustrating the Riemann removable singularity theorem.)

