8.15 Theorem If $f$ is continuous (with period $2\pi$) and if $\epsilon>0$, then there is a trigonometric polynomial $P$ such that $$\left|P(x)-f(x)\right|<\epsilon$$ for all real $x$.
Proof If we identify $x$ and $x+2\pi$, we may regard the $2\pi$-periodic functions on $\mathbb{R}^1$ as functions on the unit circle $T$, by means of the mapping $x\rightarrow e^{ix}$. The trignometric polynomials, i.e., the functions of the form $$Q(x)=\sum^N_{-N} c_ne^{inx}\qquad(x\mbox{ real})$$ form a self-adjoint algebra $\mathscr{A}$, which separates points on $T$, and which vanishes at no point of $T$. Since $T$ is compact, the Stone-Weierstrass theorem tells us that $\mathscr{A}$ is dense in $\mathscr{C(T)}$. This is exactly what the theorem asserts.
I need some help to understanding this proof. I think by "regard $f$ as a function on $T$" means that we define a function $g$ on $T$ by $$ g(t) = f(x) $$ where $t=e^{ix}$. Since the mapping $x\rightarrow e^{ix}$ is 1-1 on $[0,2\pi)$ and $f$ is $2\pi$-periodic, $g$ is well-defined. I think by "algebra of trigonometric polynomials", he mean algebra of polynomials with complex coefficient, i.e., functions of the form $$P(t)=c_0+c_1 t+\cdots+c_n t^n\qquad(t\in T)\mbox{.}$$ By the Stone-Weierstrass Theorem, there exists a sequence of polynomials $\{P_n\}$ on $T$ such that $P_n\rightarrow g$ uniformly. Hence $$\left| P_n(t)-f(x)\right|<\epsilon$$ if $t\in T$, $t=e^{ix}$ for all large $n$. And $P_n(e^{ix})$ is the trignometric polynomial we want. Am I correct?