Group completion of a magma

Definition
Suppose $$(S,*)$$ is a defining ingredient::magma. In other words, $$S$$ is a set and $$*$$ is a binary operation on $$S$$. The group completion of $$S$$ with respect to $$*$$ is the following data:


 * A defining ingredient::group $$G(S)$$ defined by the following presentation: one generator for every element of the magma, and one relation that encodes every multiplication in the magma. For instance, if $$a * b = c$$ in $$S$$, and $$t_a,t_b,t_c$$ are the corresponding generators, then the corresponding relation is $$t_at_b = t_c$$.
 * The natural homomorphism of magmas from $$S$$ to $$G(S)$$ that sends each element of $$S$$ to the corresponding group generator, i.e., $$a \mapsto t_a$$.

The group completion of $$S$$ is the initial object in the category of groups with magma homomorphisms to them from $$S$$, where the morphisms are group homomorphisms with the map from $$S$$ getting induced by composition.

The homomorphism from $$S$$ to $$G(S)$$ is not necessarily injective. In fact, for the map to be injective, a necessary but not sufficient condition is that the magma be a cancellative semigroup.

Facts
The group completion functor is a left adjoint to the obvious forgetful functor from groups to magmas.