TITLE: Is a semigroup with unique right identity and left inverse a group?
QUESTION [5 upvotes]: We know that a semigroup with a right identity and right inverse for all elements is a group (e.g. see here). Symmetrically, also a left identity together with a left inverse implies a group.
We also know that a semigroup with a right identity and a left inverse is NOT necessarily a group (see here).
My questions are:

in a semigroup, is the existence of a UNIQUE right identity together with the existence of a left inverse enough to have a group?
in a semigroup, is the existence of a right identity together with the existence of a UNIQUE left inverse enough to have a group?

I think both these claims are false,  ut haven't found a counter-example so far.

REPLY [5 votes]: As has been shown in a comment, (2) does not hold.  However, (1) does.
Let $e$ be the unique right identity, and for any $x$, let $x'$ denote a left inverse.
For any $x$,
$$
e = x''x' = x''ex' = x''x'xx' = ex x'.
$$
Hence, for any $y$,
$$
y = ye = yexx' = y xx',
$$
which shows that $xx'$ is a right identity.  Since it is unique, $xx' = e$.  Hence every element $x$ has a two-sided inverse.
Finally, for any $x$,
$$
ex = xx'x = xe = x,
$$
so $e$ is a two-sided identity and the semigroup is a group.