Show that $G$ is a group if the cancellation law holds when identity element is not sure to be in $G$ Having already read through show-that-g-is-a-group-if-g-is-finite-the-operation-is-associative-and-cancel, however in Herstein's Abstract Algebra, I was required to prove it when we're not sure if identity is in the set.
If $G$ is a finite set close under an associative operation such that $ax=ay$ forces $x=y$ and $ua=wa$ forces $u=w$, for every $a, x, y, u, w\in G$, prove that $G$ is a group.
How to show it then? I have no idea what to do at all.

For an element $a\in G$, there will exist an element $e\in G$ such that $ae=a$ (why?). Now you can show, using associativity and cancellation, that $e$ is both a left and right identity for every element of $G$ (not just $a$), and you can use the argument from before to finish.
