Weierstrass theorem.
Lef $f$ be a defined and continuous function in $[a,b]$. Given $\epsilon>0,$ there exists a polynomial $P$ such that $\vert f(x)-P(x)\vert<\epsilon,$ for all $x\in[a,b].$
Stone-Weierstrass theorem.
Let $X$ be a topological compact space. If $F$ is an algebra of $C(X)$ that separate points and contains the constant functions then $F$ is dense with respect to the uniform convergence in $C(X).$
How is that an algebra $F$ of $C(X)$ that separate points and contains the constant functions is the generalization of $P(x)$ ?
Can someone shed some light on this?
The set of polynomials defined on $[a,b]$ is an algebra of $C([a,b])$ that separate points (for all $x,y\in[a,b]$ such that $x\neq y$, there exists a polynomial $P$ such that $P(x)\neq P(y)$) and contains the constant functions.