Functions on Stone spaces as "enveloping algebra" of Boolean algebra I'm looking for references for the following closely related facts:
Given a Boolean algebra $B$, I denote by $\mathbb{Z}[B]$ the free ring generated by symbols $e_b$ such that $e_b e_{b'} = e_{b \cap b'}$ and $e_b + e_{b'} = e_{b \cup b'}+ e_{b \cap b'}$.
Then:

*

*The $e_b$ are the only idempotent of $\mathbb{Z}[B]$.


*$\mathbb{Z}[B]$ identifies with the algebras of continuous function from the Stone spectrum of $B$ to $\mathbb{Z}$.
Ideally, I would like a proof that is constructive (using the localic Stone spectrum) and applies to ``non-unital'' Boolean algebras, but the closest approximation would already be good.
 A: Given a Boolean algebra, unital or non-unital, and a commutative ring $K$, the $K$-algebra $K[B]$ given by the generators and relations you give is isomorphic to the ring $C_c(\widehat B,K)$ of locally constant $K$-valued functions on the Stone space $\widehat B$ with compact support.
The intuitive reason is that if $\mathfrak p$ is a prime ideal of $K[B]$, then the only idempotents of $K[B]/\mathfrak p$ are $0$ and $1$ and so the elements of $B$ going to $1$ form an ultrafilter in your Boolean algebra.  So basically a prime ideal is coordinatized by an ultrafilter on $B$ and a prime ideal of $K$.  Now if you apply the Pierce sheaf representation (or if you work with the usual structure sheaf I suppose but this looks messier when $K$ is not a field) you will get to the result you want.
There is also the down and dirty proof.  I’ll write $b$ instead of $e_b$, for $b\in B$. Note your relations makes the $0$ of the Boolean algebra the zero of the ring.  Namely, you have a map from $K[B]$ to $C_c(\widehat B, K)$ taking $b$ in $B$ to the characteristic function $\chi_b$ of the compact open set of all ultrafilters containing $b$.  The characteristic functions clearly satisfy your relations and span $C_c(\widehat B,K)$.  So you just need that the natural map is injective.  This is pretty easy.
If $\sum_{i=1}^nc_i\chi_{b_i}=0$, then we can use the standard disjointification trick and find disjoint non zero elements $b_1',\ldots,b_m'$ of the boolean algebra generated by $b_1,\ldots b_n$ such that each of $b_1,\ldots, b_n$ can be expressed as joins of $b_1’,\ldots, b_m’$ (take atoms from this finitely generated and hence finite boolean algebra for example). Using the defining relations of $K[B]$ you can then write $\sum_{i=1}^nc_ib_i=\sum_{i=1}^md_ib_i’$ for appropriate $d_i$.
Now we get $0=\sum_{i=1}^md_i\chi_{b_i’}$ but since this is a sum of characteristic functions of disjoint sets and only $0\in B$ maps to the empty set because every each nonzero element of $B$ is contained in an ultrafilter, we deduce each  $d_i=0$.  Therefore, $\sum_{i=1}^nc_ib_i=\sum_{i=1}^md_ib_i’=0$ in $K[B]$ and the map is injective.
If $K$ is a connected ring (with no idempotents except $0$ and $1$), then clearly the only idempotent elements of $C_c(\widehat B,K)$ are the characteristic functions of compact open sets, which by Stone duality are just the $\chi_b$ with $b\in B$ and hence the $b\in B$ are the only idempotents of $K[B]$ when $K$ is connected like $\mathbb Z$.
I think this result is just folklore, and as I said in the comments it is at least implicit in a number of locations such as Pierce and Keimel.  In Theorem 3.11 of my paper, B. Steinberg, A groupoid approach to discrete inverse semigroup algebras I give a variation of the above proof to give a presentation for algebras of Hausdorff etale groupoids with Stone unit space. Unfortunately, that was omitted from the journal version of the paper.  The same presentation was generalized to arbitrary etale groupoids with Stone unit space in an unpublished note of Buss-Meyer, but a different proof in the setting of tight algebras of inverse semigroups is given in Corollary 2.12 of B. Steinberg, N. Szakacs, Simplicity of inverse semigroup and étale groupoid algebras but this is further a field.  The point is $K[B]$ is the tight algebra of the meet semilattice reduct of $B$.
