EXISTENCE OF FINITE BASES FOR QUASI-EQUATIONS OF UNARY ALGEBRAS WITH 0

Similar documents
October 15, 2014 EXISTENCE OF FINITE BASES FOR QUASI-EQUATIONS OF UNARY ALGEBRAS WITH 0

A strongly rigid binary relation

Equational Logic. Chapter Syntax Terms and Term Algebras

SUBLATTICES OF LATTICES OF ORDER-CONVEX SETS, III. THE CASE OF TOTALLY ORDERED SETS

Semilattice Modes II: the amalgamation property

A GUIDE FOR MORTALS TO TAME CONGRUENCE THEORY

Notes on ordinals and cardinals

MATH 8253 ALGEBRAIC GEOMETRY WEEK 12

Finite Simple Abelian Algebras are Strictly Simple

Jónsson posets and unary Jónsson algebras

Subdirectly Irreducible Modes

Homework Problems Some Even with Solutions

CLASSIFYING THE COMPLEXITY OF CONSTRAINTS USING FINITE ALGEBRAS

arxiv:math/ v1 [math.gm] 21 Jan 2005

Universal Algebra for Logics

A MODEL-THEORETIC PROOF OF HILBERT S NULLSTELLENSATZ

A CHARACTERIZATION OF LOCALLY FINITE VARIETIES THAT SATISFY A NONTRIVIAL CONGRUENCE IDENTITY

COMMUNICATIONS IN ALGEBRA, 15(3), (1987) A NOTE ON PRIME IDEALS WHICH TEST INJECTIVITY. John A. Beachy and William D.

THE EQUATIONAL THEORIES OF REPRESENTABLE RESIDUATED SEMIGROUPS

3. Abstract Boolean Algebras

Mathematics Course 111: Algebra I Part I: Algebraic Structures, Sets and Permutations

Chapter 1. Sets and Mappings

This is a closed subset of X Y, by Proposition 6.5(b), since it is equal to the inverse image of the diagonal under the regular map:

TESTING FOR A SEMILATTICE TERM

AN AXIOMATIC FORMATION THAT IS NOT A VARIETY

Knowledge spaces from a topological point of view

THE CLOSED-POINT ZARISKI TOPOLOGY FOR IRREDUCIBLE REPRESENTATIONS. K. R. Goodearl and E. S. Letzter

Bounded width problems and algebras

Multi-coloring and Mycielski s construction

PETER A. CHOLAK, PETER GERDES, AND KAREN LANGE

PETER A. CHOLAK, PETER GERDES, AND KAREN LANGE

Class Notes on Poset Theory Johan G. Belinfante Revised 1995 May 21

Walker Ray Econ 204 Problem Set 3 Suggested Solutions August 6, 2015

A SUBALGEBRA INTERSECTION PROPERTY FOR CONGRUENCE DISTRIBUTIVE VARIETIES

IDEMPOTENT n-permutable VARIETIES

Part II. Logic and Set Theory. Year

Isomorphisms between pattern classes

LATTICES OF QUASI-EQUATIONAL THEORIES AS CONGRUENCE LATTICES OF SEMILATTICES WITH OPERATORS, PART II

Implicational classes ofde Morgan Boolean algebras

4.4 Noetherian Rings

COLLAPSING PERMUTATION GROUPS

Short Introduction to Admissible Recursion Theory

0 Sets and Induction. Sets

An Algebraic View of the Relation between Largest Common Subtrees and Smallest Common Supertrees

Houston Journal of Mathematics. c 2007 University of Houston Volume 33, No. 1, 2007

FINITELY RELATED CLONES AND ALGEBRAS WITH CUBE-TERMS

VC-DENSITY FOR TREES

8. Distributive Lattices. Every dog must have his day.

Chapter 1 : The language of mathematics.

Theorem 5.3. Let E/F, E = F (u), be a simple field extension. Then u is algebraic if and only if E/F is finite. In this case, [E : F ] = deg f u.

Preliminaries. Introduction to EF-games. Inexpressivity results for first-order logic. Normal forms for first-order logic

Reducts of Polyadic Equality Algebras without the Amalgamation Property

Chapter 1. Sets and Numbers

Completely regular Bishop spaces

9/19/2018. Cartesian Product. Cartesian Product. Partitions

Existential Second-Order Logic and Modal Logic with Quantified Accessibility Relations

Rings and Fields Theorems

Embedding Differential Algebraic Groups in Algebraic Groups

VAUGHT S THEOREM: THE FINITE SPECTRUM OF COMPLETE THEORIES IN ℵ 0. Contents

γ γ γ γ(α) ). Then γ (a) γ (a ) ( γ 1

A Proof of CSP Dichotomy Conjecture

NOTE ON A THEOREM OF PUTNAM S

Finitely generated free Heyting algebras; the well-founded initial segment

This is logically equivalent to the conjunction of the positive assertion Minimal Arithmetic and Representability

MULTIPLICITIES OF MONOMIAL IDEALS

DISJOINT-UNION PARTIAL ALGEBRAS

LOCALLY SOLVABLE FACTORS OF VARIETIES

Π 0 1-presentations of algebras

A GENERAL THEORY OF ZERO-DIVISOR GRAPHS OVER A COMMUTATIVE RING. David F. Anderson and Elizabeth F. Lewis

Boolean Algebras, Boolean Rings and Stone s Representation Theorem

SOLUTIONS TO EXERCISES FOR. MATHEMATICS 205A Part 1. I. Foundational material

ALL NORMAL EXTENSIONS OF S5-SQUARED ARE FINITELY AXIOMATIZABLE

Lecture 2: Connecting the Three Models

A Discrete Duality Between Nonmonotonic Consequence Relations and Convex Geometries

MINIMAL GENERATING SETS OF GROUPS, RINGS, AND FIELDS

Abelian Algebras and the Hamiltonian Property. Abstract. In this paper we show that a nite algebra A is Hamiltonian if the

Factorization in Polynomial Rings

Infinite constructions in set theory

A Do It Yourself Guide to Linear Algebra

Extension of continuous functions in digital spaces with the Khalimsky topology

Löwenheim-Skolem Theorems, Countable Approximations, and L ω. David W. Kueker (Lecture Notes, Fall 2007)

On poset Boolean algebras

Overgroups of Intersections of Maximal Subgroups of the. Symmetric Group. Jeffrey Kuan

= ϕ r cos θ. 0 cos ξ sin ξ and sin ξ cos ξ. sin ξ 0 cos ξ

10. Finite Lattices and their Congruence Lattices. If memories are all I sing I d rather drive a truck. Ricky Nelson

Finite pseudocomplemented lattices: The spectra and the Glivenko congruence

Topology. Xiaolong Han. Department of Mathematics, California State University, Northridge, CA 91330, USA address:

Notes on Ordered Sets

CHAPTER 2. FIRST ORDER LOGIC

5 Set Operations, Functions, and Counting

CONGRUENCE MODULAR VARIETIES WITH SMALL FREE SPECTRA

Constructions of digital nets using global function fields

The complexity of recursive constraint satisfaction problems.

Zaslavsky s Theorem. As presented by Eric Samansky May 11, 2002

Computably Enumerable Algebras, Their Expansions, and Isomorphisms

Axioms of separation

K 4 -free graphs with no odd holes

Sergey Norin Department of Mathematics and Statistics McGill University Montreal, Quebec H3A 2K6, Canada. and

CSE 20 DISCRETE MATH WINTER

Standard Bayes logic is not finitely axiomatizable

Transcription:

EXISTENCE OF FINITE BASES FOR QUASI-EQUATIONS OF UNARY ALGEBRAS WITH 0 D. CASPERSON, J. HYNDMAN, J. MASON, J.B. NATION, AND B. SCHAAN Abstract. A finite unary algebra of finite type with a constant function 0 that is a one-element subalgebra, and whose operations have range 0, 1}, is called a 0, 1}-valued unary algebra with 0. Such an algebra has a finite basis for its quasi-equations if and only if the relation defined by the rows of the non-trivial functions in the clone form an order ideal. 1. Introduction An ongoing question is to determine which finite algebras have a finite basis for their equations or quasi-equations. G. Birkhoff s early work [2] shows that a finite unary algebra with finite type has a finite basis for its equations. More recently, V. K. Kartashov considered commutative unary algebras, that is, unary algebras where every pair of basic operations commute. He showed that every variety of commutative unary algebras of finite type has a finite basis of equations [9]. Note that Kartashov s result includes non-finitely-generated varieties. Mal cev [10] proved that every variety of mono-unary algebras (unars) has a one-element basis of equations. Kartashov has also shown (see [8]) that every finite mono-unary algebra has a finite basis of quasi-equations. Non-existence of finite basis results include that of I. P. Bestsennyi, who showed in [1] that a three-element unary algebra of finite type does not have a finite basis for its quasi-equations if and only if it has as a term reduct one of three bad algebras. Since then, Hyndman [6] showed that any finite unary algebra of finite type with a pp-acyclic relation does not have a finite basis for its quasi-equations. The connection between these results is that the three bad algebras of Bestsennyi all have a pp-acyclic relation. Continuing with the flavour of non-existence of a finite basis, Casperson and Hyndman in [5] show that if the graph of a group operation can be defined using positive primitive formulas, then a finite unary algebra of finite type does not have a finite basis for its quasi-equations. When working with a finite unary algebra, the clone of non-trivial operations can be presented as a table of elements. Properties of the rows of this table can be used to determine if the algebra has a finite basis for its quasi-equations. For particular finite unary algebras that we call 0, 1}-valued unary algebra with 0, and define in the next section, we show that the rows form an order ideal if and only if the algebra has a finite basis for its quasi-equations. 2. 0, 1}-Valued Unary Algebras with 0: Definitions and Main Result Consider a finite unary algebra of finite type, M, with constant 0 that is a oneelement subalgebra and such that the range of all basic operations is included in 1

2 CASPERSON, HYNDMAN, MASON, NATION, AND SCHAAN 0, 1}. Assume that the clone of functions of M is f 0, f 1,..., f s, f s+1 } where f 0 is the constant 0 function and f s+1 is the identity function. We call such an algebra a 0, 1}-valued unary algebra with 0. These algebras are by definition finite and of finite type, and hence generate locally finite varieties. See Figure 1. f 0 f 1... f s f s+1 0 0 0... 0 0 1 0 0 or 1... 0 or 1 1...... m 0 0 or 1... 0 or 1 m... Figure 1. A generic 0, 1}-valued unary algebra with 0. Let M be a 0, 1}-valued unary algebra with 0. For c M define row(c) 0, 1} s to be the tuple f 1 (c),..., f s (c). Let Rows(M) be the s-ary relation Rows(M) = row(c) c M}. This relation is referred to as the rows of M. For ζ Rows(M) and for c in M, when ζ = row(c) we say that ζ is witnessed by c. Note that there may be multiple witnesses for ζ. A partial order on Rows(M) is induced by the order on 0, 1} with 0 < 1. Rows(M) is an order ideal if for every ζ in Rows(M) and every σ 0, 1} s with σ ζ, the row σ is also in Rows(M). This order is important, and indeed the main result of this article is the following.... Theorem 30. Let M be a finite 0, 1}-valued unary algebra with 0. Then M has a finite basis for its quasi-equations if and only if the rows of M form an order ideal. 3. Quasicritical Algebras One direction of the proof of Theorem 29 consists of showing that algebras whose rows form an order ideal have finite bases for their quasi-equations. To show that a finite algebra has a finite basis for its quasi-equations we use the concept of quasicritical algebras. Let Q(M) = ISP(M) be the quasivariety generated by M, and let Q n (M) be the quasivariety of all algebras in HSP(M) that satisfy the at most n-variable quasi-equations of M. For M finite, of finite type, and in a locally finite variety, for a given N there are only finitely many quasi-equations with at most N variables. To show that such an M has a finite basis for its quasiequations, it suffices to show that there exists an N such that for all algebras E we have E Q N (M) implies E ISP(M). In fact, we can restrict our attention to finite algebras E that are quasicritical. We first define quasicriticality and explore the concept generally, and then show how it applies to 0, 1}-valued unary algebras with 0. A finite algebra E is quasicritical if it is not isomorphic to any subdirect product of its proper subalgebras. V. A. Gorbunov shows in [3, 4] that the lattice of subquasivarieties of a locally finite quasivariety V is finite if and only if the number

3 of quasicritical algebras in V is finite. In fact, given two quasivarieties U and V of the same type, if U is a proper sub-quasivariety of V, then there is a quasicritical algebra in V that is not in U. This allows a proof technique to show that two quasivarieties are equal by showing that all quasicritical algebras in one are already in the other, and vice versa. Thus counting (as in [1]) or classifying the quasicritical algebras can assist with determining the existence of a finite basis. Here we develop techniques that give explicit embeddings of appropriate quasicritical algebras into powers of M. The next lemma indicates that, for locally finite varieties, looking at the finite algebras that are quasicritical is sufficient. This lemma underpins the proof of Theorem 6. Lemma 1. Let M be a finite algebra in a locally finite variety K of finite type. If every finite algebra in K that is quasicritical and satisfies the n-variable quasiequations of M is in the quasivariety generated by M, then the n-variable quasiequations of M form a basis of the quasi-equations of M relative to K. Proof. We prove the contrapositive. Assume that the n-variable quasi-equations do not form a basis of the quasi-equations of M relative to K. Set Q(M) = ISP(M). Let Q n (M) be the subquasivariety of K defined by the n-variable quasi-equations of M. We have K Q 1 (M) Q 2 (M)... Q n (M)... Q(M) and Q(M) = n 1 Q n(m). There is an algebra E 1 in Q n (M) that is not in Q(M). This algebra fails a quasiequation Υ of M in s variables for some s > n. There are elements a 1, a 2,..., a s of E 1 which invalidate Υ. Set E 2 to be the subalgebra of E 1 generated by a 1, a 2,... a s. This algebra also fails Υ but satisfies the n-variable quasi-equations. Either E 2 is quasicritical or E 2 can be written as a subdirect product of quasicritical subalgebras. Each of these quasicritical algebras satisfy the n-variable quasi-equations. At least one must fail Υ. Thus there is a quasicritical algebra that satisfies the n-variable quasi-equations of M but not all quasi-equations of M. Note that for a finite unary algebra M of finite type, the variety generated by M is finitely based by Birkhoff s result. Thus, when Lemma 1 can be applied, we produce a finite basis for the quasi-equations. 3.1. Quasicritical Unary Algebras. For finite unary algebras with a one-element subalgebra 0}, there are restrictions on what the structure of a quasicritical algebra can be. Lemma 2. Assume E is a unary algebra that has a one-element subalgebra 0}. If E = A B where A B = 0} and A and B are proper subalgebras of E, then E is not quasicritical. Proof. Let α: E A B be given by (x, 0) if x A, α(x) = (0, x) if x B. Then α is a subdirect embedding. An irredundant generating set of an algebra E is a subset D such that D generates E but no proper subset of D does. For A any subset of a unary algebra

4 CASPERSON, HYNDMAN, MASON, NATION, AND SCHAAN E, the subalgebra generated by A is Sg E (A) = a A SgE (a}). This implies that when D is a generating set of E for d D we have E = Sg E (D) = Sg E (D \ d}) Sg E (d}). Thus, when D is an irredundant generating set and d f(d) for all non-identity functions f in the clone, the set E \ d} is a subalgebra of E. Lemma 3. Assume E is a unary algebra that has an irredundant generating set that contains distinct a, b, and c. If f(a) = f(b) = f(c) for all terms f that are not the identity map, then E is not quasicritical. Proof. Let D be the irredundant generating set containing a, b, and c. Let A = E \ c}. If c = f(c) for some non-identity term f then c = f(a) which contradicts the minimality of the generating set. Thus A is a proper subalgebra of E. Embed E into A A via (x, x) if x A, α(x) = (a, b) if x = c. As f(α(c)) = f((a, b)) = (f(a), f(b)) = (f(c), f(c)) = α(f(c)) for any non-identity term f, the map α is a subdirect embedding. 3.2. Quasicritical: 0, 1}-Valued Unary Algebras with 0. We now turn our attention to the nature of quasicritical algebras in the variety generated by M, a 0, 1}-valued unary algebra with 0. The following observations are used frequently. Because 0 forms a one-element subalgebra, the constant 1 is not a function in the clone, while the constant 0 function is f 0. Thus the range of each f i is 0, 1} for 1 i s. For i s and j s, we have on M that f 0 if f i (1) = 0, (1) f i f j = f j if f i (1) = 1. This holds as 0 forms a one-element subalgebra, so that f i (0) = 0. Equation (1) implies that the non-trivial functions in the clone must correspond to basic operations of the algebra. As we continually are concerned with whether f i (1) = 1 or not, we partition 0, 1, 2..., s} as I 0 I 1 such that for a in 0, 1} and i in I a we have f i (1) = a. Thus for i 0 I 0 and i 1 I 1 the following equations hold in M for 0 j s: (2) f i0 (f j (x)) f 0 (x) 0 and f i1 (f j (x)) f j (x). Note that (3) row(1)(i) = 1 if i I 1, 0 if i I 0. Lemma 4. Let M be a 0, 1}-valued unary algebra with 0. Let E be a finite algebra in the variety generated by M. Assume E is quasicritical and has at least three elements. Let D be an irredundant set of generators of E and set C = E \ (D 0 E }). For every c C and every d D, we have f j (d) j s} C 0 E } and c if i I 1, f i (c) = 0 E if i I 0.

5 Moreover, for each d D there exists an i s with f i (d) C, and consequently C is non-empty. Proof. Suppose that for some d D and some j s, we have d = f j (d). Then for all i s we have f i (d) = f i (f j (d)) 0 E, f j (d)} = 0 E, d} by Equation (2). Thus 0 E, d} is a subalgebra of E, and, as E has at least three elements, 0 E, d} is a proper subalgebra. As D is irredundant d Sg E (D \ d}). This fact and Lemma 2 imply that E is not quasicritical, which is a contradiction. Thus we have d f j (d) for every d D and every j s. Together with irredundancy of D this implies D f j (D) = for j s. Hence f j (D) C 0 E } for each j s. However, if for some d D we have f i (d) = 0 E for every i s then Sg E (d) = 0 E, d} and, by Lemma 2, E is not quasicritical. Thus we may assume for each d D there is an i s with f i (d) C. For c C there exist j s and d D with c = f j (d). For i s we have f i (c) = f i (f j (d)) 0 E, f j (d)} = 0 E, c} with f i (c) = c when i I 1. Consider the quasivariety generated by a 0, 1}-valued unary algebra with 0 when there is at most one non-trivial function in the clone. The next lemma shows that such a quasivariety has a finite quasi-equational basis. Thus, after this lemma we freely assume that there are at least two non-trivial functions. Lemma 5. Let M be a 0, 1}-valued unary algebra with 0 with at most one nonzero, non-identity function in its clone. Then HSP(M) has finitely many quasicritical algebras, and therefore ISP(M) has a finite basis for its quasi-equations. Proof. If M has no non-trivial functions in its clone, then the only quasicritical algebra in HSP(M) is the two-element algebra. Thus we may assume that there is a non-trivial function. Let f be the non-zero, non-identity function in the clone of M. Either f 2 = f or f 2 = f 0, the constant 0-valued function. Assume E is a finite algebra in the variety generated by M and that E is quasicritical with at least three elements. Fix D an irredundant set of generators of E, and set C = E \ (D 0 E }). By Lemma 4, C is non-empty; and for each d in D there is some non-trivial function that maps d into C. As the only such function is f, we have that f(d) is in C. In addition, for each c C there exists d D with f(d) = c. Suppose there are at least two elements in C. Pick one, say c, and let D c = d D : f(d) = c}. Then D c 0 E, c} is a subalgebra of E as is E \ (D c c}). Their intersection is 0 E }, so E is not quasicritical by Lemma 2. Thus C is a singleton. By Lemma 3, D has at most two elements, and hence E has at most four elements. Thus every quasicritical algebras in the variety generated by M satisfies the four-variable quasi-equations of M. By Lemma 1, M has a finite basis for its quasi-equations. 4. When the Rows Form an Order Ideal Consider M 1 whose operations are those shown in Figure 2. This 0, 1}-valued unary algebra with 0 has rows which form an order ideal. The next theorem applies to algebras like M 1 to show that they have a finite basis for their quasi-equations. Theorem 6. Let M be a finite 0, 1}-valued unary algebra with 0 whose rows form an order ideal. Then M has a finite basis for its quasi-equations.

6 CASPERSON, HYNDMAN, MASON, NATION, AND SCHAAN f 0 f 1 f 2 f 3 0 0 0 0 0 1 0 0 0 1 2 0 1 1 0 3 0 1 0 0 4 0 0 1 0 Figure 2. Rows(M 1 ) form an order ideal. The remainder of this section is the proof of Theorem 6. Recall that the clone of functions of M is f 0, f 1,..., f s, f s+1 } where f 0 is the constant 0 and f s+1 is the identity function. By Lemma 5 we may assume s 2. Set N = 2 + M ( M 1). As M has at least two elements, we have N 4. We wish to show that the N- variable quasi-equations form a basis. Let E be an arbitrary finite algebra that satisfies the N-variable quasi-equations of M. By Lemma 1 it suffices to show that if E is quasicritical then E is in ISP(M). If E has at most N elements and satisfies the N-variable quasi-equations, then E satisfies all quasi-equations of M and hence is in ISP(M). Thus we also assume that E has at least N + 1 5 elements. For the next subsection we do not need the assumption of quasicriticality of E. 4.1. The Quasi-equational Order Ideal Property. In this subsection we develop the concept of the quasi-equational order ideal property and show that it is equivalent to Rows(M) being an order ideal. For i 0 and T chosen such that i 0 T 1, 2,..., s}, let Σ T i 0 be the one-variable quasi-equation [ ] i,j T & f i (x) f j (x) f i0 (x) 0, and let Γ T i 0 be the associated (at most) s-variable quasi-equation [ ] i,j T & z i z j z i0 0. Notice that for a M we have that row(a) = f 1 (a), f 2 (a),..., f s (a) satisfies Γ T i 0 if and only if a satisfies Σ T i 0. For i 0 T the operation f i0 is not the constant 0 map, so if M satisfies some Σ T i 0 then T 2. We say that M satisfies the quasi-equational order ideal property when M is a 0, 1}-valued unary algebra and for every tuple σ in 0, 1} s \ Rows(M), there exist T 1, 2,..., s} and i 0 T such that M satisfies Σ T i 0 but σ does not satisfy Γ T i 0. Within algebras that satisfy this property we look for failure of Γ T i 0 rather than prove directly that Σ T i 0 holds. In Lemma 9 we will see that the quasi-equational order ideal property is equivalent to Rows(M) being an order ideal. The next lemma and corollary guarantee the existence of particular rows in Rows(M) when M satisfies the quasi-equational order ideal property and allows us to prove one half of Lemma 9. It is the existence of witnesses to these rows that allow us to prove Theorem 6. Lemma 7. Suppose that M satisfies the quasi-equational order ideal property. Let E be an algebra in HSP(M) satisfying the one-variable quasi-equations of M. For

7 all ζ 0, 1} s if there exists e E, and c E with c 0 E, such that then we have ζ Rows(M). ζ(i) = 1 implies f i (e) = c, Proof. Let ζ 0, 1} s and assume that c, e E have the properties that c 0 E and that ζ(i) = 1 implies f i (e) = c. If for every Σ T i 0 that holds in M we obtain Γ T i 0 holding for ζ, then we must have ζ in Rows(M), as otherwise we would have a contradiction to the quasi-equational order ideal property. Suppose that Σ T i 0 holds in M and hence in E. To show that Γ T i 0 holds for ζ, we show that there is an element j 0 in T with ζ(j 0 ) = 0. When this happens, either ζ(i) = 0 for all i in T so that Γ T i 0 holds; or ζ(j 1 ) = 1 for some j 1 in T in which case the hypothesis of Γ T i 0 fails so that Γ T i 0 holds. Consider what happens when we set x = e in Σ T i 0. Either the hypothesis of Σ T i 0 holds, in which case the result holds, to wit, f i (e) i T } = 0 E }; or the hypothesis of Σ T i 0 fails and f i (e) i T } is not a singleton. In the first case f i0 (e) c. Since ζ(i) = 1 implies f i (e) = c it follows that ζ(i 0 ) = 0. In the latter case, not all f i (e) = c. Pick j 0 with f j0 (e) c and it follows that ζ(j 0 ) = 0. By the previous paragraph Γ T i 0 is satisfied by ζ. By the first paragraph, ζ is in Rows(M). Corollary 8. For M and E satisfying the assumptions of Lemma 7, and for c, e E, with c 0 E, the tuple ζc e defined by ζc e 1 if f i (e) = c, (i) = 0 otherwise is in Rows(M). Lemma 9. For M a 0, 1}-valued unary algebra with 0, we have that Rows(M) is an order ideal if and only if M satisfies the quasi-equational order ideal property. Proof. Assume that Rows(M) is an order ideal. Suppose that σ 0, 1} s but σ is not in Rows(M). Let T = i: σ(i) = 1}. As σ row(0) the set T is non-empty. For any i 0 in T the quasi-equation Σ T i 0, which is [ ] i,j T & f i (w) f j (w) f i0 (w) 0, is satisfied by M. To see this, note that the failure of this quasi-equation to hold in M implies the existence of an element m in M with f i (m) = 1 for i T. Since σ row(m) for any such m and Rows(M) forms an order ideal, we have σ in Rows(M), a contradiction. However, the corresponding Γ T i 0 fails for any τ σ, in particular for σ itself. Thus M satisfies the quasi-equational order ideal property. Now assume that M satisfies the quasi-equational order ideal property. Suppose that m M, and ζ 0, 1} s is such that ζ row(m). Set E = M, e = m, and c = 1, so that ζ(i) = 1 implies f i (m) = 1, that is, f i (e) = c. By Lemma 7, we have that ζ is in Rows(M). Thus Rows(M) is downward closed, that is, an order ideal. In view of Lemma 9, the assumption of Theorem 6 that Rows(M) forms an order ideal allows us to use Lemma 7 freely.

8 CASPERSON, HYNDMAN, MASON, NATION, AND SCHAAN 4.2. Homomorphisms. To show that an algebra E is in ISP(M), it is sufficient to show that for any pair of distinct elements in E there is a homomorphism separating them, that is show that for every pair (e 1, e 2 ) E 2 \ E, there is a homomorphism h: E M such that h(e 1 ) h(e 2 ). That E ISP(M) follows, as then the map E M Hom(E,M) given by e h(e) : h Hom(E, M) is an embedding. Under the hypotheses of Theorem 6 and the additional assumption that E is quasicritical, it is sufficient to consider three types of homomorphisms. These homomorphisms are indexed by the sets C, J 1, and J 2 which we now define. We start by partitioning the elements of E. Let D be an irredundant set of generators of E. Set C = E \ (D 0 E }). By Lemma 4, C is non-empty and for every c C and every d D we have f j (d) j s} C 0 E }, f i (c) i s} 0 E, c}, and for every d D there is some j s with f j (d) C. To simplify notation in various situations we let f(x) denote the tuple f 1 (x),..., f s (x). In what follows, let and J 1 = (a, b) D 2 : a b and f(a) = f(b)} J 2 = (c, d) C D : f(c) = f(d)}. The overview for the remainder of this section is as follows. Lemma 10 shows that J 1 J 2 has at most one element. Corollary 12 shows that for c C, we can construct a homomorphism h c : E M such that h c (c) h c (c ) for c E \ D. For (a, b) J 1, Lemma 15 provides a homomorphism h: E M such that h(a) h(b). For (c, d) J 2, Lemma 20 provides a homomorphism h: E M such that h(c) h(d). Lemma 21 assembles this information to show that there is a homomorphism separating any pair of distinct elements of E, thereby completing the proof of Theorem 6. Lemma 11 and Corollary 12 construct homomorphisms from E to M that separate elements of C. Note that Lemma 11 does not assume that M has the quasiequational order ideal property, but Corollary 12 does. The next lemma demonstrates that, in a quasicritical algebra, there are very few pairs of elements (u, v) with f(u) = f(v). We would like to thank the anonymous referee for this observation. Lemma 10. The set J 1 J 2 has at most one element. Proof. Suppose that (a, b) and (u, v) are in J 1 J 2. Thus b and v are in D. The sets A = E \ b} and B = E \ v} are proper subuniverses of E as D is a minimal generating set. Embed E into A B via (x, x) if x A B, h(x) = (a, b) if x = b, (v, u) if x = v. As f i (h(b)) = f i ((a, b)) = (f i (a), f i (b)) = (f i (b), f i (b)) = h(f i (b)) and f i (h(v)) = f i ((v, u)) = (f i (v), f i (u)) = (f i (v), f i (v)) = h(f i (v)) for 0 i s, the map h is a subdirect embedding, contradicting the quasicriticality of E.

9 Lemma 11. Let M be a 0, 1}-valued unary algebra with 0, and let E HSP(M) be quasicritical, have at least three elements, and satisfy the one-variable quasiequations of M. Let D be an irredundant set of generators of E. Set C = E \ (D 0 E }), and fix an element c C. For each d D, let ρ d 0, 1} s be defined by ρ d (j) = 1 if and only if f j (d) = c. Suppose that h: D M is a map such that h(d) witnesses ρ d for each d D, that is, row(h(d)) = ρ d. Then (1) h extends uniquely to a homomorphism ĥ: E M; (2) ĥ(c) = 1; and (3) ĥ(c ) = 0 for c / D c}. Proof. As D is a generating set, any homomorphism that extends h is unique. To show that such a homomorphism exists, set h(e) when e D; ĥ(e) = 1 when e = c; 0 otherwise. We now show for 0 j s + 1 and d D that (4) ĥ(f j (d)) = f j (h(d)). Consider any d in D. For j = 0 we have ĥ(f 0(d)) = ĥ(0e ) = 0 = f 0 (h(d)). For j = s + 1 we have ĥ(f s+1(d)) = ĥ(d) = h(d) = f s+1(h(d)). We now consider the cases where 1 j s. Since row(h(d)) = ρ d, we have f i (h(d)) = ρ d (i) for 1 i s. First, suppose that f j (d) = c. Then ĥ(f j(d)) = ĥ(c) = 1, and f j (h(d)) = ρ d (j). But ρ d (j) = 1 exactly when f j (d) = c. Now suppose f j (d) c, so that f j (d) / c} D and ĥ(f j(d)) = 0. On the other side we have f j (h(d)) = ρ d (j) = 0. The last equality holds because f j (d) c. Thus (4) holds and we use it to show that ĥ is a homomorphism. We wish to compute ĥ(f i(e)) for any e E and i with 0 i s + 1. Pick any d D, and any j with 0 j s + 1 such that e = f j (d). There is an r with 0 r s + 1 such that f i f j = f r. Now we compute ĥ(f i(e)) = ĥ(f i(f j (d))) = ĥ(f r (d)) = f r (h(d)) = f i (f j (h(d))) = f i (ĥ(f j(d))) = f i (ĥ(e)), showing that ĥ is a homomorphism. Corollary 12. Let M be a 0, 1}-valued unary algebra with 0 satisfying the quasiequational order ideal property, and let E HSP(M) be quasicritical, have at least three elements, and satisfy the one-variable quasi-equations of M. Let D be an irredundant set of generators of E. Set C = E \ (D 0 E }). Then, for c C, there exists a homomorphism h c : E M such that for c E\D In particular, h c (c) 0. h c (c) = h c (c ) if and only if c = c. Proof. Fix c C. For d D, consider ρ d 0, 1} s defined by ρ d (j) = 1 if and only if f j (d) = c. By Corollary 8, ρ d is in Rows(M). Define h: D M by setting h(d) to be any witnesses that ρ d is in Rows(M). Then by Lemma 11 there is a homomorphism

10 CASPERSON, HYNDMAN, MASON, NATION, AND SCHAAN h c : E M extending h such that h c (c) = 1 and for c c, with c / D, we have h(c ) = 0. Under certain circumstances Corollary 12 suffices to prove Theorem 6. If M satisfies the two-variable quasi-equation f(x) f(y) x y, then so does E. The quasi-equation f(x) f(y) x y holding in M says that row(c 1 ) = row(c 2 ) implies that c 1 = c 2. In this case we say that the relation Rows(M) is uniquely witnessed. When Rows(M) is uniquely witnessed, we have J 1 J 2 = and we shall see in Lemma 21 that h c c C} separates points in E. In general we need more homomorphisms. Recall that J 1 = (a, b) D 2 : a b and f(a) = f(b)}. Lemma 15 states that if (a, b) in J 1, then there is a homomorphism h: E M such that h(a) h(b), that is, there are homomorphisms to separate the elements in a pair in J 1. From now through the proof of Lemma 15 we assume that (a, b) J 1 and use the following algebras and formulas. Let E 0 = Sg E (a, b}), and let E ω be the algebra whose universe is given by E ω = e E : Sg E (e}) E 0 = 0 E }}. By Lemma 4, C E 0 E ω. We now define various formulas that relate to the existence of appropriate homomorphisms. Let ψ 0 (w a, w b ) be the two-variable formula, and for e E let ψ e (w a, w b, w e ) be the three-variable formula, defined by: ψ 0 (w a, w b ): f(w a ) f(w b ) & & f i (w a ) f j (w a ); f i(a)=f j(a) ψ e (w a, w b, w e ): ψ 0 (w a, w b ) & & f i (w e ) f j (w a ). f i(e)=f j(a) The formula ψ 0 identifies elements that behave like a and b, while ψ e captures how e interacts with a and b. Note that for (a, b) J 1 and e E, the formulas ψ 0 (a, b) and ψ e (a, b, e) hold in the algebra E. Let H 1 be the set of homomorphisms H 1 = h Hom(E 0 E ω, M): h(a) h(b) and h Eω 0}. We now prove two technical lemmas about homomorphisms before proceeding to the proof of Lemma 15. Lemma 13. The set H 1 is non-empty. Moreover, for every pair (m a, m b ) of distinct elements in M 2 such that ψ 0 (m a, m b ) holds in M, there is exactly one h H 1 such that h(a) = m a and h(b) = m b. Proof. The quasi-equation ψ 0 (w a, w b ) w a w b fails in E 0 (i.e, in E) with w a = a and w b = b, so it must also fail in M. This means that there exist distinct m a, m b M with ψ 0 (m a, m b ) holding. We demonstrate one-to-one correspondences between H 1, h E0 h H 1 }, and (h(a), h(b)) h H 1 }. Let H 0 = h Hom(E 0, M): h(a) h(b)}. The map ext : H 0 H 1 given by [ext h 0 ](x) = h 0 (x) x E 0, 0 x E ω ; is the inverse of the restriction map E0 : H 1 H 0, so H 0 and H 1 are in one-to-one correspondence. For h H 0, as a, b} generates E 0 it is clear that (h(a), h(b)) completely defines h in H 0 and ext h in H 1.

11 Pick m a m b such that ψ 0 (m a, m b ) holds in M. This allows us to construct a homomorphism h H 0. To start, set h(a) = m a and h(b) = m b. As E 0 is generated by a, b} and f(a) = f(b), for every e E 0 \ a, b} there is a non-identity term f i with i 0, 1,..., s} such that f i (a) = f i (b) = e. Set h(e) = f i (h(a)) = f i (m a ). If f i (a) = f j (a) then ψ 0 (m a, m b ) implies that f i (m a ) = f j (m a ), so h is a well-defined homomorphism. By the preceding paragraph this homomorphism extends uniquely to H 1. The following lemma connects the formula ψ e (w a, w b, w e ) with the ability to lift homomorphisms. Lemma 14. Let E 2 be a proper subalgebra of E that contains E 0 E ω, and let h : E 2 M be a homomorphism with h Eω 0. Then, for e E \ E 2 there is a homomorphism ĥ: E 2 e} M extending h if and only if there exists an m M with ψ e (h(a), h(b), m) holding in M. Proof. Set L = i 1,..., s}: f i (e) / E w }. Note that, since f i (e) C E 0 E ω, we have f i (e) E ω implies f i (e) E 0. Suppose that there exists an m M such that ψ e (h(a), h(b), m) holds in M, that is, ψ 0 (h(a), h(b)) & & f i(e)=f j(a) f i (m) = f j (h(a)). Define ζ 0, 1} s by ζ(i) = 1 if and only if f i (m) = 1 and i L. Apply Lemma 7 (with E = M, e = m, c = 1) to conclude that ζ Rows(M). Let m witness ζ. Then m satisfies f i (m f i (m) when i L, ) = ζ(i) = 0 when i / L. Since C E 0 E ω and for any i we have f i (e) C 0 E }, it follows that E 2 e} is a subuniverse of E. Extend h to E 2 e} by ĥ(e) = m. To see that ĥ is a homomorphism consider ĥ(f i(e)). For i L we have f i (e) / E ω so f i (e) E 0 and f i (e) = f j (a) for some j. Thus ĥ(f i(e)) = h(f i (e)) = h(f j (a)) = f j (h(a)). But f j (h(a)) = f i (m) because f j (a) = f i (e) and ψ e (h(a), h(b), m) holds. Thus ĥ(f i (e)) = f j (h(a)) = f i (m) = f i (m ) = f i (ĥ(e)). For i / L, we have f i(e) E ω and ζ(i) = 0; whence ĥ(f i(e)) = h(f i (e)) = 0 = ζ(i) = f i (m ) = f i (ĥ(e)). Thus ĥ is a homomorphism. On the other hand if ĥ(e) = m is a homomorphism extending h, use the fact that ψ e (a, b, e) holds and apply ĥ to the identities in ψ e(a, b, e) to get that ψ e (h(a), h(b), m) holds. We now have the machinery to prove that we can separate elements of a pair in J 1 = (a, b) D 2 : a b and f(a) = f(b)}. Lemma 15. If (a, b) in J 1, then there is a homomorphism h a,b : E M such that h a,b (a) h a,b (b). Proof. Fix (a, b) in J 1. With notation as above, define Q = (u, v) M 2 \ M : h H 1 with (u, v) = (h(a), h(b)) and h does not lift to E. }

12 CASPERSON, HYNDMAN, MASON, NATION, AND SCHAAN If Q is empty then every h H 1 lifts to E, and since Lemma 13 says H 1 is nonempty, we are done. Thus we assume Q is non-empty. Since ψ 0 (a, b) holds in E, by Lemma 13, for each pair q in Q there is a unique h q : E 0 E ω M in H 1 such that (h q (a), h q (b)) = q. As q Q there must be at least one element e q E such that some maximal extension of h q does not contain e q. Indeed, by Lemma 14, e q is not in the domain of any extension of h q. We proceed to demonstrate that there must be an h 1 H 1 that has an extension whose domain includes each e q. This will imply that (h 1 (a), h 1 (b)) is not in Q, that is, h 1 extends to E. Consider now the formula ψ(w a, w b, w eq : q Q}) given by ψ(w a, w b, w eq : q Q}): ψ 0 (w a, w b ) & & q Q ψ eq (w a, w b, w eq ). The formula ψ essentially describes the relationships in E between the elements a, b, and e q q Q}. Notice that this formula has at most Q +2 M ( M 1)+2 = N variables. The quasi-equation ψ(w a, w b, w eq : q Q}) w a w b fails on E as a b and we can satisfy the left hand side with w a = a, w b = b, and w eq = e q. Thus it must also fail on M, as E satisfies all the N-variable quasi-equations satisfied by M. That means that there are elements m q in M for q Q, and distinct m a, m b, such that ψ(m a, m b, m q : q Q}) holds in M. In particular ψ 0 (m a, m b ) holds in M and (by Lemma 13) there is a homomorphism h 1 H 1 such that h 1 (a) = m a and h 1 (b) = m b. As each ψ eq (m a, m b, m q ) holds in M, each formula w ψ eq (m a, m b, w) holds in M, and by Lemma 14 any maximal extension of h 1 contains e q q Q} in its domain. Thus h 1 h q for all q Q, which implies that (m a, m b ) = ( h 1 (a), h 1 (b) ) / Q, so h 1 lifts to E. Set h a,b to be an extension of h 1 to E. We now turn our attention to J 2. Recall that J 2 = (c, d) C D : f(c) = f(d)}. In addition I 0 = i 0, 1, 2,..., s}: f i (1) = 0} and I 1 = i 1, 2,..., s}: f i (1) = 1}. For i 0 I 0 and i 1 I 1 and any j, we have f i0 f j = f 0 and f i1 f j = f j. Lemma 16. Assume (c, d) J 2. Then I 1 and for 1 i s, c if i I 1, f i (d) = 0 E if i I 0. Proof. By Lemma 4, f i (c) = c if i I 1, 0 E if i I 0. Since f(d) = f(c), the same holds for each f i (d). Again by Lemma 4, there is some i with f i (d) C, whence I 1 is non-empty. Note that the proofs of the next few lemmas use at most two-variable quasiequations, whereas the proof of Lemma 15 used an N-variable quasi-equation. Lemma 17. If J 2 is non-empty, then either row(0) has two distinct witnesses or row(1) has two distinct witnesses.

13 Proof. Assume that (c, d) J 2 with f(c) = f(d). By Lemma 16, I 1. For each i 1 I 1 we have f i1 (d) = f i1 (c) = c, and for i 0 I 0 we have f i0 (d) = f i0 (c) = 0 E. Consider the two-variable quasi-equation Υ(x, y) [ ] f(x) f(y) & i1 I & f i1 (x) x & & f i0 (x) 0 x y. 1 i0 I 0 In E the pair (c, d) satisfies the hypothesis of Υ(x, y) but c d. Thus Υ does not hold in E, and consequently it must not hold in M either. In M, if the hypothesis of Υ(x, y) holds then x 0, 1}, so the failure of Υ(x, y) in M implies that either row(0) or row(1) is not uniquely witnessed. Lemma 18. Suppose that (c, d) J 2 and that 0 and m are distinct witnesses of row(0). Then h: E M defined by m if x = d h(x) = 0 otherwise is a homomorphism with h(c) h(d). Proof. For 1 j s, we have f j (h(d)) = f j (m) = 0 as m witnesses row(0); and h(f j (d)) = h(f j (c)) = 0 as f j (c) d. For u d we have f j (h(u)) = f j (0) = 0 and h(f j (u)) = 0. Thus h is a homomorphism with the desired property. Lemma 19. Suppose that (c, d) J 2 and that 1 and m are distinct witnesses of row(1). Then there is a homomorphism h: E M defined so that h(c) = 1 and h(d) = m. Proof. For u D define ρ u 0, 1} s by ρ u (j) = 1 if and only if f j (u) = c. By Corollary 8, ρ u is in Rows(M) so has a witness y u in M. Define h : D M by h m if u = d (u) = otherwise. y u By Lemma 16, f j (d) = c if and only if j I 1. Thus, by Equation (3), ρ d = row(1) which is also row(m). The map h satisfies the hypothesis of Lemma 11 so extends to a homomorphism h: E M with h(c) = 1. Lemma 20. If (c, d) J 2, then there is a homomorphism h c,d : E M such that h c,d (c) h c,d (d). Proof. Assume that (c, d) J 2. By Lemma 17 either row(0) has distinct witnesses or row(1) has distinct witnesses. Use Lemma 18 or Lemma 19, respectively, for the existence of the desired homomorphism. Finally we show that E is actually in ISP(M) by verifying that for all (e 1, e 2 ) E 2 \ E there is a homomorphism h separating e 1 and e 2. Lemma 21. For all (e 1, e 2 ) E 2 \ E there is a homomorphism h: E M such that h(e 1 ) h(e 2 ). The homomorphism may be chosen from h c c C} h a,b (a, b) J 1 } h c,d (c, d) J 2 } as defined in Corollary 12, Lemma 15, and Lemma 20 respectively.

14 CASPERSON, HYNDMAN, MASON, NATION, AND SCHAAN Proof. Let e 1 and e 2 be distinct elements in E. If both e 1 and e 2 are in E \D = C 0 E }, then without loss of generality e 1 = c C. By Corollary 12, h c (e 1 ) h c (e 2 ). For the rest of the proof we assume that e 2 D. If f(e 1 ) f(e 2 ), then there is a basic term operation f i with f i (e 1 ) f i (e 2 ). Pick c f i (e 1 ), f i (e 2 )} C. Let c denote the other element of f i (e 1 ), f i (e 2 )}. Using the homomorphism h c of Corollary 12 we have f i (h c (e 1 )), f i (h c (e 2 ))} = h c (f i (e 1 )), h c (f i (e 2 ))} = h c (c), h c (c )}, a two-element set. Thus f i (h c (e 1 )) f i (h c (e 2 )) and consequently h c (e 1 ) h c (e 2 ). The only cases that remain are when f(e 1 ) = f(e 2 ) while still having e 2 D. Then (e 1, e 2 ) J 1 J 2. (We cannot have e 1 = 0 E by Lemma 4.) Thus by either Lemma 15 or Lemma 20 we can construct a homomorphism h such that h(e 1 ) h(e 2 ). Corollary 22. For E in HSP(M) with E finite, quasicritical, and satisfying the N-variable quasi-equations of M, we have E in ISP(M). Proof. The map E M Hom(E,M) embedding. given by e h(e) : h Hom(E, M) is an The proof of Theorem 6 is now complete, as every finite algebra that is quasicritical and satisfies the N-variable quasi-equations is actually already in the quasivariety. Lemma 1 shows that the N-variable quasi-equations form a basis of the quasi-equations of M. Observe that for pairs in J 1, the proof of Lemma 15 potentially uses N-variables quasi-equations. However, for pairs not in J 1, the relevant proofs only require two-variable quasi-equations. 5. When the Rows Do Not Form an Order Ideal The content of this section is the proof of the converse of Theorem 6: that a finite 0, 1}-valued unary algebra with 0 whose rows do not form an order ideal does not have a finite basis for its quasi-equations. We first illustrate this for algebras on a four-element universe and then generalize to an arbitrary finite algebra. As before, throughout this section assume that M is a finite 0, 1}-valued unary algebra with 0 and that the clone is f 0, f 1, f 2,..., f s+1 where f 0 is the constant 0 function and f s+1 is the identity map. To prove the converse of Theorem 6 we need conditions for the non-existence of a finite basis for the quasi-equations of M. Results and definitions from [5] and [6] give these conditions. A positive primitive formula is an existentially quantified conjunction of atomic formulas. In the case of unary algebras the atomic formulas are of the form f(x) g(y) for notnecessarily-different variables x and y and terms (possibly the identity) f and g. A unary algebra M is pp-acyclic if there is a positive primitive formula φ(x, y) defining an acyclic binary relation such that there exist 0 and 1 in M with 0 1, φ(0, 0), φ(0, 1) and φ(1, 1). The simplest pp-acyclic relation is on the set 0, 1}. Theorem 23 ([6]). If M is a finite pp-acyclic unary algebra, then M does not have a finite basis for its quasi-equations. More generally, on an algebra M, an n-ary relation R is pp-defined if there is a positive primitive formula φ(x 1, x 2,..., x n ) such that R = (a 1, a 2,..., a n ) M n : φ(a 1, a 2,..., a n ) holds in M}. We note in passing that Rows(M) is a ppdefined relation.

15 Theorem 24 ([5]). If M is a finite unary algebra that has a pp-defined relation that is the graph of a non-trivial group, then M does not have a finite basis for its quasi-equations. The example given in Figure 3 has the graph of addition modulo 2 defined via w [ x p(w) & y q(w) & z r(w)]. That is, the set of triples (p(m), q(m), r(m)) M 2 3 m M 2 } is (0, 0, 0), (0, 1, 1), (1, 0, 1), (1, 1, 0)}, which in turn is (x, y, z) 0, 1} 3 : x + y = z}. By Theorem 24, M 2 does not have a finite basis for its quasi-equations. However, for many examples, the positive primitive formulas are much more complex as will become evident in the upcoming proofs. 0 2 1 p q r p q r 0 0 0 0 1 0 1 1 2 1 0 1 3 1 1 0 3 Figure 3. The graph of the two-element group is pp-defined in M 2. Example 25. If M is a four-element 0, 1}-valued unary algebra with 0, then one of the following holds: (1) the relation on 0, 1} can be positive primitively defined via a formula of the form w x f(w) & y g(w); (2) the graph of addition modulo 2 on 0, 1} can be positive primitively defined via a formula of the form w x p(w) & y q(w) & z r(w); (3) the rows of M form an order ideal. In the first two cases there is no finite basis for the quasi-equations, and in the last case there is a finite basis for the quasi-equations. Proof. Let F be the non-constant, non-identity operations in the clone of M. On a four-element set the possible non-identity functions for a 0, 1}-valued unary algebra with 0 are given in Table 1. If F is empty or has one element then, by g 0 g 1 g 2 g 3 g 4 g 5 g 6 g 7 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 1 1 1 2 0 0 1 1 0 0 1 1 3 0 1 0 1 0 1 0 1 Table 1. All possible operations of a four-element 0, 1}-valued unary algebra with 0.

16 CASPERSON, HYNDMAN, MASON, NATION, AND SCHAAN Lemma 5, there is a finite basis for the quasi-equations. Either Rows(M) is the empty ideal or there is one non-trivial function and the ideal formed by Rows(M) consists of 0 and 1. So we assume F 2. The formula w x g 3 (w) & y g 5 (w) & z g 6 (w) defines the graph of addition modulo 2, so we may assume not all of g 3, g 5, and g 6 are in F. If g 7 F then for any f F \ g 7 } the formula w x f(w) & y g 7 (w) defines on 0, 1}. Thus we may assume g 7 F. Similarly, any of the pairs g 1, g 3 }, g 1, g 5 }, g 2, g 3 }, g 2, g 6 }, g 4, g 5 }, or g 4, g 6 } can be used to define. Thus we may assume none of these pairs are in F. The remaining possible clones are g 1, g 2 }, g 1, g 4 }, g 1, g 6 }, g 2, g 4 }, g 2, g 5 }, g 3, g 4 }, g 3, g 5 }, g 3, g 6 }, g 5, g 6 }, and g 1, g 2, g 4 }. It is straightforward to check that all of these clones give order ideals. The remainder of this section is the generalization of Example 25 to an arbitrary finite 0, 1}-valued unary algebra with 0 where we do not specify the form of the positive primitive formulas. Lemma 26. If Rows(M) is not relatively complemented, then on 0, 1} can be positive primitively defined in M. Proof. As Rows(M) is not relatively complemented, there exists an interval of at least three elements, so we may assume a < c < b are in Rows(M) and the complement of c between a and b is not in Rows(M). Let S 000 = i: a(i) = c(i) = b(i) = 0} S 001 = i: a(i) = c(i) = 0 and b(i) = 1} S 011 = i: a(i) = 0 and c(i) = b(i) = 1} S 111 = i: a(i) = b(i) = c(i) = 1}. As a < c < b the disjoint union of these sets, S 000 S 001 S 011 S 111, is all of 1, 2,..., s}. In addition, as a, b, and c are distinct, the sets S 001 and S 011 are non-empty. Define Ĉ to be the formula that identifies witnesses in M of the rows which have a constant value on each of these four sets and are 0 on S 000. That is, Ĉ(w) is Ĉ(w): & f i (w) 0 & & f i (w) f j (w) i S 000 i,j S001 & i,j S011 & f i (w) f j (w) & i,j S111 & f i (w) f j (w). When S 000 or S 111 is empty, then the conjunctions in Ĉ over S 000 or S 111 are omitted. Pick t 1 S 001, t 2 S 011. First assume S 111 is empty. This implies that a is row(0). The positive primitive formula ˆR(x, y) defined by ˆR(x, y): w Ĉ(w) & x f t 1 (w) & y f t2 (w) defines on 0, 1}. To see this, note that the witnesses of the rows a, c and b witness ˆR(0, 0), ˆR(0, 1), and ˆR(1, 1). If the witness of some row d were a witness to ˆR(1, 0) then d would be the relative complement of c in the interval between a and b. This contradicts the assumption that the relative complement of c between a and b is not in Rows(M).

17 Now assume S 111 is non-empty and pick t 3 S 111. Note that a row(0) because a(t 3 ) = 1. Consider the relation E(x 1, x 2, x 3 ) defined by E(x 1, x 2, x 3 ): w Ĉ(w) & x 1 f t1 (w) & x 2 f t2 (w) & x 3 f t3 (w). There are two cases. First assume E(0, 1, 0) is witnessed in M. Define R(x, y) via R(x, y): w Ĉ(w) & x f t 1 (w) f t3 (w) & y f t2 (w). The zero element is a witness to R(0, 0), and the witness of b gives R(1, 1) while the witness of E(0, 1, 0) gives R(0, 1). If R(1, 0) holds, then the witness to R(1, 0) is a witness to a complement of c between a and b, a contradiction. Thus is defined. Now assume E(0, 1, 0) is not witnessed in M. Define R (x, y) via R (x, y): w Ĉ(w) & 0 f t 1 (w) & x f t2 (w) & y f t3 (w). The witnesses of the zero row, a, and c witness R (0, 0), R (0, 1), and R (1, 1) respectively. However, R (1, 0) does not hold, as otherwise a witness of R (1, 0) is a witness of E(0, 1, 0). Thus is again defined. Lemma 27. Assume M is a 0, 1}-valued unary algebra with 0 such that Rows(M) is relatively complemented but is not an order ideal. Then there is a pair of elements a, b Rows(M) with (1) a < b; (2) there exists c 0, 1} s \ Rows(M) with a < c < b; (3) for d < b with d Rows(M), the set of elements below d in Rows(M) form an order ideal; and (4) the interval from a to b in Rows(M) is a, b}. Proof. As Rows(M) is not an order ideal and row(0) is in Rows(M), there exists a minimal element b in Rows(M) and c in 0, 1} s \Rows(M) with row(0) < c < b. Fix c minimal with respect to this property. Thus for all d < b, if d Rows(M) then the interval below d in 0, 1} s is in Rows(M). By the minimality of c, each element strictly below c in 0, 1} s is also in Rows(M). Fix a a maximal element with row(0) a < c. We now show that the interval from a to b in Rows(M) consists exactly of a and b. Suppose d in Rows(M) with a d b. If d c = c then d c and in fact d > c and by the minimality of b, we have d = b. Otherwise, using a d c < c and the minimality of c we get that d c is in Rows(M). In fact d c = a by maximality of a. Let ˆd be the complement of d in the interval from a to b. As Rows(M) is relatively complemented, ˆd is in Rows(M). Because d c = a, by distributivity of 0, 1} s we have ˆd c. In fact, ˆd > c as c Rows(M). By the minimality of b, the element ˆd is actually b. By uniqueness of complements d = a, showing that the interval from a to b in Rows(M) consists exactly of a and b. Lemma 28. Assume M is a 0, 1}-valued unary algebra with 0 such that Rows(M) is relatively complemented but is not an order ideal. Then either there is a positive primitive formula that defines on 0, 1}, or there is a positive primitive formula that defines the graph of addition modulo 2. Proof. By Lemma 27, there are elements a, b in Rows(M) such that a < b, the interval from a to b in Rows(M) is a, b}, and there is an element c 0, 1} s \

18 CASPERSON, HYNDMAN, MASON, NATION, AND SCHAAN Rows(M) with a < c < b. Set T 00 = i: b(i) = 0} T 11 = i: a(i) = 1} T 01 = 1, 2,..., s} \ (T 00 T 11 ). We show that when T 11 is non-empty we can define with a positive primitive formula. When T 11 is empty we may be able to define but, if we cannot, then addition modulo 2 is definable. Notice that T 00 and T 11 are disjoint and that a is row(0) if and only if T 11 is empty. Note that T 01 is the set of co-ordinates on which a and b differ. As a < c < b we have that T 01 2. Case 1: Assume T 11 is non-empty. Let C 1 (w) be the formula that identifies rows which are constantly 0 on T 00, and are constant on T 11 and on T 01. That is, C 1 (w) is C 1 (w): & i T00 f i (w) 0 & & i,j T11 f i (w) f j (w) & Pick l 1 in T 01 and j 1 T 11. Define the formula R 1 (x, y) as & i,j T01 f i (w) f j (w). R 1 (x, y): w C 1 (w) & x f l1 (w) & y f j1 (w). From the rows a, b, and row(0) we obtain R 1 (0, 1), R 1 (1, 1), and R 1 (0, 0) respectively. When R 1 defines on 0, 1} we are done with this case. Otherwise R 1 (1, 0) holds for some witness. This means there is a row d in Rows(M) with 0 if i T 00 T 11, d(i) = 1 if i T 01. Thus d < b. By Lemma 27, we must have that Rows(M) is an order ideal below d. Thus the atom e which is 1 exactly on the co-ordinate l 1 is in Rows(M). Let C 2 (w) be the formula that identifies rows which are constantly 0 on T 00, and are constant on T 11 T 01 \ l 1 }. That is, C 2 (w) is C 2 (w): i T00 & f i (w) 0 & & f i (w) f j (w). i,j T 11 T 01\l 1} With the same j 1 as above, define the formula R 2 (x, y) as R 2 (x, y): w C 2 (w) & x f j1 (w) & y f l1 (w). From the rows e, b, and row(0) we obtain R 2 (0, 1), R 2 (1, 1), and R 2 (0, 0) respectively. Suppose R 2 (1, 0) holds for some witness, then there is a row r with 0 if i T 00 l 1 }, r(i) = 1 if i T 11 T 01 \ l 1 }. Thus a < r < b because T 01 2, which is a contradiction as the interval in Rows(M) from a to b contains just a and b. We have shown that when T 11 is non-empty we can define on 0, 1}.

19 Case 2: Now assume T 11 is empty. This means a is row(0). Pick l 1 and l 2 distinct in T 01. As f l1 and f l2 are distinct functions, there must be a row e in Rows(M) with e(l 1 ) e(l 2 ). Pick such an e minimal and, without loss of generality, assume e(l 1 ) = 0 and e(l 2 ) = 1. As the interval from a to b in Rows(M) contains exactly a and b we have e b. For β, γ 0, 1} define the subsets of 1, 2,..., s} S βγ = i: b(i) = β and e(i) = γ}. The co-ordinate l 1 is in S 10 and l 2 is in S 11. The set S 01 is non-empty as otherwise a = row(0) < e < b which cannot hold. Define C 3 (w) be the formula that identifies rows which are constantly 0 on S 00, and are constant on each of S 01, S 10, and S 11. That is, C 3 (w) is C 3 (w): & i S00 f i (w) 0 & Let R(x, y) be the formula R(x, y): i,j S01 & f i (w) f j (w) & & f i (w) f j (w) & i,j S 10 w C 3 (w) & x f l1 (w) & y f l2 (w). & i,j S11 f i (w) f j (w). R(0, 0), R(0, 1), and R(1, 1) hold via row(0), e, and b respectively. If R(1, 0) does not occur then we have defined. We shall see that when R(1, 0) does occur we can define addition modulo 2. Assume that there is an m 0, 1} and a row d with 0 if i S 00 S 11, d(i) = m if i S 01, 1 if i S 10. That is, a witness to row d is a witness to R(1, 0). If m = 0 then a < d < b, contradicting the non-existence in Rows(M) of rows between a and b, so m = 1. Pick l 3 in S 01. Let P (x, y, z) be the formula P (x, y, z): w C 3 (w) & x f l1 (w) & y f l2 (w) & z f l3 (w). P (0, 0, 0), P (1, 1, 0), P (1, 0, 1), and P (0, 1, 1) hold via witnesses of row(0), b, d, and e respectively. Any witness of P (0, 1, 0) or P (1, 0, 0) would be a witness for a non-zero row below b which cannot happen. If P (0, 0, 1) holds then a non-zero row is witnessed that is below e. Take the relative complement to this row between row(0) and e. The witness to this new row is a witness to P (0, 1, 0), a contradiction. Finally if P (1, 1, 1) has a witness then use the relative complement of e to obtain a witness to P (1, 0, 0) and a corresponding row below b, another contradiction. Thus the formula P defines the graph of addition modulo 2. 6. Classifying 0, 1}-Valued Unary Algebras with 0 We are now able to summarize the above material in the following result. Theorem 29. If M is a 0, 1}-valued unary algebra with 0 then one of the following holds: (1) the relation on 0, 1} can be positive primitively defined; (2) the graph of addition modulo 2 on 0, 1} can be positive primitively defined; or

20 CASPERSON, HYNDMAN, MASON, NATION, AND SCHAAN (3) the rows of M form an order ideal. In the first two cases there is no finite basis for the quasi-equations, and in the last case there is a finite basis for the quasi-equations. Proof. If M has one or fewer non-identity, non-zero operations then Rows(M) forms a (possibly empty) order ideal. By Lemma 5, there is a finite basis for the quasi-equations. If Rows(M) has an interval that is not relatively complemented then by Lemma 26 we can positive primitively define on 0, 1}. By Theorem 23 there is no finite basis for the quasi-equations. If Rows(M) is relatively complemented but is not an order ideal then, by Lemma 28, there is either a positive primitive formula that defines on 0, 1} or there is a positive primitive formula that defines the graph of addition modulo 2. By Theorem 23 or Theorem 24 there is no finite basis for the quasi-equations. If none of the above situations holds, then Rows(M) forms a non-empty order ideal. By Theorem 6, M has a finite basis for its quasi-equations. In fact, the (2 + M ( M 1))-variable quasi-equations form a basis. As a consequence of Theorem 29 we obtain the main result of this paper. Theorem 30. Let M be a finite 0, 1}-valued unary algebra with 0. Then M has a finite basis for its quasi-equations if and only if the rows of M form an order ideal. References [1] I. P. Bestsennyi, Quasi-identities of finite unary algebras, Algebra and Logic, 28 (1989), 327 340. [2] G. Birkhoff, On the structure of abstract algebras, Proceedings of the Cambridge Philosophical Society, 31 (1935), part 4, 432 454. [3] V.A. Gorbunov, Algebraic theory of quasivarieties, translated from the Russian, Siberian School of Algebra and Logic, Consultants Bureau, New York, 1998. [4] V. A. Gorbunov, Quasi-identities of two-element algebras, Algebra and Logic, 22 (1983), no. 2, 83 88. [5] D. Casperson and J. Hyndman, Primitive positive formulas preventing a finite basis of quasiequations, International Journal of Algebra and Computation, 19 (2009), no. 7, 925 935. [6] J. Hyndman, Positive primitive formulas preventing enough algebraic operations, Algebra Universalis, 52 (2004), no. 2-3, 303 312. [7] J. Hyndman and J. Pitkethly, How finite is a three-element unary algebra?, International Journal of Algebra and Computation, 15 (2005), 217 254. [8] V. K. Kartashov, Quasivarieties of unars, Mat. Zametki, 27 (1980), no. 1, 720. [9] V. K. Kartashov, On the finite axiomatizability of varieties of commutative unary algebras, Journal of Mathematical Sciences, 164 (2010), no. 1, 56 59. [10] A. I. Mal cev. Algebraic Systems. Springer-Verlag, New York, 1973. Posthumous edition, edited by D. Smirnov and M. Taĭclin, translated from the Russian by B. D. Seckler and A. P. Doohovskoy, Die Grundlehren der mathematischen Wissenschaften, Band 192.