TITLE: Zero set in zero set need not be zero set
QUESTION [7 upvotes]: A subset $A$ of a topological space $X$ is called a zero-set if $A=f^{-1}(0)$ for some continous function $f:X\to\mathbb{R}$ or equivalently for some continuous $f:X\to[0,1]$.
What would be an example of a zero-set $M$ in a space $X$ such that there is a zero-set $A$ in the subspace $M$ that is not a zero-set in $X$ ?
Engelking exercise 2.1.B asks to find such an example with $X$ Tychonoff (= completely regular Hausdorff).
I can see that no such example can exist with $X$ normal. Indeed, suppose $A$ is a zero-set in $M$.  We can find a continuous $r:M\to[0,1]$ with $A=r^{-1}(1)$.  By the Tietze-Urysohn theorem, $r$ can be extended to a continuous function $g:X\to[0,1]$.  This is where the normality of $X$ comes into play.  Then, because $M$ is a zero-set in $X$ we can find a continuous $h:X\to[0,1]$ with $M=h^{-1}(1)$.  The product $f=gh$ is exactly what we need: $f(x)$ is equal to $1$ exactly when both $g(x)$ and $h(x)$ are $1$, namely when $x\in M$ and $r(x)=1$, which is exactly when $x\in A$.  (Replace $f$ with $1-f$  in the end if you want a proper zero-set.)

REPLY [9 votes]: Consider the Moore plane (or, as Engelking calls it, the Niemytzki plane). That is the set $\mathbb{L} = \{ \langle x,y\rangle \in \mathbb{R} \times \mathbb{R} : y \geq 0 \}$ with the "tangent disc" topology. Note that the $x$-axis $M = \{ \langle x , 0 \rangle : x \in \mathbb{R} \}$ is a zero set in $\mathbb{L}$. (Consider the function $f( x,y) = \frac{y}{y+1}$, for example.)
As $\mathbb{L}$ is separable, there are at most $\mathfrak{c} = 2^{\aleph_0}$ continuous functions $\mathbb{L} \to [0,1]$, and so at most $\mathfrak{c}$-many zero sets in $\mathbb{L}$. (Any continuous function $\mathbb{L} \to [0,1]$ is determined by its restriction to a countable dense subset, and there are $\mathfrak{c}^{\aleph_0} = \mathfrak{c}$ many functions from a countable set into $[0,1]$.)
However $M$ is a discrete subspace of $\mathbb{L}$. This means that every function $M \to [0,1]$ is continuous, and so every subset of $M$ is a zero set in $M$. That is, there are $2^{|M|} = 2^\mathfrak{c}$ many zero sets in $M$.
As $2^\mathfrak{c} > \mathfrak{c}$ it follows that some (most) zero set in $M$ is not a zero set in $\mathbb{L}$.
For an explicit example, one can use a Baire Category argument to show that $A = \{ \langle x,0 \rangle : x \in \mathbb{Q} \} \subseteq M \subseteq \mathbb{L}$ is a zero set in the zero set $M$ which is not a zero set in $\mathbb{L}$.

If $f : \mathbb{L} \to [0,1]$ is continuous, and $f(\mathbf{x}) > 0$ for all $\mathbf{x} \in \mathbb{L} \setminus A$, then for each irrational $x \in \mathbb{R}$ there are $n_x, m_x \in \mathbb{N}$ such that $f( \langle u,v \rangle ) > \frac{1}{n_x}$ for all $\langle u,v \rangle \in V_{\frac{1}{m_x}} ( \langle x,0 \rangle)$, where for $r > 0$ $V_r ( \langle x,0 \rangle ) = \{ \langle x,0 \rangle \} \cup \{ \langle u,v \rangle \in \mathbb{L} : ( u-x)^2 + (v-r)^2 < r^2 \}$. By the Baire Category Theorem there are $n,m \in \mathbb{N}$ and $a < b \in \mathbb{R}$ such that the closure of the set $E = \{ x \in \mathbb{R} \setminus \mathbb{Q} : n_x = n, m_x = m \}$ (in the usual topology on $\mathbb{R}$) includes $(a,b)$. Given any rational $x^\prime \in (a,b)$ one can show that for each $r > 0$ there is an $x \in E \cap (a,b)$ such that $V_r ( \langle x^\prime,0 \rangle ) \cap V_{\frac{1}{m}} ( \langle x,0 \rangle ) \neq \emptyset$. By continuity — and the definitions of everything involved — this implies that $f( \langle x^\prime , 0 \rangle ) \geq \frac{1}{n}$. Thus $A$ is not the zero set of $f$.