give a counterexample of monoid If $G$ is a monoid, $e$ is its identity, if $ab=e$ and $ac=e$, can you give me a counterexample such that $b\neq c$? 
If not, please prove $b=c$.
Thanks a lot.

Yes, there is a simpler example.
Let $G$ be the free monoid over $A =\{a,b,c\}$ satisfying the relations $ab = ac =e$. 
Intuitively, $G$ is the set of all finite strings over $A$ that contain neither the subword $ab$ nor $ac$.  Or, think of $b$ and $c$ as different but both of which cancel a single trailing $a$ when multiplied on the right.

If you are concerned that we must show $b \neq c$, then do it this way instead. Forget the part about relations and just define $G$ as strings over $A=${a,b,c}, that is: $G \subset A^*$, $G = \{x \in A^*:\text{neither }ab\text{ nor }ac\text{ is a subword of }x\}$ or $G = A^* - A^*abA^* - A^*acA^*$. Multiplication in $G$ is ordinary string catentation, except for two special cases: $xa \cdot by = xy$ and $xa \cdot cy = xy$ for $x, y \in G$. You can easily verify that $G$ with this multiplication is a monoid and meets the criteria, and there is no reason to worry that $b=c$.
In particular, the strings "$b$" and "$c$" are both in the free monoid $A^*$ and nothing in the subtraction of sets removes them, nor do any of the multiplication rules, so they are still in $G$. So therefore the monoid elements $b$ and $c$ in $G$ are distinct.

addendum -- This G is the "simplest" possible in the sense of being universal.  That is, for any morphism $f$ and monoid $M$ satisfying the criteria $f(ab)=f(ac)=f(e)=e$, with $f:A^* \rightarrow M$, there is a morphism $g:G \rightarrow M$ with $g(x)=f(x) \text{ for all } x \in A$. $g$ simply acts properly on $A$ and then extends to $A^*$
That cannot be said of Barry's monoid of functions: $S \rightarrow S$ because it has extra structure, namely $ba=ca=e$ and others. So even if you use just the closure of $\{a,b,c,e\}$ under function composition (rather that all functions: $S \rightarrow S$), you'd have extra structure in S versus the free case, which prevents it from acting universal wrt G.
