Finite cancellative semigroup (source code)

= Finite cancellative semigroup

A nonempty <finite set> with an <associative> <binary operation> satisfying both <cancellation laws> is a <group>. For fixed $a$, cancellation makes $x\mapsto ax$ and $x\mapsto xa$ <injective>, hence <surjective>. Choose $e$ with $ae=a$. Then $a(ex)=ax$ gives $ex=x$, and $(xe)x=xx$ gives $xe=x$. Choose $ab=e=ca$; <associativity> gives $c=c(ab)=(ca)b=b$, so $a$ has a two-sided <inverse element>.