It remains to check that we have an identity element and all inverses. Because the semigroup is inhabited, as soon as we have inverses we shall have a unit. Therefore, we must construct:
{\mathop {\mathchoice {\textstyle \prod }{\textstyle \prod }{\scriptstyle \prod }{\scriptscriptstyle \prod }
}_{(u:\left \lvert {\pi _nX}\right \rvert )}}
\mathsf {inverseOf}_{\pi _nX}(u)
Recalling that \left \lvert {\pi _n X}\right \rvert \equiv \bigl \lVert \left \lvert {\Omega ^n X}\right \rvert \bigr \rVert _0 and that \mathsf {inverseOf}_{\pi _nX}(u) is a proposition and thus a set, we can reduce the above by means of the dependent induction principle for 0-truncation, using the fact that sets are closed under internal sums. In particular, the above is equivalent to the following:
{\mathop {\mathchoice {\textstyle \prod }{\textstyle \prod }{\scriptstyle \prod }{\scriptscriptstyle \prod }
}_{(p:\left \lvert {\Omega ^n X}\right \rvert )}} \mathsf {inverseOf}_{\pi _nX}\,\lvert p\rvert _0
Fixing such a loop p on \mathsf {pt}_{\Omega ^{n-1}X}, we must choose some element v:\left \lvert {\pi _n X}\right \rvert such that \lvert p\rvert _0\bullet _{\pi _n X} v and v\bullet _{\pi _n X}\lvert p\rvert _0 are both identity elements. We choose v to be the image of the flipping of p under 0-truncation:
v :\equiv \lvert \bar {p}\rvert _0
Now, we have the following identifications:
- v\bullet _{\pi _n X} \lvert p \rvert _0 = \lvert \bar p \bullet p \rvert _0 = \lvert \mathsf {refl}_{\mathsf {pt}_{\Omega ^{n-1}X}}\rvert _0
- \lvert p \rvert _0 \bullet _{\pi _n X} v= \lvert p \bullet \bar p \rvert _0 = \lvert \mathsf {refl}_{\mathsf {pt}_{\Omega ^{n-1}X}}\rvert _0
Therefore it remains only to check that \lvert \mathsf {refl}_{\mathsf {pt}_{\Omega ^{n-1}X}}\rvert _0 is an identity element. This is easily shown, again using the dependent induction principle of 0-truncation.