Semigroup is Group Iff Latin Square Property Holds

Theorem
Let $\left({S, \circ}\right)$ be a semigroup.

Then $\left({S, \circ}\right)$ is a group iff for all $a, b \in S$ the Latin square property holds in $S$:


 * $a \circ x = b$


 * $y \circ a = b$

$\left({S, \circ}\right)$ is Group Implies $\left({S, \circ}\right)$ is Semigroup with Property
$\left({S, \circ}\right)$ is a semigroup by the definition of a group.

It is a semigroup for which the property holds by Unique Solution of Group Equation.

$\left({S, \circ}\right)$ is Semigroup with Property Implies $\left({S, \circ}\right)$ is Group
Taking the group axioms in turn:

G0: Closure
$\left({S, \circ}\right)$ is semigroup.

G1: Associativity
$\left({S, \circ}\right)$ is semigroup so $\circ$ is associative by definition.

G2: Identity
Let $a \in S$.

Then there is an $x \in S$ such that:

Let $b \in S$.

Then there is a $y \in S$ such that:

Proving that $x$ is a right identity:

Let $c \in S$.

Then there is a $z \in S$ such that:

Proving that $x$ is a left identity and thus an identity:

Relabel $x$ as $e$.

G3: Inverses
Let $x \in S$.

Then $x$ has a right and left inverse by the property as there exists a $y$ and $z$ in $S$ such that:

We shall prove that $y$ is also the left inverse of $x$:

Hence every element of $S$ has a inverse.