Let $R=\bigoplus_{i=0}^{\infty}R_i$ be a graded ring with $R_0$ a field and let $M=\bigoplus_{i=0}^{\infty}M_i$ be a finitely generated graded module. Let $I \subseteq R$ be the homogeneous maximal ideal generated by the homogeneous elements of strictly positive degree.
I'm trying to prove that the following exact sequence splits:
$$0 \to IM \overset{i}{\to} M \overset{\pi}{\to} M/IM \to 0$$
where $i$ is the identity and $\pi$ is the projection.
$\textbf{My attempt}$:
By Nakayama's lemma for graded modules, if $\pi(x_1),...,\pi(x_k)$ generate $M/IM$ as an $R_0$ vector space, the representatives $x_1,...,x_k$ generate $M$ as an $R$-module. Hence we have an $R$-linear map $$p: M/IM \to M$$ given by $p(\pi(x_i))=x_i$ such that $\pi p$ is the identity on $M/IM$, and so the sequence splits. Note this is well-defined due to our choice $x_i$ of representatives for the $\pi(x_i)$.
Now by the splitting lemma, this tells us that $M \cong IM \oplus M/IM$. This is what makes me doubt the claim. For any $r\in I$ and $v \in M/IM$, $rv=0$, so if $M$ happens to be a free module then for $(0,m) \in IM \oplus M/IM$ we have $$r(0,m)=(0,0),$$ but this shouldn't be, right? Where is the hole in my argument?
The source I'm using for the graded version of Nakayama's lemma is
The mistake shows up from the very beginning: the map $p$ you define is not a homomorphism of $R$-modules. The images of $x_i$'s form an $R/I$-basis in $M/IM$, while $M$ is only an $R$-module.