Equivalence of Definitions of Prime Ideal of Commutative and Unitary Ring

Proof
Let $\struct {R, +, \circ}$ be a commutative and unitary ring throughout.

$(1)$ implies $(2)$
Let $P$ be a prime ideal of $R$ by definition 1.

Then by definition:
 * $\forall a, b \in R : a \circ b \in P \implies a \in P$ or $b \in P$

Let $I \circ J \subseteq P$.

that both $I \not \subseteq P$ and $J \not \subseteq P$.

Then by definition of subset:
 * $\exists a \in I \setminus P, b \in J \setminus P$

But by definition of subset product
 * $a \circ b \in P$ as $I \circ J \subseteq P$

Thus we have $a, b \in P$ such that:
 * $a \circ b \in P$ where $a \notin P$ and $b \notin P$

But this contradicts the criterion for $P$ to be a prime ideal of $R$ by definition 1

Thus by Proof by Contradiction, either $I \subseteq P$ or $J \subseteq P$,

Thus $P$ is a prime ideal of $R$ by definition 2.

$(2)$ implies $(1)$
Let $P$ be a prime ideal of $R$ by definition 2.

Then by definition:
 * $I \circ J \subseteq P \implies I \subseteq P \text { or } J \subseteq P$

for all ideals $I$ and $J$ of $R$.

there exist $a \circ b \in P$ such that $a \notin P$ and $b \notin P$.

Thus $P$ is a prime ideal of $R$ by definition 1.

$(1)$ implies $(3)$
Let $P$ be a prime ideal of $R$ by definition 1.

Then by definition:
 * $\forall a, b \in R : a \circ b \in P \implies a \in P$ or $b \in P$

$R \setminus P$ is not multiplicatively closed.

That is:

But this contradicts the assertion that $a, b \in R \setminus P$.

Thus by Proof by Contradiction $R \setminus P$ is multiplicatively closed.

Thus $P$ is a prime ideal of $R$ by definition 3.

$(3)$ implies $(1)$
Let $P$ be a prime ideal of $R$ by definition 3.

Then by definition:
 * the complement $R \setminus P$ of $P$ in $R$ is closed under the ring product $\circ$.

let $a \circ b \in P$ such that $a \notin P$ and $b \notin P$.

Then:
 * $a, b \in R \setminus P$

by definition of relative complement.

But $R \setminus P$ is closed under the ring product $\circ$.

That means:
 * $\forall a, b \in R \setminus P \implies a \circ b \in R \setminus P $

But this contradicts the assertion that $a \circ b \in P$.

Thus by Proof by Contradiction either $a \in P$ or $b \in P$ (or both).

Thus $P$ is a prime ideal of $R$ by definition 1.