If $P$ is a cyclic projective $R$-module, show that $P \cong e R$ for some idempotent $e \in R$. Conclude that if $R$ has no idempotents other than 0 or 1 and if $V$ is an irreducible $R$-module with a projective cover, then $R$ is a local ring. Conversely, if $R$ is a local ring, show that all finitely generated $R$-modules have projective covers.