Annihilator of a projective module is always a projective idempotent ideal? I found as a remark in a book that if $M$ is a projective module over a ring $R$, $\mathfrak a$ is the ideal generated by all $f(m)$ where $f\in \text{Hom}(M,R)$ and $m\in M$, and $\text{Ann}(M)$ is the annihilator of $M$ then $$\mathfrak a\oplus \text{Ann}(M)=R.$$
I managed to prove this fact when $M$ is finitely generated the following way:
If $\phi$ is the evaluation map from $M^*\otimes M$ to $R$ then its image is $a$. If $\psi$ is the map from $M\otimes M^*$ to $\text{Hom}(M,M)$ defined by $\psi(f\otimes m)(x)=f(x)m$, then by the dual basis theorem, $\psi$ is an isomorphism of $R$-modules, and the identity is in the image of $\psi$. If $l$ is the map from $M\otimes R$ to $M$ defined by $l(m\otimes r)=rm$ and $ev$ the evaluation map from $\text{Hom}(M,M)\otimes M$ to $M$, then $l\circ (1\otimes \phi)$ from $M\otimes M^*\otimes M$ to $M$ is identical to $ev\circ (\psi \otimes 1)$. Therefore we obtain $\mathfrak aM=M$.
By Nakayama lemma, there exists $r\in \text{Ann}(M)$ with $r=1\ (\text{mod}\ \mathfrak a)$, and so $\mathfrak a+\text{Ann}(M)=R$. Let us write $1=r+\alpha$ with $\alpha \in \mathfrak a$. Then if $s\in \mathfrak a\cap \text{Ann}(M)$, we have $s=sr=0$ since $\text{Ann}(M)\subset \text{Ann}(\mathfrak a)$.
My proof relies heavily on $M$ being finitely generated. Therefore, I do have two questions:


*

*Is it a correct proof ?

*Does anybody have a counterexample if $M$ is not finitely generated ?


There is a counterexample in the non-f.g. case in Lam's Lectures on Modules and Rings (Remark 2.47). He takes the ring to be the countable direct product of copies of $\mathbb Z$ and $M$ the ideal which is the direct sum of all those $\mathbb Z$s.
