Counterexamples in universal algebra Universal algebra - roughly - is the study, construed broadly, of classes of algebraic structures (in a given language) defined by equations. Of course, it is really much more than that, but that's the best one-sentence definition I can give.
I'm very new to universal algebra. So far I've found it incredibly interesting, mainly because it looks at things I was already interested in from a new (to me) perspective, and that's always good; but I don't at all have a firm command of even the basics. For example, the recent question Relatively free algebras in a variety generated by a single algebra made me realize that I'd naively accepted a very false statement: until I thought about it, I'd sort of taken for granted that A is always relatively free in Var(A).
I'm sure this isn't the only false belief I have about universal algebra, and I'm sure I'll hold more in the future; and I'm also sure I'm not alone in this. So my question is:

What are some notable counterexamples (to reasonable hypotheses a student in universal algebra might have) in universal algebra?

I'm specifically interested in universal algebra because, well, it's fairly universal; it seems reasonable that a counterexample in universal algebra would be of interest to algebraists of many different stripes, and hopefully many outside algebra as well. At the same time, universal algebra is distinct enough that counterexamples in universal algebra would hopefully have their own flavor not found necessarily in questions like "counterexamples in group theory," "counterexamples in ring theory," etc. In that vein, I'd especially appreciate counterexamples about topics firmly within universal algebra - say, congruence lattices, or Mal'cev conditions - which nonetheless have "something to say" to other areas of mathematics.
 A: Here is another one I love.  Marcel Jackson showed that there is a finite semigroup with a finite basis for its identities such that the variety it generates contains uncountably many subvarieties.  I would have thought this impossible.  Here is the link:
http://www.sciencedirect.com/science/article/pii/S0021869399982807
A: Here is another great Mark Sapir result. Let $S$ be the three element cyclic semigroup $\langle x\mid x^2=x^3\rangle$.  Then $S$ has no finite basis for its quasi-identities.  I believe Jackson and Volkov later showed that any finite semigroup containing this one also has no finite basis for its quasi-identities.
Related, Mark Sapir showed that although the variety generated by the finite semigroup $\{1,a,b\}$ where $1$ is the identity and $xy=x$ for $x,y\neq 1$ has only fnitely many subvarieties, it has uncountably many subquasivarieties. I recently showed with Margolis and Saliola that $\{1,a,b\}$ has no finite basis of quasi-identities (this is easier than Sapir's result) using hyperplane arrangements.
A: Not sure whether you count this as universal algebra; someone classically-minded probably wouldn't, and someone categorically-minded probably would.  
In any case: it's possible to cook up two nonisomorphic operads that give rise to the same algebraic theory.  Here "operad" means "non-symmetric operad of sets", and by "give rise to" I'm referring to the fact that every operad $P$ has an associated algebraic theory  (which expressed as a monad is $\coprod_{n \geq 0} P_n \times (-)^n$).
This is a counterexample to the general belief that operads are algebraic theories of a special kind.  You still see this belief expressed all over the place, and it's reinforced by the fact that for symmetric operads, different operads genuinely do give rise to different theories.
Edit Here are some details.  From any operad $P$, we can construct its reverse $P^\#$.  It has the same operations as $P$, and the same identity operation, but the order of the composition is reversed.  Thus, $\theta \circ (\theta_1, \ldots, \theta_n)$ in $P^\#$ is $\theta \circ (\theta_n, \ldots, \theta_1)$ in $P$.  It's easy to show that $P$ and $P^\#$ give rise to the same algebraic theory.  
So, to construct our counterexample, we just have to find some operad not isomorphic to its reverse.  This is a bit harder than it sounds.  For instance, any operad that admits a symmetric structure is isomorphic to its reverse, and several other well-known operads are too.  But you can find one in arXiv:math/0404016.  It's obscure enough that I couldn't immediately remember what it was.  There may be simpler examples out there; I think Steve Lack told me one by email.  
A: This is only a counterexample in the loose sense of the word.
Universal algebra students may hypothesize that all interesting fundamental operations studied in universal algebra and related areas have arity at most 2. Even though ternary terms are useful when investigating certain properties of congruence lattices (i.e. Mal'cev conditions), ternary terms rarely pop up as fundamental operations on algebras..
Therefore, algebras with interesting ternary operations are helpful to keep in mind. For example, median algebras are algebras with a single ternary operation $m$ that satisfies the identities:
$$m(a,a,b)=a$$
$$m(a,b,c)=m(b,a,c)=m(b,c,a)$$
$$m(m(a,b,c),d,e)=m(a,m(b,d,e),m(c,d,e)).$$
For example, if $X$ is a distributive lattice, then $(X,m)$ is a median algebra where 
$$m(x,y,z)=(x\wedge y)\vee(x\wedge z)\vee(y\wedge z)=(x\vee y)\wedge(x\vee z)\wedge(y\vee z).$$
See this question for more ternary operations in universal algebra.
A: When one first learns about Birkhoff's HSP Theorem and the variety $\mathcal{V}(\mathbf A)$ generated by the algebra $\mathbf A$, it's a common mistake to think that properties of $\mathbf A$ are inherited by all inhabitants of $\mathcal{V}(\mathbf A)$. For example, if $\mathbf A$ has a modular congruence lattice, then so should every algebra in $\mathcal{V}(\mathbf A)$. (false)
A rule of thumb is to consider whether the property in question is "verbal"---that is, whether it can be specified by a set of equations.  If so, then the property is inherited by all inhabitants of the variety. 
A: There are several very basic facts coming from traditional algebra that are confronted when going to a more "universal" setting. I guess that students that know some group/ring theory might be confused by the fact that

kernels of homomorphisms (in general, congruences and quotients) are not determined by the preimage of $0$.

Although congruences $\theta$ are still determined by $0/\theta$ for Boolean algebras, this doesn't hold for bounded lattices.
When starting studying some lattice theory, it might be difficult to realize that

a subposet of a lattice $L$ that is indeed a lattice need not be a sublattice of $L$.

Finally, I conclude with a horrible example concerning factorization of structures that is somehow related to the previous example. Consider the direct product of two finite, totally ordered semilattices, as in the picture.

Actually, this product has a lattice order. If  you take the subset consisting of the filled points, it is a subsemilattice, it is lattice-ordered and it's still the product of two (smaller) chains.
A: Let me mention the question we struggled with for some time: we could not find examples showing that if you take away finitely many elements from a finitely generated semigroup, so that the resulting subset is a subsemigroup, then neither hopficity, not co-copficity is preserved in general. Strangely, but it's exactly relating (co-)hopficity for semigroups to (co-)hopficity for graphs what made it possible. Here are two links:
http://arxiv.org/abs/1305.6176
http://arxiv.org/abs/1307.6929
(I have to acknowledge though that Ben Steinberg finds Rees index unnatural)
Some other surprising links of semigroup properties to algebraic properties of various relational structures can be found in works on FA-presentable semigroups.
A: Regarding a small model of High School Algebra
M. Jackson, A note on HSI-algebras and counterexamples to Wilkie's identity, Algebra Universalis 36 (1996), 528–535.
A: *

*May be this is too naive, but for people accustomed to more or less conventional algebraic objects (like groups, Lie and associative algebras, etc.), it could be revealing to know that there are universal algebras without proper subalgebras (for one such class of algebars, see, e.g., K. Kaarli, Subalgebras of the squares of weakly diagonal majority algebras,
Studia Sci. Math. Hungar. 49 (2012), N4, 509-524)

*Free semigroups can be embedded into metabelian groups (see, e.g. G. Bergman, 
Hyperidentities of groups and semigroups, Aequat. Math. 22 (1981), 315-317).
A: All free Jónsson-Tarski algebras on a finite nonempty set of generators are isomorphic. Thus free objects may not know their rank. 
Curiously the automorphism group of this free algebra is the famous Thompson simple group $V$. 
A: Not all nonabelian relatively free groups of exponent zero or a prime power are directly indecomposable; not all splitting groups in a variety of exponent zero or a prime power are relatively free.
These were Problems 21 and 22 in Hanna Neumann's Varieties of Groups; Peter Neumann provided examples in A note on the direct decomposablity of relatively free groups. Quart. J. Math. Oxford Ser. (2) 19 1968 67–79, MR  0223437 (36 #6485)
A: For a while it was conjectured that modularity was the "weakest" congruence identity in the following sense: if there was some non-trivial identity satisfied by the congruence lattice of every algebra in a variety, then the variety would have to be congruence modular.  This was refuted by Polin in 1977.
A: McKenzie proved that it is undecidable whether a finite universal algebra has a finite basis of identities. 
A: A deep theorem of Oates and Powell shows that any finite group has a finite basis for its identities. One might think that the same is true for semigroups. But Perkins showed the 6-element semigroup consisting of the $2\times 2$ identity matrix, the zero matrix and the four matrix units $E_{ij}$ is not finitely based.
Mark Sapir, in a tour-de-force work involving symbolic dynamics, proved that this semigroup is inherently nonfinitely based, meaning it cannot belong to any finitely based locally finite variety. Hence any finite semigroup generating a variety containing this semigroup is not finitely based. 
See Sapir's book http://www.math.vanderbilt.edu/~msapir/book/b2.pdf for this and many other nice universal algebra results. 
A: Subalgebras of free algebras are free. True for groups and Lie algebras but false for semigroups or commutative rings. 
A: Following George Bergman's recent preprint
http://arxiv.org/abs/1309.0564
(btw, he is very good at finding strange (counter-)examples in universal algebra!)
we recently found out that the universal group of the subsemigroup from the free monoid $\{a,b,c\}^*$ generated by $\{bc,abcabc,bcabca,bcabcabcabc\}$ is isomorphic to $(\mathbb{Z}\times\mathbb{Z})\ast\mathbb{Z}$, and so non-free, which somehow collides with Nielsen-Schreier theorem.
A: There are compact totally disconnected lattices which are not inverse limits of finite lattices. 
A: A complete semilattice is automatically also a complete lattice. Hence a student might expect that there is no need to distinguish between complete semilattices and complete lattices. However, the complete homomorphisms of complete meet-semilattices in general don't preserve the join operation, so the two structures must really be distinguished.
A: My favorite "counterexample" in universal algebra is the one from Algebras, Lattices, Varieties (Alvin), Exercise 5.1.
Consider two finite algebras that are the same except for a relabeling of the operations. Our intuition tells us (rightly, imho) that these are simply different ways if presenting the same mathematical structure. Formally, however, not only are these distinct mathematical objects, but also they are not even isomorphic!
You can find more details in Exercise 5.1 of the Alvin book mentioned above, or see this blog post.
Fortunately, there are other notions of equivalence (like "term-equivalence" and "polynomial-equivalence") that align better with our intuition in such contexts.
