## Show that two sets of equations define the same subvariety of semigroups

Let $E_1 = \{x = xyx\}$ and $E_2 = \{x^2=x, xy = xzy\}$. Show that these sets of equations define the same varieties of semigroups. (That is, if $S$ is a semigroup, then the equations in $E_1$ hold for all elements if and only if the equations in $E_2$ hold for all elements.)

Suppose $S$ is a semigroup such that for all $x,y \in S$, $x = xyx$. Let $x,y,z \in S$. Now $x = xxx$ and $x = xx^2x$, so that $x = xxxx = xx$. So $x = x^2$ for all $x$. Moreover, $xy = (xy)(xy) = x(yx)y$ $= x(yxzyx)z$ $= xzy$ for all $x,y,z$.

Now suppose $S$ is a semigroup such that for all $x,y,z \in S$, $x = x^2$ and $xy = xzy$. In particular, for all $x,y \in S$, we have $x = xx = xyx$.