Here is my problem:
Set $G$ a compact semigroup (that is a Hausdorff compact space endowed with an associative continuous binary operation). Assume that the cancellation law holds i.e. for any $g,h,k \in G$ either $gh = gk$ or $hg = kg$ implies $h=k$.
In this setup, how do I show that $G$ is a compact group?
Thank you very much, any help will be appreciated. At first, I wanted to show that any map of the form $g\mapsto ag$ is a homeomorphism of $G$ onto itself. However, I cannot show the surjectivity of such a map.
The result holds for every cancellative nonempty compact semigroup $S$ in which the translations $x \to xs$ and $x \to sx$ are continuous.
First observe that if $S$ contains an idempotent $e$, then $e$ is an identity for $S$. Indeed, if $s \in S$, one has $see = se$ and $es = ees$, whence $es = s = se$ since $S$ is cancellative. It follows that $S$ is a monoid and its identity $1$ is the unique idempotent.
The key argument is Ellis–Numakura lemma, which shows that $S$ contains an idempotent.
Finally, let $s \in S$. Since $x \to sx$ is continuous, $sS$ is a compact semigroup and hence contains an idempotent, necessarily equal to $1$. Thus $s$ has a right inverse and also a left inverse by a dual argument. Thus $S$ is a group.