I saw the following question at mathstackexchang < <https://math.stackexchange.com/questions/2282194/when-an-ideal-is-locally-comaximal-with-idempotents>>. It seems to be a nice question and I need it in my research. I want to know is it true? It is clearly true for indecomposable rings.



> 
> Let $R$ be a commutative ring with identity, and let for an ideal
>  $A$ of $R$, $\mathrm{Id}(A)$ be the ideal of $R$ generated by all idempotent
>  elements of $A$. Now let $I$ be an ideal of $R$ such that for
>  each prime ideal (or primary ideal) $P$ of $R$ we have $I\subseteq
> \mathrm{Id}(P)$ or there exists $a^2=a\in P$ with $a-1\in I$. Show that
>  $I=0$.
> 
> 
> 



When an ideal is locally comaximal with idempotents(restated)
No,this is false. Take $R=\mathbb{C}\times\mathbb{C}$.
The primes ideals of $R$ are $P\_1=\mathbb{C}\times (0)$ and $P\_2=(0)\times \mathbb{C}$.
The idempotents in $P\_1$ are $(0,0)$ and $(1,0)$, and those in $P\_2$ are $(0,0)$ and $(0,1)$. Hence $I(P\_1)=P\_1$ and $I(P\_2)=P\_2.$


Now take $I=P\_1=\mathbb{C}\times (0)$. Then $I\neq (0)$. However, $I=P\_1\subset I(P\_1)=P\_1$, and $a=(0,1)$ is an idempotent of $P\_2$ such that $a-1\_R=(-1,0)\in \mathbb{C}\times (0)=I$. 


