Varieties of groupoids which aren't definitionally equivalent Here is the exercise from Smirnov's book "Varieties of algebras" (in Russian).
Problem: Let $\mathcal{U}$ be the variety of all groupoids $(A, \cdot)$ and $\mathcal{V}$ be the variety of all idempotent groupoids (i.e. satisfying the identity $xx = x$). Prove that these varieties are representatively equivalent, but not definitionally equivalent.
I'm not sure about the term "representatively equivalent" here since there is no such term in Gratzer's "Universal algebra" book and that's my bad translation from Russian. It simply means that there is a representation of $\mathcal{U}$ in $\mathcal{V}$ and conversely.
Here is the definition of representability from Gratzer's book:
Let $\mathcal{U}$ be the variety of type $\tau = \langle n_i\ |\ i \in I \rangle$, then $\mathcal{U}$ is said to have representation in $\mathcal{V}$ if there exists a system of polynomial symbols $P = \{p(x_1, \dots, x_{n_i})\ | \ i \in I\}$ (in the signature of $\mathcal{V}$) such that for all $\mathfrak{A} = (A, F) \in \mathcal{V}$ we have $\mathfrak{A}^P = (A, P) \in \mathcal{U}$, i.e. in every algebra from $\mathcal{V}$ we replace the set $F$ of fundamental operations with the system of polynomial symbols $P$ (obtaining some algebra of type $\tau$) and $P$ is called a representation of $\mathcal{U}$ in $\mathcal{V}$ if all such algebras lie in $\mathcal{U}$.
Attempted solution:
The first part of question is quite simple. Since $\mathcal{V}$ is a subvariety of $\mathcal{U}$ there is a representation of $\mathcal{U}$ in $\mathcal{V}$, which is given by $P = \{p(x, y) = xy\}$. Conversely, $\mathcal{V}$ has a representation in $\mathcal{U}$, which is given by $Q = \{q(x, y) = x\}$. With this operation any groupoid becomes an idempotent groupoid. Hence $\mathcal{U}$ and $\mathcal{V}$ are representatively equivalent.
There is a hint in the book concerning definitional equivalence: "Consider $\mathcal{U}$-free and $\mathcal{V}$-free algebras of rank $1$".
Here is what I can say about free algebras in these varieties:


*

*$\mathfrak{F}_{\mathcal{U}}(\{x\})$ is just the groupoid of non-associative words constructed from $x$ letter with parentheses retained and concatenation operation. In particular, it's infinite.

*$\mathfrak{F}_{\mathcal{V}}(\{x\})$ is one-element groupoid because of idempotence.
Suppose these two varieties are definitionally equivalent: there exist a representation $P$ of $\mathcal{U}$ in $\mathcal{V}$ and a representation $Q$ of $\mathcal{V}$ in $\mathcal{U}$ such that, $(\mathfrak{A}^P)^Q = \mathfrak{A}$ for all $\mathfrak{A} \in \mathcal{V}$ and $(\mathfrak{B}^Q)^P = \mathfrak{B}$ for all $\mathfrak{B} \in \mathcal{U}$.
Further, I think I should consider $\mathfrak{A} = \mathfrak{F}_{\mathcal{V}}(\{x\})$ and
$\mathfrak{B} = \mathfrak{F}_{\mathcal{U}}(\{x\})$ and get a contradiction with something like:
"If two varieties $\mathcal{U}$ and $\mathcal{V}$ are definitionally equivalent with representations $P$ and $Q$ then $(\mathfrak{F}_{\mathcal{V}})^P$ is $\mathcal{U}$-free algebra and  $(\mathfrak{F}_{\mathcal{U}})^Q$ is $\mathcal{V}$-free algebra". 
But I'm sure that this statement is false, just trying to express my idea that there must be a statement which provides some "definitional equivalence invariant" related to free algebras. Moreover, there are no facts in the book concerning the connection between free algebras and definitional equivalence of the varieties.
Question:
What can you say about my statements concerning free algebras in these varieties and ideas about invariant? I need help to understand how to use the hint from the book. Thanks!
 A: A representation $P$ of $\mathcal{U}$ in $\mathcal{V}$ gives rise to a functor $\mathcal{V}\rightarrow \mathcal{U}$. On objects, this is $A\mapsto A^P$. On morphisms, given $f:A\rightarrow B$, we let $f^P$ be the map $A^P\rightarrow B^P$ which agrees with $f$ on underlying sets. This is a homomorphism, because $f$ preserves terms in the signature of $\mathcal{V}$: 
Given an operation $t(x_1,\dots,x_n)$ in the signature of $\mathcal{U}$ represented by the term $p(x_1,\dots,x_n)$ in the signature of $\mathcal{V}$, we have \begin{align*}f^P(t(a_1,\dots,a_n)) &= f(p(a_1,\dots,a_n))\\ &= p(f(a_1),\dots,f(a_n))\\ &= t(f^P(a_1),\dots,f^P(a_n)).\end{align*}
Now if $P$ is a representation of $\mathcal{U}$ in $\mathcal{V}$ and $Q$ is a representation of $\mathcal{V}$ in $\mathcal{U}$, and $P$ and $Q$ are inverses, then the corresponding functors give an isomorphism of categories between $\mathcal{U}$ and $\mathcal{V}$. 
Let $F_\mathcal{U}$ and $F_\mathcal{V}$ be the underlying set functors on $\mathcal{U}$ and $\mathcal{V}$. The isomorphism $P:\mathcal{V}\rightarrow \mathcal{U}$ preserves underlying sets ($F_\mathcal{V} = F_\mathcal{U}\circ P$), and the free functors $\mathfrak{F}_\mathcal{U}$ and $\mathfrak{F}_\mathcal{V}$ are left adjoint to the underlying set functors, so we must have $\mathfrak{F}_\mathcal{V} = Q\circ \mathfrak{F}_\mathcal{U}$.
But in your case, this isn't true, since the free algebras on one generator have different underlying sets.
