Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm having trouble proving an exercise in Folland's book on real analysis.

Problem: Consider a locally compact Hausdorff space $X$. If $K\subset X$ is a compact $G_\delta$ set, then show there exists a $f\in C_c(X, [0,1])$ with $K=f^{-1}(\{1\})$.

We can write $K=\cap_1^\infty U_i$, where the $U_i$ are open.

My thought was to use Urysohn's lemma to find functions $f_i$ which are 1 on $K$ and $0$ outside of $U_i$, but I don't see how to use them to get the desired function. If we take the limit, I think we just get the characteristic function of $K$.

I apologize if this is something simple. It has been a while since I've done point-set topology.

share|cite|improve this question
up vote 2 down vote accepted

As you have said, we can use Urysohn's lemma for compact sets to construct a sequence of functions $f_i$ such that $f_i$ equals $1$ in $K$ and $0$ outside $U_i$.

Furthermore, $X$ is locally compact, so there is an open neighbourhood $U$ of $K$ whose closure is compact. We can then assume without loss of generality that $U_i\subseteq U$

Then we can put $f=\sum_i2^{-i} f_i$. Clearly, $f^{-1}[\{1\}]=K$. Moreover, $f$ is the uniform limit of continuous functions (because $f_i$ are bounded by $1$), so it is continuous, and its support is contained in $U$, so $f$ is the function you seek.

share|cite|improve this answer
Excellent, thank you. – Potato Jul 7 '12 at 2:58

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.