TITLE: The ring of idempotents
QUESTION [10 upvotes]: Let $R$ be a commutative ring. Then its ring of idempotents $I(R)$ consists of the idempotent elements of $R$, with the same multiplication as in $R$, but with the new addition $x \oplus y := x+y-2xy$. (This addition might look a bit mysterious, but when we identify idempotent elements with the clopen subsets of $\mathrm{Spec}(R)$  via $x \mapsto D(x)$, then $I(R)$ is nothing else than the boolean algebra of clopen subsets with multiplication $\cap$ and addition $\Delta$.)
We obtain a functor $I : \mathsf{CRing} \to \mathsf{Bool}$, where $\mathsf{CRing}$ denotes the category of commutative rings and $\mathsf{Bool}$ the category of boolean rings. My question is: Does this functor $I$ have a left or right adjoint? Or does $I(R)$ have any universal property?

REPLY [4 votes]: This functor is represented by the free idempotent, or $\mathbb{Z}[x]/(x^2 - x) \cong \mathbb{Z} \times \mathbb{Z}$. The statement that the corresponding functor to sets in fact lifts to Boolean rings says that $\text{Spec } \mathbb{Z} \times \mathbb{Z}$ naturally has the structure of a Boolean ring object in $\text{Aff}$. This structure comes from the following general construction:
Let $C$ be a distributive category, by which I mean a category with finite coproducts and finite products such that the latter distribute over the former. The relevant example here is $\text{Aff}$. Let $1$ denote the terminal object, and let $2 = 1 + 1$. In $\text{Aff}$ the terminal object is $\text{Spec } \mathbb{Z}$ and hence $2$ is the spectrum of the free idempotent. 
Now I claim that there is a natural functor (of distributive categories) from $\text{FinSet}$ to $C$ sending the one-element set to $1$. I further claim that $2$ is naturally a Boolean ring object in $\text{FinSet}$ (in fact the full subcategory of $\text{FinSet}$ on the powers of $2$ is precisely the Lawvere theory of Boolean rings, or equivalently of Boolean algebras), and this structure gets transported to a Boolean ring structure on $2$ in $C$.