Let R be a commutative ring, with an ideal H, such that H2 = 0. The idempotents in R correspond 1-1 with the idempotents in R/H.
Clearly idempotents in R are idempotent in R/H. Suppose e and f are idempotents in R that map to the same idempotent in R/H. In other words, f = e+b for some b in H. Write (e+b)2 = e+b. Since b2 = 0, we have b*(1-2e) = e2-e. The right side is 0, so if 2e-1 is a unit, then b is also 0. This forces e = f, and the map from idempotents of R into the idempotents of R/H is injective. We only need show 2e-1 is a unit.
Let e ∈ R be idempotent in R/H. Thus e2-e = v, for v in H. Consider the element 2e-1, and square it to get 4e2-4e+1, or 4v+1. Since v is in H, v2 = 0, and (4v+1)*(4v-1) = -1. Thus 2e-1 is a unit in R. Idempotents upstairs map uniquely into idempotents downstairs.
To show the map is surjective, let e be idempotent in R/H, so that e2-e = v, for some v in H. Set b = -v/(2e-1).
(e+b)2 =
e2 - 2ev/(2e-1) + v2/(2e-1)2 =
e2 - 2ev/(2e-1) { v2 is 0 }
e+v - 2ev/(2e-1) =
e - v/(2e-1) =
e + b
That completes the correspondence.
By induction, the idempotents of R/Hn, for each n, correspond to the idempotents of R/H.
Let S be the completion of R. If R is a dvr, R and S are both integral domains, with no idempotents, and there isn't much to talk about. But R could be any ring, whence its completion is the inverse limit, as described in the previous section.
Let e be an idempotent of S, which maps to a consistent set of idempotents in the quotient rings R/Hn, terminating in an idempotent e′ in R/H. Let f be another idempotent, different from e. Thus f differs in the nth entry, for some n. This becomes a different idempotent in R/Hn, which leads to a different idempotent f′ in R/H. The idempotents of S map 1-1 into the idempotents of R/H.
To complete the correspondence, start with an idempotent e1 in R/H. Pull this back to an idempotent e2 in R/H2. By induction, find an idempotent en in R/Hn. This defines an entry e in S. Multiply e*e in S, and you multiply en*en in each ring R/Hn. The result is always en, hence e*e = e, and e is idempotent. The correspondence is complete.
If R/H has no idempotents, e.g. when H is prime, then S has no idempotents either.