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!



Is $C^{\infty}[0,1]$ or $S$ separable?
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.


