Artificial intelligent assistant

Counter example to Stone Weierstrass Theorem If we miss some conditions of Stone Weierstrass Theorem, will this theorem still hold? I have come up with counter examples when we do not have compact metric space. But what if the function algebra does not separate points, or it vanishes somewhere? Thanks!

If the algebra $A$ does not separate points on $X$ (a compact metric space), then there exist distinct points $a, b\in X$ such that $f(a)=f(b)$ for all $f\in A.$ If $A$ were dense in $C(X),$ then every $f\in C(X)$ would satisfy $f(a)=f(b).$ That's a contradiction, since $f(x) = d(x,a)$ belongs to $C(X).$

If the algebra $A$ vanishes somewhere, then the constant function $1$ is not the uniform limit of functions in $A.$

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 366afcfd8c8b044aef82572be0287b68