I have this problem for homework
Let $(A, +, \ast)$ be a ring with unit such that $A \neq \{0\}$. Suppose that each element of A is idempotent. Also, suppose that there exists an element $a \in A-\{0\}$ such that for all $b \in A$ we have $a \ast b = 0$ or $a \ast b = a$. Prove that $(1+a)$, i.e. the ideal generated by $1 + a$, is a prime ideal of A.
I tried to use this proposition:
Let $(A, +, \ast)$ be a commutative ring with unit and $A \neq \{0\}$. Then an ideal P is prime if and only if $A/P$ is an itegral domain.
I proved that $(A, +, \ast)$ is commutative. Let $a,b \in A$ be arbitrary, then since every element of A is idempotent, we have $[a+1] = [a+1]^2 = a^2 + 1^2 + 2a = a + 1 + 2a$, whence $2a = 0$. Also $[a+b] = [a+b]^2 = a^2 + b \ast a + a \ast b + b^2 = a + b \ast a + a \ast b + b$, whence $-b \ast a = a \ast b$ and finally, adding $a \ast b$ on both sides, \begin{align*} a \ast b - b \ast a &= 2[a \ast b] \\ a \ast b - b \ast a &= 0 \\ a \ast b &= b \ast a. \end{align*} Thus, A is commutative and we can apply the stated proposition. So I have to prove that $A/(1+a)$ is and integral domain. To do this I have to prove that $A/(1+a) \neq \{0 + (1+a)\}$ and that it doesn't have cero divisors. The first one is easy, but I have tried the second one and I couldn't prove it. Please, any suggestion to finish this prove or another way to prove the problem is welcome. Thanks in advance.
Your proof of commutativity looks good to me, so let's show that $P:=(1+a)$ is prime. Since maximal ideals are always prime, it suffices to show that $P$ is maximal, so let $c\in A\setminus P$; we wish to show $1\in P+(c)$. By hypothesis, we know that either $ac=0$ or $ac=a$. In the first case, we have $c=(1+a)c$, meaning $c\in P$, a contradiction, and thus we must have $ac=a$. On the other hand, as you have shown, $A$ has characteristic $2$, so $a+a=c+c=0$. In particular, we have $$1=1+a+c+a+c=(1+a)(1+c)+c\in P+(c),$$ as desired. Thus $P$ is maximal and is hence in particular a prime ideal. (As a further exercise, try proving that every prime ideal in $A$ is in fact maximal.)