**Definition**. A ring with 1 is called **clean** if for every there exist a unit and an idempotent such that

**Examples**. Every commutative local ring is clean. The reason is that for every either or is a unit. It is also obvious that a direct sum or product of clean rings is clean.

**Problem**. Let be a commutative clean ring. Prove that if the number of idempotent elements of is finite, then is a finite direct product of local rings.

**Solution**. The proof is by induction on the number of idempotent elements of Suppose that i.e. the only idempotent elements of are and . Then for any either or is a unit because is clean. Now let be a maximal ideal of and . Then and hence for some . Thus and so, since and hence cannot be a unit, is a unit. Therefore is a unit and so is local. Now suppose Choose an idempotent Clearly and the number of idempotent elements in both and is at most because and . So to apply induction hypotheis on and and finish the proof, we only need to prove that both and are clean. First note that the identity element of is . Now let Since is clean, we have for some unit and an idempotent Then Clearly is a unit in and is an idempotent in So is clean. A similar argument shows that is clean too.