Yoneda implies $\text{Hom}(X,Z)\cong \text{Hom(}Y,Z)\Rightarrow X\cong Y$? I came across a result on the page Theorems implied by Yoneda's lemma? which said that Yoneda's Lemma implies the isomorphism of the title; namely, if we have $\text{Hom}(X,Z)\cong \text{Hom}(Y,Z)$, then $X\cong Y$. However my knowledge of category theory is limited at best. I was wondering if anyone could explain how this works, or under what conditions (if any) it fails to work? In particular I want to use it for modules whose underlying abelian groups are simply copies of $\mathbb{Z}$
 A: Let me show how a family of isomorphisms $\mathcal{C}(X,Z)\cong\mathcal{C}(Y,Z)$ natural in $Z$ gives us an isomorphism $Y\cong X$. I will assume that you are familiar with functors, in particular the $\operatorname{Hom}$-funcotrs in question and natural transformations, because otherwise discussing implications of Yoneda's Lemma won't be very fruitful.
For $\mathcal{C}$ locally small, we have the Yoneda-Functor $\mathcal{C}^{\operatorname{op}}\xrightarrow{\ \ \mathcal{Y}\ \ }[\mathcal{C},\mathbf{Set}]$ sending an arrow $Y\xrightarrow{\ \ f\ \ }X$ on the natural transformation $$\left(\mathcal{C}(X,Z)\xrightarrow{k\longmapsto kf}\mathcal{C}(Y,Z)\right)_{Z\in\mathcal{C}}\,.$$
If we can show that this functor is fully faithful, it will follow that every isomorphism $\mathcal{C}(X,-)\cong\mathcal{C}(Y,-)$ comes from a unique isomorphism $Y\cong X$.
Now the Yoneda Lemma states that given any functor $\mathcal{C}\xrightarrow{\ \ F\ \ }\mathbf{Set}$ and any object $X\in\mathcal{C}$ the map $$FX\longrightarrow[\mathcal{C},\mathbf{Set}](\mathcal{C}(X,-),F)\,,\qquad x\longmapsto(\mathcal{C}(X,Z)\xrightarrow{k\longmapsto (Fk)x}FZ)_{Z\in\mathcal{C}}$$ is a bijection (natural in both $F$ and $X$ for an appropriate functor).
For $F=\mathcal{C}(Y,-)$ this means that $$\mathcal{C}(Y,X)\longrightarrow[\mathcal{C},\mathbf{Set}](\mathcal{C}(X,-),\mathcal{C}(Y,-))\,,\qquad f\longmapsto \left(\mathcal{C}(X,Z)\xrightarrow{k\longmapsto \mathcal{C}(Y,k)(f)}\mathcal{C}(Y,Z)\right)_{Z\in\mathcal{C}}$$ is a bijection. But since $\mathcal{C}(Y,k)(f)=kf$, this is exactly the map $\mathcal{C}(Y,X)\longrightarrow[\mathcal{C},\mathbf{Set}](\mathcal{Y}X,\mathcal{Y}Y)$, $f\longmapsto\mathcal{Y}f$, so the Yoneda functor is indeed full and faithful.
