Is the equational theory of this "orthocentrish" algebra finitely based? Let $\mathcal{A}$ be the algebra (in the sense of universal algebra) whose underlying set is the four-element set $\{a,b,c,d\}$ and whose structure consists just of the ternary operation $F$ defined as follows:

*

*$F(x,x,x)=x$.


*If $x\not=y$ then $F(x,x,y)=F(x,y,x)=F(y,x,x)=y$.


*If $x,y,z$ are pairwise distinct, then $F(x,y,z)$ is the unique element of $\{a,b,c,d\}\setminus \{x,y,z\}$.
This $\mathcal{A}$ is a kind of "toy (and total) model" of the orthocenter, from an equational perspective. In another question I asked whether the equational theory of the orthocenter (appropriately construed) is finitely axiomatizable; in retrospect that seems more difficult than I'd expected, so I'd like to look at this toy model first:

Is the equational theory of $\mathcal{A}$ finitely based?

 A: This algebra is finitely based.
In fact, if you choose any bijection from $\{a,b,c,d\}$ to $\mathbb Z_2\times \mathbb Z_2$, then you can transport the operation $F(x,y,z)$ to $\mathbb Z_2\times \mathbb Z_2$ it find that it is $x-y+z$. The resulting algebra $\langle \mathbb Z_2\times \mathbb Z_2; x-y+z\rangle$ is the square of the algebra $\langle \mathbb Z_2; x-y+z\rangle$. Since an algebra and its square have the same equational theory, the question reduces to: Is $\langle \mathbb Z_2; x-y+z\rangle$ finitely based?
Roger Lyndon proved in 1951 that all $2$-element algebras are finitely based. In his paper, the algebra $\langle \mathbb Z_2; x-y+z\rangle$ is referred to as 'system $L_4$'. This is one of fifteen systems he deals with in Section I of his paper. Lyndon does not provide an equational basis for this algebra, but writes ``a complete set of axioms [for each of the systems in Section I] can be chosen by inspection from the various familiar sets of axioms for Boolean algebras and Boolean rings''.
I claim that the following identities suffice:

*

* $F(x,x,y) = F(x,y,x) = F(y,x,x) = y$.

* $F(F(x_1,x_2,x_3),F(y_1,y_2,y_3),F(z_1,z_2,z_3))=F(F(x_1,y_1,z_1),F(x_2,y_2,z_2),F(x_3,y_3,z_3)).$
The reason these are enough is that $F(x,x,y)=F(y,x,x)=y$ (part of the first bullet point) states that $F$ is a Maltsev operation. The law from the second bullet point states that $F$ commutes with itself. H. P. Gumm showed that any Maltsev operation that commutes with itself on a set $A$ must be $x-y+z$ for some abelian group structure on $A$. Now the law $F(x,y,x) = y$ implies that $-y=y$ for this abelian group. Hence any model of the bulleted identities must be $\langle A; F(x,y,z)\rangle$ where $F(x,y,z) = x-y+z$ for some abelian group of exponent $2$ on $A$. Any two such things have the same equational theory.  In fact, if $\langle A; F(x,y,z)\rangle$ and $\langle B; F(x,y,z)\rangle$ are nontrivial and satisfy these identities, then each is embeddable in a power of the other. This is enough to prove that the set of bulleted identities axiomatizes an equationally complete theory, hence forms a basis of identities for any of its nontrivial models.
