# $H^1(X;G) \cong \text{Hom}(\pi_1(X), G)$

Hatcher exercise 3.1.5 contains the following: regarding a cochain $$\phi \in C^1(X,G)$$ as a function from paths in $$X$$ to $$G$$, show that if $$\phi$$ is a cocycle then (among other things) $$\phi(f \cdot g) = \phi(f) + \phi(g)$$ and $$\phi(f) = \phi(g)$$ is $$f \simeq g$$. Hatcher says that these two statements give a map $$H^1(X,G) \to \text{Hom}(\pi_1(X), G)$$, which the universal coefficient theorem says is an isomorphism if $$X$$ is path-connected. But I don't really understand why these two facts are needed to prove this statement; isn't the following enough?

Proof that $$H^1(X;G) \cong \text{Hom}(\pi_1(X), G)$$: By the universal coefficient theorem, $$H^1(X;G)$$ is naturally isomorphic to $$\text{Hom}(H_1(X), G)$$. If $$X$$ is path-connected, then $$H_1(X)$$ is naturally isomorphic to the abelianization of $$\pi_1(X)$$. By the universal property of abelianization, every map in $$\text{Hom}(\pi_1(X), G)$$ factors uniquely through $$H_1(X)$$. This shows that $$H^1(X;G)$$ is naturally isomorphic to $$\text{Hom}(\pi_1(X), G)$$.

Is there something wrong with my proof? Do we need the facts stated in the first paragraph? I've found this thread, but I'm still confused.

No, there is nothing wrong with your proof. In Hatcher's exercise you just define explicitly the isomorphism $$H^1(X, G) \to \operatorname{Hom}(\pi_1(X), G)$$, instead of just knowing that it exists.