Is $C^{\infty}[0,1]$ or $S$ separable?

I want to know if $C^{\infty}[0,1]$ or $S$ (Schwartz function space) is separable. Can somebody offer me some results or references? Thank you!

-
This site is probably not a good fit for this question, as it is intended for professional mathematicians who have questions arising in their research. You might try the site mathstackexchange.com instead. – Todd Trimble Mar 10 '13 at 2:48
Both are nuclear Fréchet spaces and both have Schauder bases, each of which imply separability (reference: "Nuclear locally convex spaces" by Albrecht Pietsch, for example). – jbc Mar 10 '13 at 5:09
Thank you. I found the proof in the book you mentioned. – Danqing Mar 10 '13 at 7:28
Todd: I have been thinking a little about this question today and I am not so sure it is sufficiently obvious to be "below MO level". – Yemon Choi Mar 10 '13 at 7:50
If one wants a more direct proof which uses the Weierstrass theorem, one can proceed as follows: there is a standard method to embed $C^\infty(I)$ as a closed subspace of a countable product of copies of $C(I)$ (simply map $f$ onto the sequence $(f^{(n)}$ of its derivatives). The latter is separable. – jbc Mar 10 '13 at 9:03

We need the following extension of Weierstrass approximation theorem:

Let $f$ be a smooth function on $[0,1]$. Then we can find a sequence $\{P_n\}$ of polynomials such that $(P_n^{(d)})$ converges uniformly to $f^{(d)}$ for each integer $d$.

To see that, we first notice that for each integer $d$, we can find a sequence $(P_{d,n})$ such that $\displaystyle\lim_{n\to \infty}\max_{0\leqslant k\leqslant d}\sup_{x\in [0,1]}|f^{(k)}(x)-P_{d,n}(x)|=0$ (approximate $f^{(d)}$ by the classical theorem, then integrate adequately). For each $d$ and $j$, consider $n(d,j)$ such that $\max_{0\leqslant k\leqslant d}\sup_{x\in [0,1]}|f^{(k)}(x)-P_{d,n(d,j)}(x)|<\frac 1{j+d}$, then take $P_j:=P_{j,n(j,j)}$.

So polynomials with rational coefficients are dense in $C^{\infty}[0,1]$.

For the Schwartz space, we can use jbc idea's: let $C_0(\mathbb R)$ be the space of functions form $\mathbb R$ to $\mathbb R$ which vanish at infinity (endowed with the supremum norm), and $X:=C_0(\mathbb R)^{\mathbb N\times\mathbb N}$. We can embed $\mathcal S(\Bbb R)$ in a closed subspace of $X$ (for the product metric) by $\iota\colon\mathcal S(\mathbb R)\to X$, $\iota(f):=(x^kf^{(d)}(x))_{(k,d)\in\mathbb N\times\mathbb N}$. As $X$ is separable, so is $\mathcal S(\mathbb R)$.

Also, deeper reasons have been mentioned in the comments.

-

In addition to other good answers and comments, a small variation may be of interest. If we replace $C^\infty[0,1]$ by $C^\infty(\mathbb T)$ with circle $\mathbb T$, then the standard Levi-Sobolev theory shows that $C^\infty(\mathbb T)=H^\infty(\mathbb T)$, and for every real $s$ the $s$-th Levi-Sobolev space $H^s(\mathbb T)$ has an orthogonal basis of the usual exponentials. Of course, their lengths change with $s$. Thus, rational linear combinations of exponentials give a countable dense subset.

An only slightly-less-known version for the Schwartz space is to observe that it is a sort of $H^\infty$ space for the ("Schrodinger"?) differential operator $S=-\Delta+x^2$ in place of just $-\Delta$ for the "usual" Levi-Sobolev spaces: $|f|^2_s=\langle S^kf,f\rangle$. Similar to the usual Rellich-Kondrachev compactness, the inclusion $H^1\rightarrow L^2(\mathbb R)$ is readily shown to be compact, so $S$ has compact resolvent, and discretely decomposes $L^2(\mathbb R)$. The orthogonal basis of eigenfunctions for every $H^s$ is Hermite polynomials times suitable Gaussians. (The latter fact admits various proofs, both via Weierstrass approximation, and via the raising (creation) and lowering (annihilation) operators.)

Thus, rational multiples of Hermite polynomial multiples of suitable Gaussians are a rational dense subset.

-
Since we are looking at this situation in more detail, we might as well go the whole hog. In a short and elegant paper (Math. Ann. vol. 164), Pietsch showed that for a self-adjoint operator on Hilbert space (not necesarily bounded), the intersection of the domains of definition of its powers is a Fréchet space in a natural way. He gives three main examples and these are precisely the three which appear here. The resulting space is separable (if the Hilbert space is) and he gives simple characterisations of when it is Montel or nuclear, using growth conditions om the eigenvalues. – jbc Mar 11 '13 at 12:06
Ah, good, I didn't know a reference for this. Looking in MathSciNet for a few more details: it is Über die Erzeugung von $(F)$-Räumen durch selbstadjungierte Operatoren", Math. Ann. 164 1966 219–224. – paul garrett Mar 11 '13 at 13:03