As is well known, if $S$ is a semigroup in which the equations $a=bx$ and $a=yb$ have solutions for all $a$ and $b$, then $S$ is a group. This question arose when someone misunderstood the conditions as requiring that the solution to both equations be the same element of $S$. He suggested instead replacing one of the equations with a cancellation condition (he was thinking along the lines of trying to specify that the Cayley table would be a latin square). It is easy to see that there are semigroups that are not groups in which every equation of the form $a=xb$ has a solution and you can cancel on the right (the standard example that sets $ab=a$ for all $a,b$ works). What is not clear to me is what happens if the equations and cancellations are on the same side. That is:

Suppose $S$ is a semigroup in which the following two conditions hold:Is $S$ a group?

- For all $a,b\in S$ there exists $x$ such that $a=xb$.
- For all $a,b,c\in S$, if $ab=ac$ then $b=c$.

It is easy to see that if $S$ contains an idempotent, then $S$ will be a group: if $e^2=e$, then for all $a\in S$ we have $e^2a=ea$, so $ea=a$ for all $a$; then solving $e=xa$ shows $S$ has a left identity and left inverses, hence is a group. In particular, $S$ will be a group if at least one cyclic subsemigroup of $S$ is finite, and also in particular if $S$ is finite.

I suspect that the answer will be "no" in full generality (that is, there are examples of semigroups $S$ that satisfy 1 and 2 above but are not groups), but I have not been able to construct one. Does any one have an example, a proof that $S$ will always be a group under these conditions, or a reference?