Recall that an ideal of a commutative ring is said to be a nil ideal if each of its elements is nilpotent. I am looking for a non-zero nil ideal of a commutative ring that is idempotent.



An example of a commutative ring with a non-zero nil ideal that is idempotent
Consider the ring $A:=k[X^{\mathbb{Q}\_{\geq 0}}] / X$ of polynomials with non-negative rational exponents with the relation $X^1=0$. Then the ideal $I:=\operatorname{span}\_k\{X^a \mid 0<a<1\}$ is nil, because every $X^a$ is nil. But it is also idempotent because $X^a=(X^{a/2})^2$.


