0

Does the fact that $\mathbb{Q}$ is not locally compact as a subspace of $\mathbb{R}$ generalise to the following?

If $X$ is a Hausdorff topological space with a subset $Y \subseteq X$ such that both $Y$ and $X \setminus Y$ are dense in $X$, then every point of $Y$ has no compact neighbourhoods in $Y$ (thus, if $X$ is non-empty, $Y$ is not locally compact).

1 Answers1

1

I have tried generalising the proof in user531587's answer:

Let $y \in Y$ and suppose that there is a compact neighbourhood $K$ of $y$ in $Y$. Then there is an open set $O$ of $X$ such that $y \in O \cap Y \subseteq K$. Let $\alpha \in X \setminus Y$ with $\alpha \in O$, and consider a net $(y_i)_{i\in I}$ in $O \cap Y$ such that $y_i \to \alpha$ in $X$. Since $K$ is compact in $Y$, it is also compact in $X$, and thus closed in $X$. Hence, $\alpha \in K$, so $\alpha \in Y$, contradicting the fact that $\alpha \in X \setminus Y$.