I have a question on the definition of a generator of a category $C$. I have made a stupid mistake in the original formulation of the question. I beg your pardon for this.
Let $G$ be a generator of $C$. Let $f:X\to Y$ be a $C$-morphism. Does $f_*:Hom(G,X)\cong Hom(G,Y)$ imply that $f$ is an isomorphism? If yes, is this property for all $C$-morphisms $f$ equivalent to $G$ being a generator of $C$?
Original question: Let $G$ be a generator of $C$. Does $Hom(G,X)\cong Hom(G,Y)$ imply $X\cong Y$? If yes, is this property for all objects $X$ and $Y$ equivalent to $G$ being a generator of $C$?