Does inverse image of idempotent element contain an idempotent element? Suppose $f\colon \oplus A_i\to\oplus B_j$ is a ring homomorphism, where $A_i,B_j$ are local rings. Both sides have finitely many summands. Suppose an idempotent $x$ (i.e. $x=x^2$) is in the image of $f$. Can we always choose an idempotent in $f^{-1}(x)$?
In fact, we want to lift the idempotents from $(\oplus_{i=1}^nA_i)/I$, where $I$ is an ideal of $\oplus_{i=1}^nA_i$, to $\oplus_{i=1}^nA_i$. Since $I=\oplus_{i=1}^nI_i$ with $I_i\subset A_i$ ideals, the question reduces to the following


  Let $A$ be a local ring. Then the idempotents lift modulo any ideal $J\subset A$.


If $a+J$ is idempotent, then since $A/J$ is also local we get $a\in J$ or $1-a\in J$.
Since $B_i $ are local, so the set of idempotents of $B_i $ has only 0 and 1. Thus $x=(x_1,x_2,...,x_n,...) $ where $x_i $are 0 or 1 and almost all of them are 0. So $x$ has an idempotents preimage.