Nonempty associative quasigroup equals group

History
The fact that a (nonempty) associative quasigroup is the same thing as a group is more than a mere curiosity. Many of the initial definitions of group, including Cayley's first attempted definition in 1854 and Weber's definition in 1882, defined a group as an associative quasigroup, without explicitly mentioning identity elements and inverses.

Statement
Let $$(S,*)$$ be a nonempty magma (set with binary operation) satisfying the following two conditions:


 * 1) $$S$$ is a quasigroup under $$*$$, i.e., for any $$a,b \in S$$, there exist unique $$x,y \in S$$ such that $$a * x = y * a = b$$
 * 2) $$*$$ is associative, or $$S$$ is a semigroup under $$*$$, i.e., for any $$a,b,c \in S$$, we have $$a * (b * c) = (a * b) * c$$

Then $$S$$ is a group under $$*$$.

Conversely, any group is an associative quasigroup. Associativity is part of the definition, and the quasigroup part is also direct.

Related facts

 * Nonempty alternative quasigroup equals alternative loop: Here, alternativity, which is a weaker condition than associativity, also forces a nonempty quasigroup to have a neutral element.

Facts used

 * 1) Equality of left and right neutral element
 * 2) Equality of left and right inverses in monoid

Proof
Associativity is given to us, so we need to find an identity element (neutral element for the multiplication) and inverses.

Finding the identity element (or neutral element)
Since $$S$$ is nonempty, we can pick $$a \in S$$. By the quasigroup condition, find $$e \in S$$ such that $$a * e = a$$.

Now, pick any $$b \in S$$. By the quasigroup condition again, there exists a unique element $$y \in S$$ such that $$y * a = b$$. Plugging in, we get:

$$b * e = (y * a) * e = y * (a * e) = y * a = b$$

Thus, $$e$$ is a right neutral element (or right identity) for the multiplication $$*$$.

By a similar procedure, we can find a left neutral element. Further, since any left and right neutral element are equal, we see that $$e$$ must be a two-sided identity element for $$(S,*)$$.

Finding inverses
If $$e$$ is the identity element, then for any $$a \in S$$, we can find $$x,y \in S$$ such that $$a * x = y * a = e$$. Thus, $$a$$ has both a left inverse and a right inverse. By associativity, any left and right inverse must be equal, so $$a$$ has a two-sided inverse. Thus, every element has a two-sided inverse, so every element is invertible, and $$S$$ is thus a group.