Two definitions of locally compact space

I have seen two definitions of locally compact topological space

  • A topological space $(X,\mathcal{F})$ is said to be locally compact if for every $x\in X$, there exists a compact set that contains an open neighborhood of $x$.
  • A topological space $(X,\mathcal{F})$ is said to be locally compact if for every $x\in X$, there exists an open neighborhood of $x$ whose closure is compact.

Are these two definitions equivalent? It's clear that the second implies the first, but I don't see why the first implies the second. Suppose that $U $ is an open neighborhood of $x$ with $x\in U\subset K$, here $K$ is a compact set. Since compact sets may not be closed in a non-Hasudorff topological space, the closure of $U$ may not be contained $K$, so we can't say the closure of $U$ is compact.


Solution 1:

Let $X$ be a line with infinitely many origins, i.e. the space obtained by gluing together infinitely many copies of $\mathbb{R}$ along the open subset $\mathbb{R}\setminus\{0\}$.

Each point of $X$ has an open neighborhood homeomorphic to $\mathbb{R}$, so $X$ satisfies definition 1. But the closure of any neighborhood of one of the origins cannot be compact, since it contains an infinite discrete set as a closed subspace, so $X$ does not satisfy definition 2.

We could also glue together infinitely many copies of the Sierpinski space for a similar counterexample.