[Math] Is this proof correct?($\mathbb{Q}$ is not locally compact)

compactnessgeneral-topologyproof-verification

I am supposed to prove that $\mathbb{Q}$ is not locally compact. The definition of locally compactness is:

A space $X$ is said to be locally compact at x if there is some
compact subspace C of X that contains a neighborhood of x. If X is
locally compact at each of its points, X is said simpy to be locally
compact.

Attempt at proof:

Look at the number 0. Assume that there is some compact subset A in $\mathbb{Q}$, that contains a neighborhood around 0. Then it must conain an interval around zero.

Look at the identity function from $\mathbb{Q}\rightarrow \mathbb{R}$, this is a continuous function, so $f(A)$ must also be compact in $\mathbb{R}$. But $f(A)$ contains an interval of rational numbers around zero, so we can find an irrational number close to zero, that is "between" rational numbers close to zero, every interval around this neighborhood will contain rational numbers, hence f(A) is not a closed subset of $\mathbb{R}$.

But since $\mathbb{R}$ is Hausdorff, every compact set, must be closed, hence we have a contradiction, and $f(A)$ can not be closed.

Can I prove it this way?, it is a little messy. I wasn't able to show it directly with the open covering property, that is: If we are in $\mathbb{Q}$: for every set around a rational number, containing a neighborhood of the rational number, this set can not have the open covering property, is it hard to prove it directly?

Best Answer

You could express it a bit better, but the argument is basically correct.

Suppose that $C$ is a compact subset of $\Bbb Q$ that contains an open nbhd of $0$; then there is an $\epsilon>0$ such that $(-\epsilon,\epsilon)\cap\Bbb Q\subseteq C$. Let $f:\Bbb Q\to\Bbb R$ be the identity map; $f$ is continuous, so $f[C]$ is compact, and $f[C]\supseteq f[(-\epsilon,\epsilon)\cap\Bbb Q]=(-\epsilon,\epsilon)\cap\Bbb Q$. But $\Bbb R$ is Hausdorff, so the compact set $f[C]$ must be closed, and therefore $f[C]\supseteq\operatorname{cl}_{\Bbb R}\big((-\epsilon,\epsilon)\cap\Bbb Q\big)=[-\epsilon,\epsilon]$. This, however, is impossible, since $f[C]$ is countable, and $[-\epsilon,\epsilon]$ is not.