I know this question has been asked to death, but I wish to prove that $\mathbb{Q}$ is not locally compact with a use of a lemma I have not seen used in the other proofs.
Lem:
Given $(X, \mathfrak{T})$ Hausdorff, then it is locally compact iff every point is contained in an open set with compact closure
My attempt:
Since $\mathbb{Q}$ is a subspace of $\mathbb{R}$, therefore $\mathbb{Q}$ is Hausdorff given that Hausdorffness is arbitrarily hereditary.
To show that $\mathbb{Q}$ is not locally compact, we wish to produce a point $x \in \mathbb{Q}$ that is contained in an open set without a compact closure.
Let $U = (a,b) \subset \mathbb{R}$. Then $U \cap \mathbb{Q}$ is an open set in the subspace topology. Pick $x \in U \cap \mathbb{Q}$, then $x \in U \cap \mathbb{Q} \subseteq \overline {U \cap \mathbb{Q}}$. (Alarm bells: $\overline {A \cap B}$ might not be equal to $\overline A \cap \overline B$)
Now we need to show that $ \overline {U \cap \mathbb{Q}}$ is not compact...however intuitively this set feels like $[a,b] \subset \mathbb{R}$...
What!
Does anyone see how to resolve this? Thanks so much
Also there is another answer using a much simpler characterization Why Q is not locally compact, connected, or path connected? Can we see that the lemma I am using and the one given https://math.stackexchange.com/a/650270/174904 is equivalent?