Fake counterexample to If every closed and bounded subset of a metric space M is compact, does it follow that M is complete

real-analysis

I am just starting to self studying Pugh's Real Analysis (note although this is an easy question, it is not homework. I am in HS and out of classes, and I wanted to learn some stuff) I found the question answered here: If every closed and bounded subset of a metric space $M$ is compact, does it follow that $M$ is complete?, but I am just trying to understand why my counterexample does not work.

Counterexample: consider $M = \mathbf{R} \setminus \{0\}$. Every closed and bounded subset is compact, because any closed interval $[a,b]$ where $a,b > 0$ or $a,b < 0$ is compact. However, $M$ is not complete; for example take $a_n = \frac{1}{n}$.

Best Answer

Welcome to math.SE!

Consider the interval $I=\left(0,1\right]$. Clearly $I$ is bounded.

The complement of $I$ in $\mathbb{R}\setminus\{0\}$ is $I^c = (-\infty,0)\cup(1,\infty)$. The set $I^c$ contains an open ball around each and every point, and is therefore open. Thus, by definition its complement $I$ is closed.

However, $I$ is not compact, since e.g. sequence $n \mapsto \frac{1}{n}$ has no convergent subsequence.