Semigroup with left neutral element where every element is right-invertible not equals group

Version with left neutral element and right-invertibility
Suppose $$S$$ is a set with more than one element. It is possible to construct a binary operation $$*$$ on $$S$$ and find an element $$e \in S$$ such that:


 * 1) $$*$$ is an associative binary operation, so that $$(S,*)$$ is a semigroup
 * 2) $$e$$ is a left neutral element for $$*$$: $$e * a = a \ \forall \ a \in S$$
 * 3) For all $$a \in S$$, there exists a right inverse $$b \in S$$ with respect to $$e$$, i.e., $$a * b = e$$.
 * 4) $$S$$ is not a group under $$*$$. In particular, $$e$$ is not a two-sided neutral element.

Version with right neutral element and left-invertibility
Suppose $$S$$ is a set with more than one element. It is possible to construct a binary operation $$*$$ on $$S$$ and find an element $$e \in S$$ such that:


 * 1) $$*$$ is an associative binary operation, so that $$(S,*)$$ is a semigroup
 * 2) $$e$$ is a right neutral element for $$*$$: $$a * e = a \ \forall \ a \in S$$
 * 3) For all $$a \in S$$, there exists a left inverse $$b \in S$$ with respect to $$e$$, i.e., $$b * a = e$$.
 * 4) $$S$$ is not a group under $$*$$. In particular, $$e$$ is not a two-sided neutral element.

Opposite facts

 * Semigroup with left neutral element where every element is left-invertible equals group: The key difference is that we are assuming invertibility on the same side as the side of the one-sided neutral element.
 * Monoid where every element is left-invertible equals group (note that we could replace left by right and the statement would still be true.

Proof for left neutral element and right-invertibility
Define $$*$$ as follows:

$$x * y := y$$

In other words, every element is a right nil.

Let $$e$$ be any element of $$S$$.

We check all the four conditions:

Proof for right neutral element and left-invertibility
Define $$*$$ as follows:

$$x * y := x$$

In other words, every element is a left nil.

Let $$e$$ be any element of $$S$$.

We check all the four conditions: