Polymorphism-homogeneity and universal algebraic geometry

We assign a relational structure to any finite algebra in a canonical way, using solution sets of equations, and we prove that this relational structure is polymorphism-homogeneous if and only if the algebra itself is polymorphism-homogeneous. We show that polymorphism-homogeneity is also equivalent to the property that algebraic sets (i.e., solution sets of systems of equations) are exactly those sets of tuples that are closed under the centralizer clone of the algebra. Furthermore, we prove that the aforementioned properties hold if and only if the algebra is injective in the category of its finite subpowers. We also consider two additional conditions: a stronger variant for polymorphism-homogeneity and for injectivity, and we describe explicitly the finite semilattices, lattices, Abelian groups and monounary algebras satisfying any one of these three conditions.


Introduction
Various notions of homogeneity appear in several areas of mathematics, such as model theory, group theory, combinatorics, etc. Roughly speaking, a structure A is said to be homogeneous if certain kinds of local morphisms (i.e., morphisms defined on "small" substructures of A) extend to endomorphisms of A. Specifying the kind of morphisms that are expected to be extendible, one can define many different versions of homogeneity. We consider a variant called polymorphism-homogeneity introduced by C. Pech and M. Pech [15] that involves "multivariable" homomorphisms: we require extendibility of homomorphisms defined on finitely generated substructures of direct powers of A (see Section 2.4 for the precise definition).
We study polymorphism-homogeneity of finite algebraic structures and of certain relational structures constructed from algebras. Since homomorphisms depend on the term operations, not on the particular choice of basic operations, we work mainly with the clone C = Clo(A) of term operations of the algebraic structure A = (A, F ) (i.e., C is the clone generated by F ; see Section 2.1). An n-ary operation f : A n → A can be regarded as an (n + 1)-ary relation, called the graph of f , denoted by f • (see Section 2.3).
Probably the most natural way to convert A into a relational structure is to consider the graphs of the operations of A, thus we define C • = {f • : f ∈ C} to be the set of graphs of term operations of A. We will prove that if the relational structure (A, C • ) is polymorphism-homogeneous, then the algebra A is also polymorphism-homogeneous, but the converse is not true in general.
To construct a relational structure that is equivalent to A in terms of polymorphism-homogeneity, observe that the relation f • is nothing else than the solution set of the equation f (x 1 , . . . , x n ) = x n+1 . We might consider more general equations where the right hand side is not necessarily a single variable: let C • be the set of solution sets of equations of the form f (x 1 , . . . , x n ) = g(x 1 , . . . , x n ), where f, g ∈ C.
It turns out that (A, C • ) is the "right" choice for a relational counterpart of A: the algebra A is polymorphism-homogeneous if and only if the relational structure (A, C • ) is polymorphism-homogeneous.
The elements of C • are solution sets of single equations, hence intersections of such sets are solution sets of systems of equations. The latter are also called algebraic sets, as they are analogues of algebraic varieties (i) investigated in algebraic geometry; the study of these sets can thus be regarded as universal algebraic geometry [16]. Motivated by the fact that a set of vectors over a field is the solution set of a system of (homogeneous) linear equations if and only if it is closed under affine linear combinations (all linear combinations), we investigated the possibility of characterizing algebraic sets by means of closure conditions in [18,19]. If algebraic sets over A are exactly those sets of tuples that are closed under a suitably chosen set of operations, then we say that A has property (SDC) (see Section 2.3 for an explanation). We will see that this property is equivalent to polymorphism-homogeneity of (A, C • ) and of A.
The categorical notion of injectivity also asks for extensions of certain homomorphisms, so it is not surprising that a finite algebra A is polymorphism-homogeneous if and only if it is injective in a certain class of algebras, namely in the class of finite subpowers of A (see Section 2.5 for the definitions). Perhaps it is more natural to consider injectivity in the variety HSP A generated by A, hence we will also investigate the relationship between this notion and polymorphism-homogeneity. Figure 1 shows the six properties that we are concerned with in this paper. In Section 3 we prove all the implications and equivalences indicated in the figure. It turns out that for finite algebras four of the six conditions are equivalent, thus we have actually three different properties marked by the three boxes. In Section 4 we determine finite semilattices, lattices, Abelian groups and monounary algebras possessing these three properties, and these examples will justify all of the "non-implications" in Figure 1.

Clones and relational clones
Let O

(n)
A denote the set of all n-ary operations on a set A (i.e., maps f : A n → A), and let O A be the set of all operations of arbitrary finite arities on A. In this paper we will always assume that the set A on which we consider operations and relations is finite. The composition of f ∈ O (n) A by g 1 , . . . , g n ∈ O (k) A (i) Note that the word variety has a different meaning in universal algebra: a variety is an equationally definable class of algebras, or, equivalently, a class of algebras that is closed under homomorphic images, subalgebras and direct products.
A set C ⊆ O A of operations is a clone if C is closed under composition and contains the projections We use the symbol C (n) for the n-ary part of C, i.e., A . The clone generated by F ⊆ O A is the least clone Clo(F ) containing F . By the definition of a term operation, Clo(F ) is the clone of term operations of the algebra A = (A, F ), hence we will also use the notation Clo(A) for this clone.
A k-ary partial operation on A is a map h : dom h → A, where the domain of h can be any set dom h ⊆ A k . The set of all partial operations on A is denoted by P A , and the set of all k-ary partial operations on A is denoted by P (k) A . A strong partial clone is a set of partial operations that is closed under composition, contains the projections, and contains all restrictions of its members to arbitrary subsets of their domains. Note that if C ⊆ O A is a clone, then the least strong partial clone Str(C) containing C consists of all restrictions of elements of C, i.e., h ∈ P A belongs to Str(C) if and only if h can be extended to a total operation h ∈ C.
An n-ary relation on A is a subset of A n ; the set of all relations (of arbitrary arities) on A is denoted by R A . Given a set of relations R ⊆ R A , a primitive positive formula Φ(x 1 , . . . , x n ) over R is an existentially quantified conjunction: where ρ i ∈ R is a relation of arity r i , and each z (i) j is a variable from the set {x 1 , . . . , x n , y 1 , . . . , y m } for i = 1, . . . , t, j = 1, . . . , r i . The relation ρ = {(a 1 , . . . , a n ) : Φ(a 1 , . . . , a n ) is true} ⊆ A n is then said to be defined by the primitive positive formula Φ. The set of all primitive positive definable relations over R is denoted by R ∃ , and such sets of relations are called relational clones. If we allow only quantifier-free primitive positive formulas, then we obtain the weak relational clone R ∄ .

Galois connections between operations and relations
If M = (m ij ) ∈ A n×k is an n × k matrix over the set A, then we denote the i-th row and the j-th column of M by M i * and M * j , respectively: A is a partial operation of arity k such that the rows of M are in the domain of h, then we can apply h to each row of M , and then we obtain the n-tuple h(M 1 * ), . . . , h(M n * ) . We may also denote this tuple by h(M * 1 , . . . , M * k ), as it is nothing but the componentwise application of h to the k columns of M . Therefore, we have We will often use the above equality without further mention.
We say that a k-ary (partial) operation h preserves the relation ρ ⊆ A n , denoted as h ⊲ ρ, if for every matrix M ∈ A n×k such that each column of M belongs to ρ (and each row of M is in the domain of h), we have h(M * 1 , . . . , M * k ) ∈ ρ. If R is a set of relations, then we write h ⊲ R to indicate that h preserves all elements of R. In other words, h ⊲ R holds if and only if h is a (partial) polymorphism of the relational structure A = (A, R), i.e., h is a homomorphism from (the substructure dom h of) A k to A. The set of all (partial) operations preserving each relation of R is denoted by Pol R (pPol R), and the set of all relations preserved by each member of a set F of (partial) operations is denoted by Inv F : The closed sets under the Galois connection Pol − Inv (pPol − Inv) between (partial) operations and relations are exactly the (strong partial) clones and the (weak) relational clones; this makes these Galois connections fundamental tools in clone theory. 2,9,17]). For any set of operations F ⊆ O A and any set of relations R ⊆ R A , we have Clo(F ) = Pol Inv F and R ∃ = Inv Pol R. For any set of partial operations F ⊆ P A and any set of relations R ⊆ R A , we have Str(F ) = pPol Inv F and R ∄ = Inv pPol R.

Universal algebraic geometry and centralizers
Let A be a finite algebra and let C = Clo(A) be the clone of term operations of A. If f and g are n-ary term operations of A, then f (x 1 , . . . , x n ) = g(x 1 , . . . , x n ) is an equation in n variables over A, which we may simply write as a pair (f, g). The solution set of (f, g) is then the set Sol(f, g) = {(a 1 , . . . , a n ) ∈ A n : f (a 1 , . . . , a n ) = g(a 1 , . . . , a n )}. Of special interest are the equations of the form f (x 1 , . . . , x n ) = x n+1 ; the solution set of this equation is the (n + 1)-ary relation f • = {(a 1 , . . . , a n , a n+1 ) ∈ A n+1 : f (a 1 , . . . , a n ) = a n+1 )}, which is called the graph of f . We use the symbols C • and C • for the set of graphs and for the set of all solution sets of equations over C: Note that C • ⊆ C • , and it is easy to verify that C • ∃ = C • ∃ (see Lemma 3.2 of [19]), but in general C • ∄ and C • ∄ may be different weak relational clones.
The members of C • ∄ are intersections of solution sets of finitely many equations, i.e., C • ∄ consists of solution sets of finite systems of equations over A. Allowing infinite systems of equations, we obtain the so-called algebraic sets, which are the main objects of study in universal algebraic geometry [16]. Since we deal only with finite algebras, every system of equations is equivalent to a finite system of equations, thus the elements of C • ∄ are exactly the algebraic sets.
As mentioned in Section 1, basic results of linear algebra hint at the possibility that algebraic sets can sometimes be described by closure conditions. It turns out that if there is a clone D such that algebraic sets are exactly those sets of tuples that are closed under D, then D must be the clone C * = Pol C • (see Corollary 3.7 in [19]). This clone is called the centralizer of C, since it consists of those operations that commute with every member of C; in other words, a k-ary operation h belongs to C * if and only if h is a homomorphism from A k to A. (Observe that since C • ∃ = C • ∃ , the centralizer can equivalently be defined as C * = Pol C • , by Theorem 2.1.) If the algebraic sets (i.e., solution sets of systems of equations) of A coincide with the C * -closed sets of tuples, then we say that the algebra A has property (SDC); this abbreviation stands for "Solution sets are Definable by closure under the Centralizer". We proved in [18] that every two-element algebra has this property, and in [19] finite semilattices and lattices with property (SDC) were characterized (see Sections 4.1 and 4.2). In general, property (SDC) is easily seen to be equivalent to the condition C • ∃ = C • ∄ , i.e., the algebra A has property (SDC) if and only if quantifiers can be eliminated from primitive positive formulas over C • . Let us state this fact explicitly for later reference together with a few more equivalent conditions (see Theorem 3.6 of [19]).

Theorem 2.2 ([19]).
For every clone C on a finite set A, the following five conditions are equivalent: (iv) every primitive positive formula over C • is equivalent to a quantifier-free primitive positive formula over C • ; (v) C • ∄ is a relational clone.

Polymorphism-homogeneity
A first-order structure A (i.e., a set A equipped with relations and/or operations) is said to be k-polymorphism-homogeneous, if every homomorphism h : B → A defined on a finitely generated substructure B ≤ A k extends to a homomorphism h : A k → A. (Considering only finite structures, the assumption that B is finitely generated can be omitted from the definition.) The case k = 1 gives the notion of homomorphism-homogeneity introduced by P. J. Cameron and J. Nešetřil [4]. If A is k-polymorphismhomogeneous for every natural number k, then we say that A is polymorphism-homogeneous [15]. These two notions are linked by the following result, which was proved for relational structures by C. Pech and M. Pech [15] and for algebraic structures by Z. Farkasová and D. Jakubíková-Studenovská [6], but the same proof works for arbitrary first-order structures.
In the next proposition we recall a useful result from [15] that relates polymorphism-homogeneity and quantifier elimination for finite relational structures; we give a short proof utilizing the Galois connections between (partial) operations and relations.

Proposition 2.4 ([15]). A finite relational structure has quantifier elimination for primitive positive formulas if and only if it is polymorphism-homogeneous.
Proof: A finite relational structure A = (A, R) has quantifier elimination for primitive positive formulas if and only if R ∄ = R ∃ . Using the Galois connections Pol − Inv (clones and relational clones) and pPol − Inv (strong partial clones and weak relational clones), we can reformulate this condition in several steps to reach polymorphism-homogeneity:

Injectivity
Let K be a class of algebras and A ∈ K. We say that A is injective in K if every homomorphism h : B → A extends to a homomorphism h : C → A whenever B, C ∈ K and B ≤ C. Clearly, if A is injective in K, then A is also injective in every subclass of K that contains A. Injectivity is most often considered in the largest relevant class K; for example, if A is a group or a lattice, then K is usually chosen to be the class of all groups or lattices. In this paper we shall consider smaller classes, namely the variety generated by A and the set of finite subpowers of A. Recall that a class of algebras is a variety if and only if it is closed under direct products, subalgebras, and homomorphic images. The variety generated by A, denoted by HSP A, consists of the homomorphic images of subalgebras of direct powers of A. Analogously, SP fin A denotes the class of subalgebras of finite direct powers of A, and we refer to algebras in this class as finite subpowers of A. Let us mention that in [14] a group A is called relatively injective if it is injective in the variety HSP A.

Polymorphism-homogeneity, algebraic sets and injectivity
First let us prove the equivalences shown on the right hand side of Figure 1. The equivalence of property (SDC) and polymorphism-homogeneity of (A, C • ) follows immediately from Proposition 2.4.

Proposition 3.1. If A is a finite algebra and C = Clo(A), then A has property (SDC) if and only if (A, C • ) is polymorphism-homogeneous.
Proof: By Theorem 2.2, property (SDC) of A is equivalent to quantifier elimination for primitive positive formulas for the relational structure (A, C • ), and the latter is equivalent to polymorphism-homogeneity of (A, C • ) by Proposition 2.4.
In the next theorem we establish the connection between "algebraic" and "relational" polymorphismhomogeneity. We need two technical lemmas for the proof of this result.
A is a k-ary partial operation on A. If dom h is a subalgebra of A k , then the following three conditions are equivalent: Proof: To show that (a) implies (b), assume that h ⊲ C • , and let ρ = Sol(f, g), where f, g ∈ C (n) ; we shall prove that h ⊲ ρ. Let M ∈ A n×k be a matrix such that each row of M belongs to dom h and each column of M belongs to ρ.

(3.2)
All columns of M were assumed to be in the relation ρ = Sol(f, g); therefore, Next suppose that (b) holds; to prove that h is an algebra homomorphism, consider an operation f ∈ C (n) and tuples d 1 , . . . , d n ∈ dom h. Since dom h is a subalgebra, we have f (d 1 , . . . , d n ) ∈ dom h. Let M ∈ A (n+1)×k be the matrix whose rows are Finally, assume (c) and let us verify (a). Let f ∈ C (n) , and let M ∈ A (n+1)×k be an arbitrary matrix whose rows and columns belong to dom h and to f • , respectively; in particular, the last row of M is f (M 1 * , . . . , M n * ). We need to show that h(M * 1 , . . . , M * k ) ∈ f • , which is equivalent to f (h(M 1 * ), . . . , h(M n * )) = h(f (M 1 * , . . . , M n * )). The latter equality is justified by the fact that h is a homomorphism. Proof: If a ∈ [dom h], then a can be obtained from the elements of dom h by an operation t ∈ C.
Adding inessential variables to t if necessary, we can assume that actually all elements of dom h are used, and thus the arity of t is m := |dom h|. Therefore, we can write a = t(d 1 , . . . , d m ), where dom h = {d 1 , . . . , d m } and t ∈ C (m) . We then define the desired extension of h at a by h(a) = t(h(d 1 ), . . . , h(d m )). (3.4) First we need to verify that h is well defined. Suppose that an element a ∈ [dom h] can be written in more than one way in the above form: Setting ρ = Sol(t 1 , t 2 ) ∈ C • , and letting D ∈ A m×k be the matrix with rows d 1 , . . . , d m , every column of D belongs to the relation ρ. Since h preserves ρ, we have h(D * 1 , . . . , D * k ) ∈ ρ, and therefore t 1 (h(D * 1 , . . . , D * k )) = t 2 (h(D * 1 , . . . , D * k )) holds. This implies that h is well defined, as the value of h(a) in (3.4) does not depend on the particular choice of the operation t: Choosing = g(t 1 , . . . , t n )(d 1 , . . . , d m ).

Theorem 3.4. If A is a finite algebra and C = Clo(A), then A is polymorphism-homogeneous if and only if (A, C • ) is polymorphism-homogeneous.
Proof: Assume first that A is polymorphism-homogeneous, and consider an arbitrary partial polymorphism h of (A, C • ), i.e., h ∈ P (k) A preserves C • . By Lemma 3.3, h can be extended to a C • -preserving partial operation h defined on the subalgebra [dom h] ≤ A k . Applying Lemma 3.2 to h, we see that h is an algebra homomorphism from [dom h] to A. Since A is polymorphism-homogeneous, h extends to a homomorphism h : A k → A. Using Lemma 3.2 again, we see that h preserves C • , hence it is a polymorphism of the relational structure (A, C • ), and this proves that the latter is polymorphism-homogeneous. Now suppose that (A, C • ) is polymorphism-homogeneous, and let h ∈ P (k) A be a homomorphism from a subalgebra dom h ≤ A k to A. Lemma 3.2 shows that h ⊲ C • , i.e., h is a partial polymorphism of (A, C • ). Since (A, C • ) is polymorphism-homogeneous, h can be extended to a polymorphism h of (A, C • ). By Lemma 3.2, h : A k → A is a homomorphism, and this proves that A is polymorphismhomogeneous.
To complete the proof of the equivalences in the box on the right hand side of Figure 1, we relate injectivity and polymorphism-homogeneity.

Proposition 3.5. If A is a finite algebra, then A is polymorphism-homogeneous if and only if A is injective in SP fin (A).
Proof: Assume that A is polymorphism-homogeneous, and let B, C ∈ SP fin (A) such that B ≤ C. Then we have B ≤ C ≤ A k for some k ∈ N; in particular, B is a subalgebra of A k . Therefore, if h : B → A is a homomorphism, then h extends to a homomorphism h : A k → A by the polymorphism-homogeneity of A. A restriction of h then gives a homomorphism form C to A that extends h, thereby proving the injectivity of A.
Conversely, if A is injective in SP fin (A) and h ∈ P (k) A is a homomorphism from a subalgebra dom h ≤ A k to A, then the injectivity of A immediately yields an extension h : A k → A of h, thus A is indeed polymorphism-homogeneous. (ii) A is polymorphism-homogeneous; Proof: Combine propositions 3.1 and 3.5 and Theorem 3.4.
It remains to verify the "one-way" implications in Figure 1. Since HSP(A) ⊇ SP fin (A), it is trivial that if A is injective in HSP(A), then it is also injective in SP fin (A). We end this section by proving the remaining implication; in fact, we formulate it in a bit more explicit form, which will be useful in the next section. Proof: According to Proposition 2.4, we need to prove the following equivalence: This follows immediately from the following chain of containments (the last containment is Lemma 3.2 of [19], the others are trivial):

Examples
We describe explicitly the finite algebras satisfying the properties considered in the previous section in certain well known varieties: semilattices, lattices, Abelian groups and monounary algebras. These characterizations will provide counterexamples showing that the only valid implications among these properties are the ones shown in Figure 1.

Semilattices
If we consider finite semilattices, then it turns out that five of the six conditions of Figure 1 are equivalent, and these semilattices have already been determined in the literature [3,10,19]. (ii) A is polymorphism-homogeneous; (v) A is injective in HSP(A); (vi) A is the semilattice reduct of a finite distributive lattice.
Proof: We know that conditions (i)-(iv) are equivalent (see Corollary 3.6), and it was proved in Theorem 5.5 of [19] that (i) is equivalent to (vi). G. Bruns and H. Lakser [3] and, independently, A. Horn and N. Kimura [10] showed that the injective objects in the category of semilattices are the semilattice reducts of completely distributive lattices. Therefore, if A is the semilattice reduct of a finite distributive lattice, then A is injective in the variety of all semilattices, thus A is also injective in HSP(A). This proves that (vi) implies (v), and taking into account that (v) obviously implies (iv), the proof is complete.
The top left condition of Figure 1, i.e., polymorphism-homogeneity of (A, C • ), is not equivalent to the others; in fact, it is satisfied only by the trivial semilattices. If S can be defined by a quantifier-free primitive positive formula Φ over C • , then we can assume without loss of generality that Φ consists of a single equality, as S misses only one element of {0, 1} 3 (in other words, S is meetirreducible in the lattice of subsets of {0, 1} 3 ). Thus Φ is of the form f (x i , x j , x k ) = x ℓ with i, j, k, ℓ ∈ {1, 2, 3}. Taking associativity, commutativity, and idempotence of the operation ∧ into account, we have the following possibilites for Φ (excluding those trivial cases where the left hand side coincides with the right hand side): It is easy to check that S does not satisfy any of the equalities above; therefore, S cannot be defined by a quantifier-free primitive positive formula over C • . Thus S belongs to C • ∄ but not to C • ∄ , hence (A, C • ) is not polymorphism-homogeneous by Proposition 3.7.

Lattices
For finite lattices the situation is very similar to the case of semilattices: five of the six conditions of Figure 1 are equivalent, and the sixth one is satisfied only by trivial lattices. (ii) A is polymorphism-homogeneous; (vi) A is a finite Boolean lattice (i.e., a direct power of the two-element chain).
Proof: Just as in the proof of Theorem 4.1, the equivalence of (i)-(iv) follows from Corollary 3.6, and the equivalence of (i) and (vi) is Theorem 4.8 of [19]. (Let us mention that I. Dolinka and D. Mašulović [5] proved that a finite lattice is homomorphism-homogeneous if and only if it is a chain or a Boolean lattice. This together with Proposition 2.3 can also be used to prove that (ii) and (vi) are equivalent.) To complete the proof, it suffices to prove that (vi) implies (v). This follows immediately from a result of R. Balbes [1]: the injective objects in the category of distributive lattices are the complete Boolean lattices (observe that if A is a nontrivial Boolean lattice, then HSP(A) is the variety of distributive lattices).
Note that since f is generated by the lattice operations ∨ and ∧, it is a monotone function. We consider four cases corresponding to the variable u.

Abelian groups
For Abelian groups all six conditions of Figure 1 are equivalent, and these groups have already been determined, so we only need to combine some results from the literature to prove the following theorem. (i) A has property (SDC); (ii) A is homomorphism-homogeneous; (iii) A is polymorphism-homogeneous; (vii) A is injective in HSP(A); (viii) each Sylow-subgroup of A is homocyclic, i.e., A ∼ = Z m1 q1 × · · · × Z m k q k , where q 1 , . . . , q k are powers of different primes and m 1 , . . . , m k ∈ N.
Proof: Conditions (i), (iii), (iv) and (vi) are equivalent by Corollary 3.6. By Proposition 3.7, (iv) is equivalent to (v), since we have C • ∄ = C • ∄ for groups: every equality can be written in an equivalent form where there is only a single variable on the right hand side. The equivalence of (ii) and (viii) follows from the description of quasi-injective Abelian groups presented as an exercise in [7] (for finite groups quasi-injectivity is equivalent to homomorphism-homogeneity). The class of groups given in (viii) is closed under taking finite direct powers, so we can conclude with the help of Proposition 2.3 that (iii) and (viii) are equivalent. It seems to be a folklore fact that the injective members of the variety of Abelian groups defined by the identity nx = 0 with n = q 1 · . . . · q k are exactly the groups given by (viii) (see, e.g., [8]). Therefore, (viii) implies (vii), and this completes the proof, as (vii) trivially implies (vi).

Monounary algebras
A monounary algebra is an algebra A = (A, f ) with a single unary operation f ∈ O (1) A . An element a ∈ A is cyclic if there is a natural number k such that f k (a) = a. (Here f k (a) stands for f (· · · f (a) · · · ) with a k-fold repetition of f , and we also use the convention f 0 (a) = a.) If A is finite, then for every element a ∈ A there is a least nonnegative integer ht(a), called the height of a, such that f ht(a) (a) is cyclic. If a ∈ A \ f (A), i.e., a has no preimage, then we say that a is a source. (Note that ht(a) = 0 if and only if a is cyclic; in particular, ht(a) ≥ 1 for any source a.) Polymorphism-homogeneous monounary algebras were characterized by Z. Farkasová and D. Jakubíková-Studenovská in [6] using Proposition 2.3 and the description of homomorphism-homogeneous monounary algebras obtained byÉ. Jungábel and D. Mašulović [13]. As an illustration of the results of Section 3, we present a simple self-contained proof, which relies on the following technical lemma about quantifier elimination in monounary algebras. Proof: We use Theorem 3.4: we prove that the existence of Ψ k is necessary and sufficient for polymorphism-homogeneity of (A, C • ). By Proposition 2.4, the necessity is obvious; to prove sufficiency, let us consider an arbitrary primitive positive formula Φ(x 1 , . . . , x n ) over C • . We show how to eliminate one quantifier; repeatedly applying this procedure we can eliminate all quantifiers from Φ. So we may assume without loss of generality that Φ involves only one quantifier, hence it has the following form: where t, r i , s i are nonnegative integers, and the variables u i , v i belong to the set {x 1 , . . . , x n , y} for i = 1, . . . , t. We define the weight of Φ as Informally speaking, w(Φ) shows how "deeply" y is involved in Φ. If y occurs in at least two equalities in Φ, then we can use (at least) one of the following four types of substitutions to decrease the weight of the formula (we omit trivial equalities): After finitely many steps we arrive at a formula Φ ′ such that Φ ′ is equivalent to Φ, and it is not possible to decrease the weight of Φ ′ any more using the substitutions above. This implies that the variable y appears in at most one equality in Φ ′ . We have one of the following three cases for Φ ′ .
1. If y does not appear at all, then we can simply drop the quantifier ∃y from Φ ′ .
2. If y appears in an equality of the form f k (y) = f ℓ (y), then there is no "interaction" between y and the other variables. If there is an element a ∈ A such that f k (a) = f ℓ (a), then we can again omit the quantifier ∃y and the equality f k (y) = f ℓ (y) from Φ ′ , and the resulting quantifier-free formula is equivalent to Φ ′ (hence also equivalent to Φ). If there is no element a ∈ A such that f k (a) = f ℓ (a), then Φ ′ (x 1 , . . . , x n ) is never satisfied: it defines the empty n-ary relation. In this case the empty relation can be defined by the quantifier-free formula f k (x 1 ) = f ℓ (x 1 ), thus this formula is equivalent to Φ.
3. If y appears in an equality of the form f k (y) = f ℓ (x i ), then let Φ ′′ (x 1 , . . . , x n ) be the formula that is obtained from Φ ′ by deleting the quantifier ∃y and the equality f k (y) = f ℓ (x i ). Then the quantifier-free formula Φ ′′ (x 1 , . . . , x n ) & Ψ k (f ℓ (x i )) is equivalent to Φ, according to (4.1). (ii) A is polymorphism-homogeneous; (v) Either A has no sources, or all sources of A have the same height: ∀a, b ∈ A\f (A) : ht(a) = ht(b).
Proof: Conditions (i)-(iv) are equivalent by Corollary 3.6, so it suffices to prove the equivalence of (ii) and (v). As a preliminary observation, let us note that an element a ∈ A is cyclic if and only if a = f ℓ (a), where ℓ is the least common multiple of the lengths of the cycles of A.
Suppose that (v) holds, and assume first that there are no sources in A. Then every element is cyclic, thus the formula x = x can be chosen for Ψ k (x) in (4.1) for all k ∈ N. Suppose now that all sources in A have the same height n ≥ 1. If k ≥ n, then an arbitrary element a ∈ A can be written as a = f k (a 0 ) for a suitable a 0 ∈ A if and only if a is cyclic. Thus, the formula x = f ℓ (x) can be chosen for Ψ k (x), whenever k ≥ n. Similarly, if k < n, then ∃a 0 ∈ A : a = f k (a 0 ) holds if and only if ht(a) ≤ n − k, i.e., if f n−k (a) is cyclic. Therefore, we can put f n−k (x) = f n−k+ℓ (x) for Ψ k (x) in this case. This proves that (v) implies (ii), according to Lemma 4.8.
Conversely, assume that there exist formulas Ψ k (x) satisfying (4.1). We can write Ψ 1 (x) in the following form, and we can assume without loss of generality that r i < s i for i = 1, . . . , t: If a is a cyclic element, then Ψ 1 (a) must hold according to (4.1). This implies that r i ≡ s i (mod ℓ) for all i ∈ {1. . . . , t}.
Now suppose for contradiction that there exist sources a, b ∈ A \ f (A) with ht(a) < ht(b). Clearly, Ψ 1 (f (b)) must be true by (4.1), thus we have f ri (f (b)) = f si (f (b)) for each i. This is equivalent to f ri+1 (b) = f si+1 (b), which implies that f ri+1 (b) is a cyclic element (recall that r i < s i ), hence we have ht(b) ≤ r i + 1. Since ht(a) ≤ ht(b) − 1, we can conclude that ht(a) ≤ r i , i.e., f ri (a) is a cyclic element. The length of every cycle is a divisor of ℓ, and we know that r i ≡ s i (mod ℓ), thus f ri (a) = f si (a). This means that Ψ 1 (a) is true, contradicting the fact that a is a source.
Next we determine finite monounary algebras corresponding to the top left box of Figure 1. Proof: If f is constant, then it is clear that (A, C • ) is polymorphism-homogeneous. Assume now that f is bijective. Then the condition of Theorem 4.9 is satisfied (there are no sources at all), so A is polymorphism-homogeneous, and thus by Theorem 3.4 (A, C • ) is polymorphism-homogeneous as well. Therefore, by Proposition 3.7, it suffices to show that C • ∄ = C • ∄ . This is clear, as any equality of the form f k (x) = f ℓ (y) with k < ℓ is equivalent to x = f ℓ−k (y), since f is bijective (here x and y might be the same variable).
For the other direction, let us suppose that (A, C • ) is polymorphism-homogeneous. By Proposition 3.7, (A, C • ) is also polymorphism-homogeneous, and then Theorem 4.9 (together with Theorem 3.4) implies that either there are no sources, or there is an integer n ≥ 1 such that every source in A has height n. If there are no sources in A, then every element is cyclic, and therefore f is bijective. From now on let us suppose that A has sources with a common height n. Proposition 3.7 shows that there exists a quantifierfree primitive positive formula Φ(x, y) over C • such that Φ(x, y) is equivalent to f (x) = f (y). We can write Φ(x, y) in the following form: where t, r i are nonnegative integers, and u i , v i ∈ {x, y} for i = 1, . . . , t. Obviously, Φ(a, a) holds for every element a ∈ A. Let us choose a to be of height n, i.e., let a be a source. Then f ri (u i ) = v i holds for u i = v i = a if and only if r i = 0, thus Φ(x, y) is equivalent either to x = y or to x = x. Taking into account that Φ(x, y) is also equivalent to f (x) = f (y), we can conclude that f (x) = f (y) ⇐⇒ x = y or f (x) = f (y) ⇐⇒ x = x. In the first case f is a bijection, and in the second case f is constant.
Injective objects in the category of all monounary algebras were determined by D. Jakubíková-Studenovská [11]; in the finite case these are exactly the monounary algebras A = (A, f ) where f is bijective and has a fixed point. However, in order to complete the picture of Figure 1 for monounary algebras, we need to describe those monounary algebras A that are injective in the variety HSP A. This has been done by D. Jakubíková-Studenovská and G. Czédli, but this result appeared only in Hungarian in the masters thesis [12] of T. Jeges, a student of G. Czédli.