The Stone-Weiestrass convergence for polynomials in different bases The most primitive formulation of the Stone-Weiestrass theorem states that any continuous functions, $f(x)$, defined on $[0, 1]$ can be uniformly approximated by a polynomial, $p(x)$, to an arbitrary precision. Basically, for any given function, we can design a sequence of polynomials, $p_n(x)$, of degree $n \rightarrow \infty$ that converges to $f(x)$ in the supremum norm.
My (potentially naive) confusion is about the definition of polynomial in this context. The theorem talks about a sequence of subspaces of polynomials, $\mathcal{P}_n \subset \mathcal{C}[0, 1]$, from which $p_n$'s are selected. Hence, I would like to know:


*

*How is $\mathcal{P}_n$ defined? Is it just a subspace spanned by $1, x, x^2, \dots, x^{n-1}$? How about other types of polynomials in different bases, such as Fourier and Chebyshev polynomials? Do the spans of the first $n$ elements in these bases correspond to the span in the monomial basis?

*Can we say something about convergence rates for polynomials in different bases? Is there a general technique to derive the rate of convergence (with respect to supremum norm)? [Probably, this is beyond the Stone-Weierstrass result.]
EDIT:
As @NateEldredge points out, the theorem does not require elements of the sequence, $p_n$, to correspond to subspaces $\mathcal{P}_n$. Though, the constructive proof uses a sequence of Bernstein polynomials, $B_n(x)$, that actually correspond to a sequence of subspaces, $\mathcal{P}_n$.
To reformulate my Q1, how can we re-express each element of the Bernstein sequence that approximates $f(x)$ in a different basis (e.g., Fourier or Chebyshev) and how would it look like? Are Bernstein polynomials of finite rank in the Fourier/Chebyshev basis?
The second question is still open. I would appreciate any references to the literature.
 A: Regarding the density of the span of monomials in the algebra of continuous functions with the uniform norm, there is the Müntz–Szász theorem. One simple version says that a necessary and sufficient condition for the monomials $x^n, n \in S\subset \mathbb{N}$ to span a dense subset of $\mathcal{C}[a,b]$ of all continuous functions with complex  values on the closed interval $[a,b]$ with $a > 0$, is that the series $\sum_{n \in S}\frac{1}{n}$ diverges (see the link and the references therein to see what to do with $a=0$).
There cannot be a really general technique for establishing the rate of convergence because there is always going to be a continuous function for which the convergence rate is arbitrarily slow. This follows from the Bernstein Lethargy theorem, https://en.wikipedia.org/wiki/Lethargy_theorem
For every individual continuous function $f$, however, an estimate is available in terms of modulus of continuity $\omega_f$ of $f$. A theorem by Dunham Jackson from 1930 says that if $f$ is continuous on $[-1,1]$, then there exists a sequence of polynomials $J_n(f)$ such that the degree of $J_n$ is $\leq n$ and $\|J_n(f)-f\|\leq C\omega_f(1/n)$ (where C is a constant). The article MR0246032 (39 #7338)
Bojanić, R.
A note on the degree of approximation to continuous functions.
Enseignement Math. (2) 15 1969 43–51.
has some information on how to get polynomials achieving this rate of approximation.
Jackson also established several results expressing the relation between the smoothnes of function and the rate of its polynomial (or trigonometric) approximation.
A: There is a version of Stone-Weirstrass which says that an algebra of continuous functions  defined on a compact topological space $K$  which contains the constants and separate the points: i.e, for every $x\neq y\in K$, there exists $f\in F$ such that $f(x)\neq f(y)$ is dense in $C(K,R)$.
