# On idempotent continuous functions

Let $e$ be an idempotent element of $C(X)$ (where $X$ is a tychonoff space) such that if $f \in C(X)$ and $0 \leq f \leq e$ then $f = ce$ for some constant value $c$. I want to show that $e$ is the characteristic function of a singleton.

-

First of all, $e(x)$ is either $0$ or $1$ for all $x$ because $e(x)^2 = e(x)$. For the sake of contradiction, suppose now that there are two distinct points $x, y$ such that $e(x) = e(y) = 1$. Now by Tychonoff property, there exists a function $f \in C(X)$ such that $f(x) = 0$ and $f(y) = 1$. The function $g$ defined by $g(z) := \min\{e(z), f(z) \}$ is continuous (this is a nice little exercise itself) and such that $0 \leq g \leq e$. Therefore $g = ce$ which implies both $c=1$ and $c=0$, which is absurd, so we are done.