$\require{AMScd}$


This is basic level question, but this kind of questions usually find no answer on stackexchange. 


I am trying to introduce my self to categories theory and advanced algebraic topology. I have just learnt about group and cogroup structures. My question is about *cogroup* structures. 


An object with a group structure $(G, \mu: G \times G \to G, u: \* \to G, i: G \to G)$ satisfies among the other properties the following


\begin{CD}
G \times \* @<{id \times \*\_G}<< G\\
@V{id\times u}VV @VV{id}V \\
G \times G @>{\mu }>> G
\end{CD}


Here $\*$ is the terminal object and $\*\_G$ the unique morphism to from $G$ to $\*$. This is the law of neutral element. 


If I have understood properly, a cogroup object should sastify the reversed diagram, i.e.


$\require{AMScd}$
\begin{CD}
G \coprod \* @>{id \coprod \*\_G}>> G\\
@A{id\coprod u}AA @AA{id}A \\
G \coprod G @<{\mu }<< G
\end{CD}


Now, choose as category $\mathbf{Top.}$ and $G = (\mathbb{S}^1, 1)$ with operation $\mu: \mathbb{S}^1 \to \mathbb{S}^1 \vee \mathbb{S}^1$ that wrap the circle "half-and-half". The claim is that this is a cogroup structure on $\mathbb{S}^1$, but to me seems **not**.


The above diagram becomes


\begin{CD}
\mathbb{S}^1 \vee \* @>{id \vee \*}>> \mathbb{S}^1 \\
@A{id\vee u}AA @AA{id}A \\
\mathbb{S}^1 \vee \mathbb{S}^1 @<{\mu }<< \mathbb{S}^1 
\end{CD}


But $\*$ in $\mathbf{Top.}$ is both initial and terminal and so $\mathbb{S}^1 \vee \mathbb{S}^1 \to \mathbb{S}^1 \vee \* \to \mathbb{S}^1$ would collpse the "right circle" of $\mathbb{S}^1 \vee \mathbb{S}^1$ to the basepoint of $\mathbb{S}^1$ and so $\mathbb{S}^1 \to \mathbb{S}^1 \vee \mathbb{S}^1 \to \mathbb{S}^1 \vee \* \to \mathbb{S}^1$ would collpse the "right half-circle" of $\mathbb{S}^1$ to the basepoint of $\mathbb{S}^1$. Then it could not be the identity as claimed by the other arrow.


Now, I know for sure that **I am wrong**, but where?


EDIT. 


Obviously the answer is: $\mathbb{S}^1$ is not a cogroup object in $\mathbf{Top.}$ but in $\mathbf{HTop.}$.



Why is $\mathbb{S}^1$ a cogroup object in $\mathbf{Top.}$?
This is a statement about the homotopy category. Consider the following fact:


Let $X$ be an object in a category $C$ such that the corepresentable functor $h^X:C\to \operatorname{Set}$ factors through the forgetful functor $\operatorname{Grp}\to \operatorname{Set}$. Then these data precisely specify the diagrams you drew above but for natural transformations wrt the corepresentable functor $h^X$. By Yoneda, all of these natural transformations descend down to a cogroup structure on X in $C$ (so long as $C$ has enough coproducts).


So in particular, we know that in the homotopy category of based spaces $\operatorname{Ho}(\operatorname{Top}\_\ast)$, the functor $\pi\_1:\operatorname{Top}\_\ast \to \operatorname{Grp}$ is corepresented by the corepresentable functor $h^{(S^1,\ast)}$ where $h^{(S^1,\ast)}(X,x)=[(S^1,\ast),(X,x)]=\pi\_1(X,x)$, as desired.


Another example of a canonical cogroup that arises in this way is the group scheme $G\_m$. This is the spectrum of the ring $\mathbb{Z}[x,x^{-1}].$ 


If you unwind what the corepresentable functor $h^{\mathbb{Z}[x,x^{-1}]}$ does on rings, you see that it sends a ring to its group of units. This then flips around to specify the cogroup structure by Yoneda on $\mathbb{Z}[x,x^{-1}]$


