## Characterize the left ideal of a semigroup generated by a subset

Let $S$ be a semigroup and let $A \subseteq S$ be a nonempty subset. Recall that the left ideal of $S$ generated by $A$ is the intersection $L(A)$ of all the ideals which contain $A$, and similarly for right- and two-sided- ideals.

Prove that the left ideal generated by $A$ is $A \cup SA$ and that the two-sided ideal generated by $A$ is $A \cup SA \cup AS \cup SAS$.

Note that if $L$ is a left ideal containing $A$, then $SA \subseteq L$. In particular, $A \cup SA$ is contained in every left ideal which also contains $A$, and thus is contained in the left ideal generated by $A$. On the other hand, $S(A \cup SA) = SA \cup SSA \subseteq SA \subseteq A \cup SA$, and thus $A \cup SA$ is a left ideal of $S$ which certainly contains $A$. So the left ideal generated by $A$ is contained in $A \cup SA$, so that $L(A) = A \cup SA$.

Similarly, if $I$ is an ideal of $S$ containing $A$, then $A \cup SA \cup AS \cup SAS \subseteq I$. So $A \cup SA \cup AS \cup SAS$ is contained in the ideal $\langle A \rangle$ generated by $A$. And on the other hand, since $S(A \cup SA \cup AS \cup SAS) \subseteq A \cup SA \cup AS \cup SAS$, this set is a left ideal, and likewise a right ideal. So $A \cup SA \cup AS \cup SAS$ is a two sided ideal containing $A$. Hence $\langle A \rangle = A \cup SA \cup AS \cup SAS$.