Is it true that a semigroup which has a left identity element and in which every element has a right inverse is a group?
My attempt: Let $G$ a semigroup and $a\in G$, so exist $a^{-1}\in G$ such that $a*a^{-1}=e$. Also, $a*a^{-1}\in G$. Then: $(a^{-1}*a)(a^{-1}*a)^{-1}=(a^{-1}*a)(a^{-1}*a)=a^{-1}*(a*a^{-1})*a=a^{-1}*e*a=a^{-1}*a=e$. So, $a$ has leftt inverse, therefore $G$ is group.
Is correct my attempt? Something wrong? I really appreciate your help.
Your argument is necessarily wrong, here's why.
Call $S\neq \emptyset$ a right zero semigroup if $xy = y$ for all $x, y\in S$. Pick any $e\in S$. Then $e$ is a left identity of $S$, and for any $x\in S$ there is $x^{-1}\in S$ such that $xx^{-1} = e$, namely we can set $x^{-1} = e$.
In fact, semigroups which have left identity and right inverses (wrt this left identity) are precisely those isomorphic to one of the form $G\times S$ for some right zero semigroup $S$ and a group $G$, where $G\times S$ is a product of semigroups.
For such a semigroup to be a group you need either both left identity and left inverses, or both right identity and right inverses.