Referring to Lang's Algebra p.137 P1, an $A$-module $P$ is projective if the following property holds: given $A$-homomorphism f:P \longrightarrow M^{''} and surjective $A$-homomorphism g:M \longrightarrow M^{''}, then there exists $A$-homomorphism $h:P \longrightarrow M$ such that $f = g \circ h$.
I am confused as follows: let $P$ be any $A$-module (not necessarily projective) and let $f$, $g$ be as above. Now let $\left\{u_i\right\}_{i \in I}$ be a set of generators of $P$. For every $u_i$ there exists some (not necessarily unique) $\xi_i \in M$ such that $f(u_i)=g(\xi_i)$, since $g$ is surjective. Then according to the straightforward Theorem 4.1 p.135 (again from Lang) there is a unique $A$-homomorphism $\psi:P \longrightarrow M$ such that $\psi(u_i)=\xi_i$. But then this $\psi$ is such that $f = g \circ \psi$ and so by definition $P$ is projective. What am i missing?
Thank you :-)