A question regarding equational bases of the theory of the commutative and associative properties Suppose we are working in the language of a binary operation symbol $*$. Let $S$ be a set of equations which generate precisely the same equational theory generated by the set containing the commutative and associative equations: $\{ x*y=y*x, (x*y)*z=x*(y*z) \}$. Suppose further that $S$ has at least three elements. Must $S$ have at least one redundant equation? I asked this on MSE, but got no response, so I am asking it here.
 A: Yes it's true.
Write $S=(s_i=t_i)_{i\in I}$ with $s_i,t_i$ in some free magma on $k_i$ generators, where each of the $k_i$ variables appears in either $s_i$ or $t_i$.
First, since $\mathbf{N}$ with addition satisfies this theory, we see that the length of $s_i$ and $t_i$ (number of letters) are the same. Call it $n_i$. We suppose no relation is redundant.
If $n_i\ge 3$ for all $i$, then we have a non-commutative model of the theory ($\{x,y,u,v,0\}$ with $xy=u$, $yx=v$, other products equal $0$), contradiction.
So there exists $j$ with $n_j\le 2$. If $k_j=4$, we have the relation $x_1x_2=x_3x_4$ which obviously doesn't hold in every commutative semigroup. Same if $k_j=3$ (relation $x_1x_2=x_1x_3$ or $x_1x_2=x_3x_1$). Also $k_j=1$ would mean either the redundant relation $x_1=x_1$, or the relation $x_1=x_2$ not true in every commutative semigroup. So $k_j=2$ and we have the commutativity relation (since $x_1x_2=x_1x_2$ would be redundant). For the same reason, $n_i\ge 3$ for all $i\neq j$ since otherwise we would obtain a redundant relation.
If $n_i\ge 4$ for all $i\neq j$ there is a non-associative model $\{x,y,z,u,0\}$ with $xy=yx=z$, $xz,zx=u$ all other products equal 0.
Hence $n_i=3$ for some $i$. So $k_i\le 6$. We claim that if $k_i\ge 4$, the relation $s_i=t_i$ does not hold in every commutative semigroup. Indeed, among commutative semigroup, such a relation reduces to one of the following:
$$x_1x_2x_3=x_4x_5x_6,\;x_1x_2x_3=x_1x_4x_5,\; x_1x_2x_3=x_4x_5x_5,$$ $$x_1x_2x_2=x_3x_4x_4,\;x_1x_2x_3=x_1x_4x_4,\;x_1x_2x_3=x_4x_4x_4,\;x_1x_2x_3=x_1x_1x_4,$$
none of which holds in every commutative semigroup.
If $k_i=3$, for commutative semigroup the relation $s_i=t_i$ yields either $x_1x_2x_3=x_1x_2x_3$, or a nontrivial equality which is not true in every commutative semigroup. So $s_i=t_i$ is either the associativity relation (modulo commutative changes), or a trivial (hence redundant) equality. So we have the associativity relation, and all other ones are redundant.
It remains to deal with $k_i\le 2$. If $k_i=1$, since $xxx$ has only one possible meaning in a commutative magma, we have no possibility. Suppose $k_i=2$. So we have a relation yielding, in the associative case, $xxy=xxy$, i.e., the relation $x(xy)=(xx)y$. By the same argument, this is the only relation of length $3$ we can get. But then the equational theory is satisfied by the non-associative commutative model $\{x,y,z,X,Y,Z,u,v,0\}$, with (commutativity being implicit) $xy=Z$, $yz=X$, $xz=Y$, $xX=u$, $yY=v$, all other products being zero.
Note: one can't always remove from an infinite equational theory, a non-redundant one. However one can (a) choose a single representative for all equation (modulo changing variables, reversing equalities. For instance if we have $x_1x_2=x_2x_1$ and $x_1x_3=x_3x_1$ we merge into a single one. After this, we have only finitely many equalities of the same total length (say $s=t$ has length the sum of lengths of $s$ and $t$), and then we can remove redundant ones of total length $\le 6$. Then the above argument works, since it only assumes that there is no redundant equality of length $\le 6$.
