Criterion for quotient ring to be decomposable. I read in passing that for a commutative ring $R$ and an ideal $I$, then $R/I$ is decomposable if and only if there exist proper ideals $J$ and $K$ such that $J+K=R$, and $J\cap K=I$. 
 A: I wrote down the following while trying to justify it, and would appreciate if anyone could confirm if this is the correct idea.
Suppose $R/I$ is decomposable. Let $R/I=E_1\oplus E_2$, where $R/I\neq E_1$ or $E_2$. Let $\pi\colon R\to R/I$ be the canonical projection. Set $\pi^{-1}(E_1)=J$ and $\pi^{-1}(E_2)=K$, which are proper ideals of $R$, since $E_1$ and $E_2$ are proper ideals of $R/I$. 
Clearly $J+K\subset R$. If $r\in R$, then $\pi(r)\in E_1\oplus E_2$, so $\pi(r)=\pi(x)+\pi(y)=\pi(x+y)$ for some $x\in J$ and $y\in K$. So $r\in\pi^{-1}(E_1+E_2)$, which implies $r\in J+K$. (I'm unsure if this step is valid, is there a more explicit way to show $R\subset J+K$?)
If $x\in I$, then $\pi(x)=0$, so $x\in\pi^{-1}(E_1)\cap\pi^{-1}(E_2)=J\cap K$. So $I\subset J\cap K$. If $x\in J\cap K$, then $\pi(x)\in E_1\cap E_2=0$, so $x\in\ker\pi=i$, so $I=J\cap K$.
Conversely, suppose there exist proper ideals $J$ and $K$ with the desired properties. Let $E_1=\pi(J)$ and $E_2=\pi(K)$, neither of which is equal to $R/I$ since $J$ and $K$ are proper. Then $R/I=E_1+E_2$ is immediate. If $x\in E_1\cap E_2$, then $x=\pi(r),\pi(s)$ for $r\in J$, and $s\in K$. Then $\pi(r-s)=0$, so $r-s\in I$, which implies $r\in K$ and $s\in J$. Thus $\pi^{-1}(x)\in I$, so $x=0$, and $R/I=E_1\oplus E_2$, and is decomposable.
