Completely metrizable implies $G_\delta$

It is a consequence of Lavrentyev's theorem that a metrizable space is completely metrizable if and only if it is a $G_\delta$ subset in every completely metrizable space containing it.

In my previous question, Theo and I later discussed something related in the comments and he mentioned that this can be extended.

Question: Suppose $X$ is a completely metrizable space, then for every $Y$ which is $\varphi$, we have that $X$ is a $G_\delta$ subset of $Y$.

We know from the aforementioned that $\varphi$ is at least $X\subseteq Y$ and $Y$ completely metrizable. Can this be generalized further, for example $Y$ is Hausdorff and first countable, etc?

-
Thanks for asking this, I was thinking about asking it myself. The best I found so far is Theorem 3.9 in Frolík, Generalizations of the $G_\delta$-property of complete metric spaces, Czechoslovak Mathematical Journal, vol. 10 (3) (1960), pp. 359-379, asserting that it holds for $Y$ completely regular. As I mentioned in our discussion, Royden in Real analysis, 3rd edition, Prop. 35 in Chapter 7.9 on p.165 claims that it holds for $X$ dense in a Hausdorff $Y$, but I still don't understand his argument. Maybe the 4th edition contains a clearer exposition. – t.b. Sep 9 '11 at 13:46
Something similar to Royden's Prop. 35. is stated as an exercise in Kelley's General Topology (on page 207 of the 1955 edition): "If there is a homeomorphism of a dense subset $Y$ of a Hausdorff space $X$ onto a complete metric space $Z$, then $Y$ is a $G_{\delta}$ in $X$." The hint amounts to Royden's argument and it is attributed to Sierpiński's paper here. Look for "Absolute $G_\delta$" in Kelley's index. – t.b. Sep 9 '11 at 13:50

Royden’s Proposition 35 in Section 7.9 is true, but his argument is seriously flawed. The heart of the argument is his Proposition 34, which is essentially this:

Proposition: Let $Y$ be a subset of a topological space $X$, and let $f:Y\to M$ be a continuous map into a complete metric space $(M,d)$. Then $f$ may be extended to a continuous function $\overline f:G\to M$, where $G$ is a $G_\delta$-set in $X$ and $Y \subseteq G$.

His proof seems to be seriously incomplete, in that it requires more than just filling in details; I can’t see any way to make it work without the additional assumption that $Y$ is dense in some $G_\delta$-set in $X$. (In fact it’s false as stated: see below.) In that case one can argue as in the proof of Kuratowski’s result: if $Y$ is a dense subset of $A$, a $G_\delta$ in $X$, the set $G = \{x\in A: \operatorname{osc}_f(x)=0\}$ is also a $G_\delta$ in $X$, and $f$ extends to $G$. In particular, if $Y$ is dense in $X$ we may take $A$ to be $X$ itself. (In this version it’s Theorem 4.3.20 in Engelking.) Fortunately, this is enough to give the desired result.

Theorem: Let $Y$ be a dense subset of a Hausdorff space $X$, and let $h:Y\to M$ be a homeomorphism of $Y$ onto a complete metric space $M$. Then $Y$ is a $G_\delta$-set in $X$.

Proof: Since $Y$ is dense in $X$, the corrected version of the proposition ensures that there are a $G_\delta$-set $G\supseteq Y$ and a continuous $\overline h:G\to M$ extending $h$. Let $f = h^{-1}\circ \overline h:G\to Y$, and let $g = \operatorname{id}_G:G\to G$; clearly $f \upharpoonright Y = g\upharpoonright Y = \operatorname{id}_Y$. The range $G$ is Hausdorff, so $f$ and $g$ agree on a closed subset of $G$ and hence on $G \cap \operatorname{cl}Y = G$. But then $f = g$, so $Y = \operatorname{ran}f = \operatorname{ran}g = G$, and $Y$ is therefore a $G_\delta$ in $X$.

Royden correctly requires $X$ to be Hausdorff, but apparently for the wrong reason: judging by his Exercise 8.30, to which he refers at this point, he thinks that he needs the domain of $f$ and $g$ to be Hausdorff to ensure that they’re identical, rather than the range. Here’s the exercise in question:

Let $A \subset B \subset \overline A$ be subsets of a Hausdorff space, and let $f$ and $g$ be two continuous maps of $B$ into a topological space $X$ with $f(u) = g(u)$ for all $u \in A$. Then $f \equiv g$.

Of course this is false, as may be seen by taking $A = \omega$, $B = \omega+1$, $X = \{0,1\}$ with non-empty open sets $\{0\}$ and $X$, $f$ the constant $0$ function on $\omega+1$, and $g$ the characteristic function of $\{\omega\}$ in $\omega+1$.

To see that Royden’s Proposition 34 is false as stated, let $D$ be a set of power $\omega_1$, and let $p$ and $q$ be two points not in $D$. Let $X = D \cup \{p,q\}$, and topologize $X$ as follows: points of $D$ are isolated, and the basic open nbhds of $p$ ($q$, resp.) are the sets of the form $\{p\} \cup (D \setminus C)$ ($\{q\} \cup (D \setminus C)$, resp.), where $C$ is any countable subset of $D$. Let $Y = \{p,q\}$. Let $M = \{0,1\}$ as a subspace of $\mathbb{R}$ with the usual metric, and define $f:Y\to M$ by $f(p) = 0$ and $f(q) = 1$. Then $f$ is a homeomorphism, but $p$ and $q$ don’t have disjoint nbhds in any $G_\delta$ containing both of them, so $f$ has no continuous extension to such a $G_\delta$.

-
Thank you, that clears up a lot! The examples couldn't be simpler, I guess. Here's a minor point that confused me in Royden as well as in your presentation of proof of the theorem. At the the very end you write "$Y = \operatorname{ran}f = \operatorname{ran}g = G$". Shouldn't that be the domain instead of the range? – t.b. Sep 10 '11 at 8:58
@Theo: I want to know that $Y=G$. I do know that $Y$ is the range of $f$, and I also know that $G$ is the range of $g$, so I want to show that the ranges of $f$ and $g$ are the same. (In case this turns out to be a question of terminology, my range is some people’s image, not codomain.) – Brian M. Scott Sep 10 '11 at 9:24
Oh, silly me. No, it's not a matter of terminology, I just confused myself yet again. You're of course right. Thanks! – t.b. Sep 10 '11 at 9:31
Many many thanks. I have taken some degree of freedom to correct a minor LaTeX typo :-) – Asaf Karagila Sep 11 '11 at 6:09
Brian: I'm not sure about what does $M$ being Hausdorff and $f=g$ on a closed subset of $G$ would have to imply that they agree on $G\cap\operatorname{cl}(Y)$. – Asaf Karagila Sep 13 '11 at 21:26