# Equivalent definitions of associated prime ideals

I'm reading the book Undergraduate Commutative Algebra of M. Reid. He gives the following definition: Let $M$ be an $R$-module and let $P$ be an ideal of $R$. Then $P$ is an associated prime if:

$1.$ $P\in \text{Spec}(R)$
$2.$ there exists $x \in M$ such that $P = \text{ann}(x)$ or equivalently there exists $N \subset M$ such that $N \cong A/P$.

My question is why the last two statements are equivalent?

-

(a) There exists $x \in M$ such that $P = ann(x)$.
(b) There exists a submodule $N$ of $M$ such that $N \cong R/P$.
Assume that condition (a) holds; let's prove (b). The element $x \in M$ generates a submodule $Rx = \{rx \mid r \in R\}$. There is a homomorphism $R \to Rx \subseteq M$ uniquely determined by sending $1 \mapsto x$. The kernel of this homomorphism is precisely $P = ann(x)$, and the image is precisely $Rx$. It follows from the first isomorphism theorem for modules that $Rx \cong R/P$. So we can take $N = Rx$ for condition (b).
Now assume that (b) holds, so that $N \cong R/P$ for some submodule $N$ of $M$. Under this isomorphism, there is some element $x \in N$ that corresponds to the coset $1+P \in R/P$. You can prove that $ann(1+P) = P$ (REMEMBER: we're considering $R/P$ as an $R$-module, not as a ring unto itself). Thus, since $x$ corresponds to $1+P$ under the isomorphism, we find that $ann(x) = ann(1+P) = P$. So condition (a) holds.