a characterization for subgroups of cancellative monoids. Suppose $S$ is a cancellative monoid and $A\subseteq S$ and
$$\{(x,y)\in S ^2\mid y\in Ax\}, ~ \{(x,y)\in S ^2\mid y\in xA\}$$
are equivalence relations on $S$. Is $A$ a group?
 A: Denote the first equivalence relation by $\sim_L$ (for multiplication by $A$ from the Left) and the second by $\sim_R$ (from the Right).  Let's assume $S \neq \emptyset$ so let $y \in S$.  Then $y \sim_L y$ (this is reflexivity, which always holds for an equiv. relation), so there exists some $a \in A$ such that $y = ay$.  Since $S$ is cancellative, we deduce that $a = 1$, so $1 \in A$.  \
Next, suppose $a \in A$.  Let $x \in S$ and set $y := ax$ and $z := xa$.  Then by definition, $y \sim_L x$ and $z \sim_R x$, so by symmetry of equivalence relations, $x \sim_L y$ and $x \sim_R z$, i.e. there are $a',a'' \in A$ such that $x = a'y = a'ax$ and $x = za'' = xaa''$ by definition.  Then, by cancellativity, $a'a = 1 = aa''$.  But then $a'' = 1a'' = (a'a)a'' = a'(aa'') = a'$ (associativity holds since we're in a monoid), so $a$ has an inverse, namely $a' = a''$.‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌ \
Lastly, if $a,b \in A$ then for $x \in S$, set $y := bx$ and $z := ay$.  Then $z \sim_L y$ and $y \sim_L x$, so by transitivity, $z \sim_L x$, so there exists some $c \in A$ such that $z = cx$.  But $cx = abx$ implies that $ab = c \in A$ by cancellativity, so $A$ is closed under multiplication, so $A$ is a group provided that it is non-empty.  
