The following question is from Chapter IX in Linear Operaotrs edited by Dunford & Schwartz, Exercise 4.1
Let $S$ be a compact Hausdorff topological space and $C(S)$ be all complex continuous functions defined on $S$. For a $f \in C(S)$, let $f^*(x) = \overline{f(x)}$ be the involution. Now assume $\mathfrak{A}$ is a closed unital self-adjoint subalgebra of $C(S)$. Then show that there exists a decomposition of $S$ into a (disjoint) union of closed sets (say $\dot\bigcup_{\lambda \in \Lambda} F_{\lambda}$) on each of which all elements of $\mathfrak{A}$ will be constant($\forall\,f \in \mathfrak{A}\,\forall\,\lambda \in \Lambda, f\vert_{F_{\lambda}}$ is constant), and such that each continuous function that is constant on each $F_{\lambda}$ belongs to $\mathfrak{A}$.
It is proved that in a compact Hausdorff space $X$, each closed ideal $\mathcal{I}$ in $C(X)$ injectively correspond to a closed set $F \subset X$ such that $\mathcal{I} = \mathcal{I}_F = \{g \in C(X)\,\vert\,g\vert_F = 0\}$. In the above question, I do not know how to use this result. Should we partition $\mathfrak{A}$ by intersection of ideals?
Any hints will be appreciated.
Hint: Thinking in terms of decompositions into closed sets here is rather misleading. Rather, what you want to think about is the equivalence relation on $S$ defined by the partition of $S$ into the $F_\lambda$. Can you describe what that equivalence relation ought to be, in terms of $\mathfrak{A}$? (What equivalence relation does $\mathfrak{A}$ naturally define on $S$, such that each element of $\mathfrak{A}$ is constant on the equivalence classes?) Now use Stone-Weierstrass on the quotient of $S$ by this equivalence relation to show that it has the desired properties.
More details are hidden below.