I was trying to solve the following problem
Let $R$ be a commutative ring with 1. Let $U \subset R$ be a subset containing 1 such that $u \cdot v \in U$ for all $u, v \in U$. Let $J$ be an ideal of $R$ such that
(a) $J \cap U=\emptyset$, and
(b) if $I$ is an ideal of $R$ strictly containing $J$, then $I \cap U \neq \emptyset$.
Show that $J$ is a prime ideal.
My try is as follows:
Let $ab \in J$ for some $a,b \notin J$. Since $R$ is a commutative ring, we can conclude that $a \notin J$ or $b \notin J$. Since $I$ strictly containing $J$ cannot have an empty intersection with $U$, we conclude that at least one of $a$ or $b$ must be in $U$. Thus, we have either $a \in U$ and $b \notin J$, or $b \in U$ and $a \notin J$. In either case, $ab \notin J$, implies that $J$ is a prime ideal.
But unfortunately I told it is not right. Any help to show that $J$ a prime ideal?
Let $a,b\in R$ such that the product $ab \in J$. Towards a contradiction, assume that $a,b \not \in J$. Consider the ideals $I_a := \langle a \rangle + J$ and $I_b := \langle b \rangle + J$ (here for $x\in R$, $\langle x \rangle$ denotes the ideal generated by $x$).
Since $I_a$ and $I_b$ both contain $J$ strictly, there exists some elements $u_a \in I_a \cap U$ and $u_b \in I_b \cap U$. Now, the product ideal $I_aI_b$ is included in $J$ since $ab \in J$, but it also contains $u_au_b$. By hypothesis on $U$, we have $u_au_b \in U$. Thus, we have reached a contradiction, since $J \cap U = \emptyset$.