In a semigroup does left identity and right inverse imply a group?

Say we have a set $ G $ with the properties

  1. $ G $ is closed under some opperation $ \circ $
  2. $ G $ is associative under $ \circ $
  3. There exists an element $ e\in G $ such that for every $ g \in G $ we have \begin{align*} e\circ g=g . \end{align*}
  4. For every $ g\in G $ there exists $ g^{-1}\in G $ such that \begin{align*} g\circ g^{-1}=e. \end{align*} Is it a group?

I have tried manipulating the expressions to get the standard definition of a group but to no success. I don't even know if it is true. I found this post Right identity and Right inverse implies a group, which shows something close, but not exactly what I want. Moreover, the top comment states

In case you don't know: Right identity and Left inverse does not imply group.

and I wonder if left identity and right inverse do not imply a group. If anybody could give me some guidance I would greatly appreciate it.


Simple example: let $S = \{a, b\}$ (where $a$ and $b$ are distinct) and define $x \cdot y = y$. Then $S$ is a semigroup with left identity $a$, and corresponding right inverse $x^{-1} = a$ (which is to say, the right inverse of an element $x \in S$ is $a$, regardless of whether $x = a$ or $x = b$).

Note that this left identity, and the corresponding right inverse, is not unique! We could just as easily have nominated the left identity to be $b$, and the right inverse would constantly be $b$ as well.