Given that $H^1(X)=0$ on a connected space, show that all maps to $X\to S^1$ are null homotopic Let $X$ be a path-connected, locally path-connected topological space, with $H^1(X)=0$. I would like to show that any map $f:X\to S^1$ is null homotopic, but I haven't really made any progress.
Thoughts so far:


*

*The universal cover of $S^1$ is $\textbf{R}$, so if we could get a lift $\tilde f:X\to \textbf{R}$, then we would be done. However, such a lift exists iff $f_*(\pi_1(X))\subseteq p_*(\pi_1(\textbf{R}))=\{0\}$ by the lifting criterion (for $p:\textbf{R}\to S^1$ the covering map), meaning that $f_*$ should take $\pi_1(X)$ to zero. 

*By the UCT, we get that $H^1(X)=\text{Hom}(H_1(X),\textbf{Z})\oplus \text{Ext}(H_0(X),\textbf{Z}) = \text{Hom}(H_1(X),\textbf{Z})$ since $X$ is connected (so $H_0(X)=\{0\}$ and $\text{Ext}$ disappears). Hence $\text{Hom}(H_1(X),\textbf{Z})=\{0\}$, meaning that $H_1(X)=0$ or is torsion. This unfortunately does not imply that $\pi_1(X)$ is torsion, which would be useful using the remark above (because any map of a torsion group into $\textbf{Z}$ is zero). Indeed, consider the free product $\textbf{Z}/2\textbf{Z} *\textbf{Z}/2\textbf{Z}$, which has infinite generator $ab$, for $a,b$ the generators of each copy of $\textbf{Z}/2\textbf{Z}$, but has abelianization $\textbf{Z}/2\textbf{Z}\oplus \textbf{Z}/2\textbf{Z}$, which is torsion.

*This is part 1 of a 2-part qualifying exam question, so seems like should be a straightforward argument.


Any hints / complete solutions are appreciated!
 A: The standard answer is to observe $S^1$ is an Eilenberg-MacLane spaces, specifically that $S^1$ is a model for $K(\Bbb Z, 1)$.  (This relies on showing that all of the higher homotopy groups of $S^1$ vanish.)
In general, there is a natural isomorphism $H^n(X;G) \cong [X, K(G, n)]$.  This is referred to as the representability of cohomology by Eilenberg-MacLane spaces.  (Note that by $[X, K(G, n)]$ I mean based homotopy classes of based maps, if one is being careful.)
Thus, $H^1(X;\Bbb Z) = 0$ is equivalent to $[X, S^1] \cong [X, K(\Bbb Z, 1)] = 0$.  This implies that any map $X \to S^1$ is nulhomotopic.
In terms of proving the general isomorphism  $H^n(X;G) \cong [X, K(G, n)]$, the usual method is to prove that any cohomology theory satisfying the Eilenberg-Steenrod axioms is uniquely determined (up to natural isomorphism).  This is usually done directly by showing how the axioms force the theory to give the same results as cellular cohomology.  Showing that the theory given by $[X,K(G,n)]$ satisfies the axioms mainly rests on the following suspension isomorphism, where $\Omega$ is the loopspace functor:
$$
[\Sigma X, K(G, n)] \cong [X, \Omega K(G, n)] \cong [X, K(G,n+1)]
$$
