For abelian groups: does knowing $\text{Hom}(X,Z)$ for all $Z$ suffice to determine $X$?

468 Views Asked by At

Let $X$ and $Y$ be abelian groups. Suppose $\text{Hom}(X,Z)\cong \text{Hom}(Y,Z)$ for all abelian groups $Z$. Does it follow that $X \cong Y$?

It has been answered before that this is true if the bijection $\text{Hom}(X,Z)\to \text{Hom}(Y,Z)$ is natural in $Z$. My intuition says that this assumption shouldn't be necessary. Maybe if we choose an extremely large and suitably "generic" group $Z$, then the structure of $\text{Hom}(X,Z)$ will somehow reveal the structure of $X$?

I'm also interested in the answer if "abelian group" is replaced by some other structure, in particular "$R$-module".