Conditions under which Commutative Semigroup is Group

Theorem
Suppose the following:

Then $\struct {S, \circ}$ is a group.

Proof
Some lemmata: