# In a category with a projective generator, do morphisms from the generator determine the object?

I have a cocomplete abelian category $$\mathcal C$$ and two objects $$X$$, $$Y$$ in $$\mathcal C$$. Further, $$\mathcal C$$ has a projective generator $$P$$. I have an isomorphism

$$\mathcal C(P,X) \cong \mathcal C(P,Y)$$

It feels like this should be enough to show that $$X\cong Y$$ in $$\mathcal C$$. Because any object $$Z$$ in $$\mathcal C$$ can be written as a cokernel $$P^J\longrightarrow P^I\longrightarrow Z\longrightarrow 0$$ and so we have $$\mathcal C(Z,X)\cong \mathcal C(Z,Y)$$. It feels like the isomorphisms $$\mathcal C(Z,X)\cong \mathcal C(Z,Y)$$ are natural in $$Z$$ and do not depend on the choice of projective resolutions.

But I cannot be sure. Is this true? Any reference or pointers would be appreciated.

• Your claim is false. You can find a counterexample where $\mathcal{C}$ is the category of real vector spaces. – Zhen Lin Jun 15 at 4:45
• Isomorphism of $\mathcal{C} (P,X)$ with $\mathcal{C} (P,Y)$ as what? If you consider them as $\text{End}(P)^{\text{op}}$-modules, then yes, this implies the isomorphism of objects. – Sasha Jun 15 at 8:10

It is very easy to specify an answer if $$P$$ is a compact projective generator (you didn't write whether it is compact). Then, we have an equivalence of categories between $$\mathcal{C}$$ and the category of right modules over $$\text{End} (P)$$, given by sending $$X$$ to $$\mathcal{C} (P , X)$$. So, of course, if objects become isomorphic under an equivalence of categories, they were isomorphic. For that answer, one also needs to understand your isomorphism as compatible with the endomorphisms of $$P$$, i.e. a $$\text{End}(P)$$-module isomorphism.