I am trying to understand the particular argument in Lemma 15.102.2's proof. It writes that if $M$ is invertible $R$-module, then
we have an automorphism $M \rightarrow M$ which factors as $$M \rightarrow R^n \rightarrow M.$$
Then it says $M$ is a direct summand of $R^n$. How is this so?