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:
> 1. 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$.
> 
>  
> Is $S$ a group?
> 


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?



Do these conditions on a semigroup define a group?
I am a victim of timing... I had asked this of a colleague a few days ago and had received no answers, but today at lunch he gave me a counterexample and reference (Clifford and Preston's *The Algebraic Theory of Semigroups*, volume II, pp. 82-86). The example is the Baer-Levi semigroup: the semigroup of all one-to-one mappings $\alpha$ of a countable set $X$ into itself such that $X\setminus \alpha(X)$ is not finite. 


Left cancellation follows trivially; if $a$ and $b$ are such mappings, then to construct $c\in S$ such that $a=cb$ proceed as follows: if $y=b(x)\in b(X)$, set $c(y)=c(b(x))=a(x)$. Now let $\delta$ be a one-to-one map from $X\setminus b(X)$ to $X\setminus a(X)$ with $(X\setminus a(X))\setminus\delta(X\setminus b(X))$ infinite. Then define $c(y)$ for $y\notin b(X)$ by $c(y)=\delta(y)$. 


