# If a union of ideals is closed under addition and multiplication, then all ideals are not prime

Let $J_1,\dots,J_n$, $n\geq 2$, be ideals of $A$, where $A$ is a commutative ring with unit. Suppose $X$ is a subset of $A$ closed under addition and multiplication, and $J_1,\dots, J_n$ is a minimal cover of $X$ (i.e., the union of $J_1,\dots, J_n$ cover $X$ but union of any proper subcollection of $J_i$'s cannot cover $X$). Prove $J_i$ is not prime for $i=1,\dots,n$.

By constructing $x=\sum_{k=1}^{n}x_1\cdots \hat{x}_k\cdots x_n$, where $x_k\in J_k-\cup_{i\neq k} J_i$, I can only prove there exists a certain $J_i$ that is not prime. How to prove that every $J_i$ is not prime for all $i=1,\dots, n$?

I assume that $X=\cup_{i=1}^nJ_i$ and pick $x_k\in J_k-\cup_{i\neq k} J_i$ for $k=1,\dots,n$. If $J_r$ is prime, then set $x=x_r+x_1\cdots \hat{x}_r\cdots x_n$. Since $x\in X$ there exists $i$ such that $x\in J_i$. If $i\neq r$, then $x_r\in J_i$, false. If $i=r$, then $x_1\cdots \hat{x}_r\cdots x_n\in J_r$ and therefore some $x_s\in J_r$ with $s\neq r$, false.