# Is it true that a set is compact iff it is closed, bounded, and has finite measure?

I'm sure that this holds for $\mathbb{R}^n$ and for $L^p$ spaces. Is it true in general?

-
I do not understand what you are asking: in $\mathbb{R}^n$ mentioning "finite measure" is superfluous, so this must have something to do with "$L^p$ spaces", but what do you mean? –  commenter Oct 29 '12 at 2:58
$L^p$ spaces are just an example of infinite-dimensional metric spaces. In $\mathbb{R}^\infty$, for example, the size-1 closed $\epsilon$ ball is closed and bounded, but not compact, since the sequence of basis vectors has no convergent subsequence. –  GMB Oct 29 '12 at 3:10
Thanks! I understand what $L^p$-spaces are, but I am unaware of a notion of finite measure in them that guarantees compactness of closed and bounded sets. That's what I was curious about. –  commenter Oct 29 '12 at 3:30

Here’s a counterexample. For $A\subseteq\Bbb N$ let $\mu(A)=\sum_{n\in A}2^{-n}$, and for $m,n\in\Bbb N$ let $$d(m,n)=\begin{cases}1,&\text{if }m\ne n\\0,&\text{if }m=n\end{cases}\;.$$
Then $\langle\Bbb N,d\rangle$ is a metric space of diameter $1$ with the discrete topology, so all subsets of $\Bbb N$ are bounded and closed. $\langle\Bbb N,\wp(\Bbb N),\mu\rangle$ is a measure space in which every measurable set has finite measure. Thus, every $A\subseteq\Bbb N$ is closed, bounded, and of finite measure, but only the finite sets are compact.
No, it's not true in general. Consider the following topology on $\mathbb{N}$: A set is open if it's of the form $\{n, n + 1, \dots\}$. All open sets are compact and unbounded in this topology. Furthermore, if you equip this space with the counting measure, you'll have compact sets with infinite measure.