Dense sets in the space of continuous functions

Let $X$ be a compact metric space, and let $C(X)$ be the Banach space of continuous real-valued function on $X$, with the maximum norm.

Suppose $S\subset C(X)$ is a set of functions with the following property:

For every ball $B(a,r)\subset X$ and for every $\epsilon>0$, there exists a function $f\in S$ such that:

(i) $0\leq f(x)\leq 1$ for all $x\in X$,

(ii) $f(a)=1$,

(iii) $|f(x)|<\epsilon$ for $x$ outside the ball $B(a,r)$.

My question: does the above assumption on $S$ imply that the set $S$ spans $C(X)$, that is that every continuous function on $X$ can be arbitrarily approximated (in the max norm) by finite linear combinations of functions in $S$?

(An answer in the special case $X=[0,1]$ would also be of interest to me).

-
No. For $X=[0,1]$, you can let $S$ be the set of functions with $\int_0^1f(x)\,dx=0$. – George Lowther Sep 20 2011 at 20:42
Thanks George... I have corrected the question to demand that the functions in $S$ be positive. This is the situation I am really interested in. – guykatriel Sep 20 2011 at 20:49
... and bounded from above by $1$ – guykatriel Sep 20 2011 at 20:55
Still no. Let $\mu$ be any finite signed measure on $[0,1]$ whose positive and negative parts $\mu^+,\mu^-$ have full support (nonzero measure on every nonempty open set). Then let $S\subseteq C([0,1])$ be the functions $f$ with $\int f\,d\mu=0$. – George Lowther Sep 20 2011 at 20:57
...ok, bounded above by one. Still no, with the example I just gave (the signed measure just has to have no atoms for $S$ to satisfy your property). – George Lowther Sep 20 2011 at 20:59
show 1 more comment

No, $S$ does not have to span $C(X)$.

Taking the case with $X=[0,1]$, let $\mu$ be any atomless finite signed measure whose positive and negative parts $\mu^+$,$\mu^-$ have full support, so that $\mu^+(U) > 0$ and $\mu^-(U) > 0$ for any nonempty open $U$. Then, the set $S=\{f\in C(X)\colon\int f\,d\mu=0\}$ satisfies your properties, is closed in $C(X)$, but is not all of $C(X)$.

To see that $S$ satisfies your properties, consider any $a\in U$ for $U$ an open subset of $X$. Then choose $r > 0$ such that $V=U\setminus \bar B_r(a)$ is nonempty. There exists a nonnegative $g\in C(X)$ with support in $V$ such that $\mu(g) > 0$. Otherwise we would have $\mu^+(S)\le\mu^-(S)$ for all Borel $S\subseteq V$, which would imply that $\mu^+(V)=0$ contradicting the assumption that $\mu^+$ has full support. Similarly, there is a nonnegative $h\in C(X)$ with support in $V$ and $\mu(h) < 0$. By scaling, we can assume that $g,h$ are bounded by $1$.

Now, the functions $f_n(x)=\max(1-n\vert x-a\vert,0)$ have support in $B_r(a)$ (for $n > 1/r$) and decrease to $1_{\{x=a\}}$ as $n\to\infty$. As $\mu$ is atomless, we have $\mu(f_n)\to0$. Choosing $n$ large enough that $\mu(h) < \mu(f_n) < \mu(g)$ then $f=f_n+\lambda h$ or $f=f_n+\lambda g$ will satisfy $\mu(f)=0$ for some $0\le\lambda\le1$. But, $f\in S$ satisfies (i) $0\le f\le1$, (ii) $f(a)=1$, and (iii) $f=0$ outside of $U$.

As such measures $\mu$ will always exist on any compact metric space without isolated points, your conclusion does not hold on any compact metric space other than when $X$ is countable.

-
 Can you clarify one point: why would $\mu^+(S)\leq \mu^-(S)$ for all Borel $S\subset V$ imply that $\mu^+(V)=0$? I think you have to posit in advance that the measure $\mu$ is not positive and not negative on any open set. – guykatriel Sep 21 2011 at 7:02 .. I mean: to posit that the restriction of $\mu$ to any open set is not a positive measure and not a negative measure. – guykatriel Sep 21 2011 at 7:12 @guykatriel: By the Hahn-Jordan decomposition you have a Borel set $A$ with $\mu^+(E)=\mu(E\cap A)$ and $\mu^-(E)=-\mu(E\setminus A)$ for all $E$. If $\mu^+(S)\le\mu^-(S)$ for all Borel $S\subseteq V$ then that would imply $$0\le\mu^+(V)=\mu^+(V\cap A)\le\mu^-(V\cap A)=0.$$ – George Lowther Sep 21 2011 at 22:16