Understanding proof of a corollary leading up to Nakayama's Lemma I would appreciate help on what should be an easy concept in the proof of a corollary leading up to Nakayama's Lemma.
This link to mathoverflow.com (in the green highlighted section) gives the development as presented in "Atiyah and Macdonald" as well as "Reid."
https://mathoverflow.net/questions/41836/elementary-proof-of-nakayamas-lemma
My question pertains to the second corollary (as in "Reid"):
If $M$ is a finite $A$-module and $M = IM$ then there exists an $x \in A$ such that $x \equiv 1$ mod $I$ and $xM = 0$.
I understand the use of $\phi = id_M$ in the relation of maps to get:
$1 + a_1 + \dots + a_n = 0$ with $a_i \in I$. And $x$ is set equal to this,  giving $xM = 0$.
Also this satisfies $x \equiv 1$ mod ($I$).
Here is my question:
How can $x \in A$ be = $0$ and be $\equiv 1$ (mod $I$)?
Thanks for straightening out what must be an error in my math understanding.

Let us review the previous proposition in Atiyah - Macdonald used in the proof of the Corollary above:


Proposition (Cayley - Hamilton): Let $M$ be a finitely generated $A$ - module, $I$ an ideal of $A$ and $\phi$ an $A$ - module endomorphism of $M$ such that $\phi(M) \subseteq IM$. Then $\phi$ satisfies an equation of the form
    $$\phi^n + a_1 \phi^{n-1} + \ldots + a_n = 0$$
    where $a_i \in I$.


Now we want to apply this to prove your corollary above. What we are doing is this: Choose $x = 1 + a_1 + \ldots + a_n$. It is clear that $x \equiv 1 \mod I$ because $x - 1 = a_1 + \ldots + a_n = $ sum of guys in $I$. Now why is it that $xM= 0$? Well it is not because $x = 0$ but because $x$ is in the annihilator of $M$. This does not mean that $x = 0$. So how do we conclude for this $x$ that $xM = 0$? Well take any element in here, say $xm$ for $m\in M$. Now $\phi$ is the identity map so $\phi(xm) = x\phi(m) = xm$. However on the other hand
$$\begin{eqnarray*} \phi(xm)&=& \phi( (1 + a_1 +\ldots + a_n)m) \\
&=& (1+ a_1+ \ldots + a_n)\phi(m) \\
&=& \phi(m) + a_1\phi(m) + \ldots + a_nm\\
&=& \phi^n (m) + a_1\phi^{n-1}(m) + \ldots + a_n(m) \\
&=& (\phi^n + a_1\phi^{n-1} + \ldots + a_n)(m)\\
&=& 0\cdot m\\
&=& 0 \end{eqnarray*}$$
from which we conclude that $xm = 0$. But this was any element in $xM$ and so $xM= 0$.
