# If $A, B$ are abelian groups such that $\mathrm{Hom}(A, G) \cong \mathrm{Hom}(B, G)$ for all abelian groups $G$, must $A$ and $B$ be isomorphic?

The question is in the title. If the isomorphism $$\mathrm{Hom}(A, G) \cong \mathrm{Hom}(B, G)$$ is natural in $$G$$ then this is just the Yoneda Lemma. If $$A$$ and $$B$$ are finitely generated this is also true by the structure theorem.

However this sounds like it should be false in general, else it would imply by Yoneda that if $$\mathrm{Hom}(A, -)$$ and $$\mathrm{Hom}(B, -)$$ are (a priori not naturally) isomorphic, then they are also isomorphic in a natural way (though possibly by a different set of isomorphisms).

The question of course immeadiately generalizes to $$R$$-modules.



Edit: Some context (that isn't really relevant for the question)
I'm interested in this question in light of the universal coefficient theorem for Cohomology. A positive answer would imply that knowing all Cohomology groups of a space, with arbitrary coefficients, would already determine its Homology (although I think it is conceivable that this topological statement can be proven in a different way).

• I 'migrated' this question from math.stackexchange (I deleted the question there) since it had already been asked Jun 16 '20 at 21:19
• If $A=C_2^{(\aleph_0)}$ and $B=C_2^{(\aleph_1)}$, the these are isomorphic for every $G$ iff $\alpha^{\aleph_0}=\alpha^{\aleph_1}$ for all cardinal $\alpha$. This is false under CH (taking $\alpha=2$) but I don't know if it's consistent in general (=in ZFC). In case that yields a counterexample, one might restrict to $A,B$ countable, or assume GCH.
– YCor
Jun 16 '20 at 22:33
• @YCor I think Eric Wofsey commented on mathSE (on a deleted answer to the linked question) that there always is a cardinal $\alpha$ such that $\alpha^\kappa \neq \alpha^\lambda$ for $\kappa \neq \lambda$ Jun 16 '20 at 22:35
• Ah, thanks indeed, I should have checked before. So the question has a positive answer when $A$ is an elementary abelian $p$-group for some prime $p$ (i.e., if for every $B$ the question has a positive answer for this given $A$); we can say that $A$ is "recognizable".
– YCor
Jun 17 '20 at 8:24
• If $G=U(1)$ is a topological group, then this follows from Pontryagin duality (with $G=S^1=U(1)$, and the discrete topology on $A$ and $B$), where one remembers the topology on $Hom(A,G)$. en.wikipedia.org/wiki/… Jun 26 '20 at 18:02