Combination Problems for Commutative/Monoidal Theories
or How Algebra Can Help in Equational Uni cation Franz Baader
Lehr- und Forschungsgebiet Theoretische Informatik, RWTH Aachen Ahornstrae 55, 52074 Aachen, Germany e-mail:
[email protected]
Werner Nutt
German Research Center for Arti cial Intelligence (DFKI) Stuhlsatzenhausweg 3, 66123 Saarbrucken, Germany e-mail:
[email protected]
Abstract
We study the class of theories for which solving uni cation problems is equivalent to solving systems of linear equations over a semiring. It encompasses important examples like the theories of Abelian monoids, idempotent Abelian monoids, and Abelian groups. This class has been introduced by the authors independently of each other as \commutative theories" (Baader) and \monoidal theories" (Nutt). We show that commutative theories and monoidal theories indeed de ne the same class (modulo a translation of the signature), and we prove that it is undecidable whether a given theory belongs to it. In the remainder of the paper we investigate combinations of commutative/monoidal theories with other theories. We show that nitary commutative/monoidal theories always satisfy the requirements for applying general methods developed for the combination of uni cation algorithms for disjoint equational theories. Then we study the adjunction of monoids of homomorphisms to commutative/monoidal theories. This is a special case of a non-disjoint combination, which has an algebraic counterpart in the corresponding semiring. By studying equations over this semiring, we identify a large subclass of commutative/monoidal theories that are of uni cation type zero by. We also show with methods from linear algebra that unitary and nitary commutative/monoidal theories do not change their uni cation type when they are augmented by a nite monoid of homomorphisms, and how algorithms for the extended theory can be obtained from algorithms for the basic theory.
1 Introduction Equational uni cation is concerned with solving term equations modulo an equational theory. The theory is called unitary ( nitary ) if the solutions of an equation can always be represented by one ( nitely many) \most general" solutions. Otherwise the theory is of type in nitary or zero. Equational theories that are of uni cation type unitary or nitary play an important r^ole in automated theorem provers with built in theories [31, 24, 34, 35], in generalizations of the KnuthBendix algorithm [17, 30, 19, 7], and in logic programming with equality [18, 13]. For this reason, determining uni cation types of equational theories is not only interesting for uni cation theory but has also consequences for automated reasoning. Of course, for practical applications it is not enough to know that a given theory E is of type nitary. One also needs a nite E -uni cation algorithm that computes the nitely many most general solutions. Unfortunately, but not at all surprisingly, there cannot be a general method that determines the uni cation type of an equational theory [27]; and even if a theory is nitary it is still not clear whether a uni cation algorithm exists. Consequently, general methods [14] that try to derive such an algorithm from a given set of axioms for the theory are doomed to fail. Without restrictions on the equational theories one obtains procedures that only enumerate complete sets of uni ers, but do not terminate, even if the theory is unitary or nitary. Nevertheless, it is desirable to have methods|or at least methodologies| for designing uni cation algorithms for larger classes of theories. Otherwise, whenever a new equational theory comes up in an application one must start completely from scratch when developing a uni cation algorithm for this theory (we shall come back to this point in Section 2). One solution proposed for this problem is to restrict the attention to certain classes of theories that are de ned by syntactic properties of the set of axioms (see e.g., [11, 20, 9]). An advantage of such syntactic approaches is that they apply directly to general E -uni cation problems, i.e., problems where the terms to be uni ed contain additional free function symbols of arbitrary arity. A disadvantage is that they need not yield a uni cation algorithm for the theory in question, even though such an algorithm exists. For example, associativity and commutativity of a binary symbol is a syntactic theory (in the sense of [20]), but the general method for uni cation in syntactic theories usually does not terminate for uni cation problems modulo this theory. The syntactic approaches mostly depend on transformations of terms; they usually do not take the properties of the algebras de ned by the theory into account. On the other hand, special purpose algorithms designed for theories of practical importance|such as the theory of Abelian monoids (AM), idempotent Abelian monoids (AIM), and Abelian groups (AG)|often depend on algebraic properties of these theories. It turns out that the algebraic methods used for 1
obtaining these uni cation algorithms can be generalized to larger classes of theories de ned by properties of their free algebras. The theories AM, AIM, and AG belong to the class of commutative theories|roughly speaking, theories where the nitely generated free algebras are direct products of the free algebras in one generator [1, 2, 3]. One result shown in the present paper (see Section 4 below) is that the class of commutative theories is|modulo a translation of the signature|the same as the class of monoidal theories, developed independently in [25, 28]. Uni cation in these theories can always be reduced to solving linear equations in certain semirings [25]. On the one hand, this fact can be used to derive general results on uni cation in commutative/monoidal theories. For example, it can be shown that constant free uni cation problems are either unitary or of type zero, and the uni cation type of a theory can be characterized by algebraic properties of the corresponding semiring. These characterizations were used in [25, 2, 28] to determine the uni cation types of several commutative/monoidal theories. On the other hand, uni cation algorithms for certain commutative/monoidal theories| for example, the theory of Abelian groups with n commuting homomorphisms| can be derived with the help of well-known algebraic methods for the corresponding semiring|for instance, Buchberger's algorithm for the ring Z[X1; : : : ; Xn ] of integer polynomials in n indeterminates [3]. An apparent disadvantage of this semantic approach to uni cation is that it can treat only uni cation with and without constants, but not general uni cation. This problem can be solved, however, by using general methods developed for uni cation in the union of \disjoint equational theories" (i.e., theories over disjoint signatures) [33, 5]. Going from E -uni cation with constants to general E -uni cation is an instance of this combination problem since it can be seen as the disjoint combination of E with a free theory. In order to apply the method of [5] to the combination of a commutative/monoidal theory E with a free theory, one must be able to solve so-called \uni cation problems with constant restrictions" in E . In Section 6, we shall show that a commutative/monoidal theory is nitary for uni cation with constants if, and only if, it is nitary for uni cation with constant restrictions. Consequently, the results in [5] imply that a commutative/monoidal theory is nitary for uni cation with constants if, and only if, it is nitary for general uni cation. For disjoint theories, the combination problem can be considered as by and large solved by the work of [33, 5]. The case of non-disjoint signatures is too dicult to be treated in its full generality. In the Sections 7 and 8, we shall consider a special case of such a more general combination problem. Instead of just taking the (disjoint) union of a commutative/monoidal E with a certain other theory H, we add equations involving symbols of both signatures to make sure that the resulting theory is again a commutative/monoidal theory. On the corresponding semirings, this operation corresponds to a well-know mathematical 2
construction. In order to make this more precise, let us consider two of the examples in [2, 3]. Using algebraic properties of the semiring of polynomials with nonnegative integer coecients, N[X ], it was shown in [3] that the corresponding theory, i.e., the theory of Abelian monoids with a homomorphism, is of uni cation type zero. In contrast, the theory of Abelian monoids with an involution1 is unitary ( nitary w.r.t. uni cation with constants). In both cases, the corresponding semiring has a speci c structure: it is a monoid semiring ShH i, i.e., a semiring S with an adjoint monoid H . In the rst example, the monoid H is the free monoid in one generator, which is an in nite monoid, while in the second example, we have the cyclic group of order two, which is nite. In both examples, the semiring S is the semiring N of all nonnegative integers. This semiring corresponds to the theory AM of all commutative monoids, which is a nitary commutative/monoidal theory. The theory of Abelian monoids with an involution is obtained from AM: as follows: Take the: union of the identities de ning Abelian monoids (i.e., fx+y = y +x; (x+ y) + z = x: + (y + z); x + 0 =: xg) with the identities de ning an involution (i.e., fh(h(x)) = xg), and add the equations that make sure that the involution acts as a homomorphism (i.e., fh(x + y) =: h(x) + h(y); h(0) =: 0g). The combination is non-disjoint because of these additional equations. In the present paper we shall consider this type of combination more closely. The result for the theory of Abelian monoids with a homomorphism can now be generalized to a whole class of theories as follows. If S is a strict semiring | i.e., a semiring that is not a ring|and H is a free monoid then the commutative/monoidal theory corresponding to ShH i is of uni cation type zero. On the other hand, assume that S is a semiring such that uni cation in the corresponding commutative/monoidal theory is unitary ( nitary w.r.t. uni cation with constants), and let H be a nite monoid. In this case, the theory corresponding to the semiring ShH i is also of uni cation type unitary ( nitary w.r.t. uni cation with constants). This generalizes the result for the theory of Abelian monoids with an involution. Moreover, a nite uni cation algorithm for the theory corresponding to S can be used to derive a nite uni cation algorithm for the theory corresponding to ShH i. These two general results demonstrate the usefulness of the algebraic approach to uni cation for investigating non-disjoint combination problems. With this approach one can determine the uni cation types of whole classes of combined theories. It is not at all clear how this could be achieved with a purely syntactical approach. The paper is organized as follows. First, we shall motivate the need for uni cation results for whole classes of theories by an extended example. After recalling some basic de nitions concerning equational theories, uni cation theory, and semirings in Section 3, we shall introduce commutative theories and monoidal 1
An involution is a homomorphism h satisfying h2 (x) = x.
3
theories in Section 4. This section also contains a proof of the equivalence between commutative and monoidal theories. In addition, it will be shown that being commutative/monoidal is an undecidable property of ( nitely presented) equational theories. In Section 5 we recall the algebraic characterizations of the uni cation types for commutative/monoidal theories, and give some examples for the results that can be obtained using these characterizations. As a new result we shall show that solvability of uni cation problems is in general undecidable for commutative/monoidal theories. In Section 6, we consider uni cation with linear constant restrictions in commutative/monoidal theories. The next two sections contain the exact formulations and the proofs of the two results on non-disjoint combination mentioned above. In the conclusion we shall state some interesting open problems in this area. This article is an improved and extended version of a conference paper [4].
2 A Motivating Example As mentioned in the introduction, uni cation modulo equational theories has applications in various areas of automated deduction, such as theorem proving with built-in theories, logic programming with equality, and term rewriting modulo equational theories. In this section, we shall illustrate the third type of application by an example. Consider the following equational theory EK , which consists of the axioms for Boolean rings, and two additional identities which state that the unary function symbol b is a homomorphism for the addition and the unit of the Boolean ring: (1) (x + y) + z =: x + (y + z) (2) x + y =: y + x (3) x + 0 =: x (4) x + (?x) =: 0 (5) x + x =: 0 (6) (x + y) z =: (x z) + (y z) (7) (x y) z =: x (y z) (8) x y =: y x (9) x 1 =: x (10) x x =: x (11) b(x) b(y) =: b(x y) (12) b(1) =: 1: This theory is an axiomatization of equivalence of formulae in the propositional modal logic K [22]. Here, \+" stands for xor, \" for conjunction, \1" for truth, \0" for falsity, and \b" for the box operator of the modal logic. Thus, identity (11) expresses that for arbitrary (modal) formulae and , the formulae 2 ^ 2 and 2( ^ ) are equivalent in K, i.e., interpreted by the same truth value in any world of any Kripke model [12]. In order to decide the word problem for EK (i.e., the equivalence problem for K) one can try to construct a canonical rewrite system for this theory. However, 4
commutativity cannot be oriented to a terminating rewrite rule. A possible solution would be to keep some of the axioms of EK as unoriented identities, and proceed by using rewriting modulo these identities. But then critical pairs must also be computed by a uni cation algorithm modulo the unoriented identities. For example, if we leave the identities (1), (2), (7) and (8) unoriented, and orient the remaining identities from left to right, then the obtained rewrite system is a canonical rewrite system modulo associativity and commutativity of \+" and \". It should be noted, however, that the decision procedure for the word problem obtained this way is not very ecient. One could now try to leave even more identities unoriented, and thus leave more of the work to a (special purpose) matching procedure, and less to the actual reduction process. A necessary prerequisite for doing this is that one has a uni cation algorithm for the set of unoriented identities.2 For the addition, one could consider (1), (2) and (3), which is the theory of Abelian monoids, or (1), (2), (3) and (4), which is the theory of Abelian groups. For the multiplication, one could consider (7), (8), (9) and (10), which is the theory of idempotent Abelian monoids, or (7), (8), (9), (11) and (12), which is the theory of Abelian monoids with a homomorphism. All these theories have a very similar structure: they describe properties of a binary function symbol that is associative and commutative and satis es some additional properties. To facilitate the design of uni cation algorithms for these theories it would be convenient to have a general framework in which uni cation modulo such theories can be treated. It turns out that commutative/monoidal theories provide such a framework: all the theories mentioned above belong to this class. The example can also be used to illustrate why it is important to have a solution for the combination problem for (disjoint) monoidal/commutative theories. For example, assume that we want to use rewriting modulo (1), (2), (3) and (4) for the addition, and (7), (8) and (9) for the multiplication. Even if we have uni cation algorithms for the theory of Abelian groups AG+ and for the theory of Abelian monoids AM, these cannot directly be used to compute the necessary critical pairs. This is so because the terms to be uni ed may contain both \+" and \" as well as the additional free (for AG+ and AM) function symbol b. In other words, one must unify modulo the union of AG+ , AM, and the \free" theory fb(x) =: b(x)g. The result in Section 6 will show that a uni cation algorithm modulo this combined theory can eectively be obtained from algorithms for the single theories. We do not claim that nding this uni cation algorithm is the only problem that must be solved here. For example, one usually also needs a compatible reduction ordering, which is a requirement that cannot be satis ed for any set of identities containing identity (10). 2
5
3 Basic De nitions In the following we assume that the reader is familiar with the basic notions of universal algebra [8, 15]. For more information on uni cation theory see [6]. The notions from category theory used below are for instance de ned in [1], or in any introductory textbook on categories. The composition of mappings is written from left to right, that is, or simply means rst and then . Consequently, we use sux notation for mappings (but not for function symbols in terms).
3.1 Equational Theories
We assume that two disjoint in nite sets of symbols are given, a set of function symbols and a set of variables. A signature is a nite set of function symbols each of which is associated with its arity. Every signature determines a class of -algebras and -homomorphisms . We de ne -terms and -substitutions as usual. By [x1=t1; : : : ; xn=tn] we denote the substitution which replaces the variables xi by the terms ti. An equational theory E = (; E ) is a pair consisting of a signature and a set of identities E . The equality of -terms induced by E will be denoted by =E . Every equational theory E determines a variety V (E ), the class of all algebras satisfying each identity of E . For any set of generators X, the variety V (E ) contains a free algebra over V (E ) with generators X , which will be denoted by FE (X ). Thus any mapping of X into a -algebra A can be uniquely extended to a -homomorphism of FE (X ) into A. The following category C (E ) is associated with each equational theory E = (; E ): the objects of C (E ) are the free algebras FE (X ) for nite sets of variables X , the morphisms of C (E ) are the -homomorphisms between free algebras, and the composition of morphisms is the usual composition of mappings. The set of all objects of C (E ) will be denoted by F (E ), and the set of all morphisms from an object FE (X ) to an object FE (Y ) by hom(FE (X ); FE (Y )). The coproduct of FE (X ) and FE (Y ) in C (E ) is given by the free algebra FE (X ] Y ), where ] denotes disjoint union. If jX j = jY j, then FE (X ) and FE (Y ) are isomorphic. Thus FE (X ) is the coproduct of the isomorphic objects FE (x) for x 2 X , where x is used as abbreviation for the singleton fxg.
3.2 Uni cation
Let E = (; E ) be an equational: theory. An E -uni cation problem is a nite sequence of equations ? = hsi = ti j 1 i ni, where si and ti are -terms. A substitution is called an E -uni er of ? if si =E ti for each i. The set of all E -uni ers of ? is denoted by UE (?). In general one does not need the 6
set of all E -uni ers. A complete set of E -uni ers, i.e., a set of E -uni ers from which all uni ers may be generated by E -instantiation, is usually sucient. More precisely, for every set of variables V we extend \=E " to a relation \=E ;V " between substitutions, and introduce the E -instantiation quasi-ordering \E ;V " as follows: =E ;V i x =E x for all x 2 V E ;V i there exists a substitution such that =E ;V . A set C UE (?) is a complete set of E -uni ers of ? if for every uni er of ? there exists 2 C such that E ;V , where V is the set of variables occurring in ?. For reasons of eciency, this set should be as small as possible. Thus one is interested in minimal complete sets of E -uni ers. In minimal complete sets two dierent elements are not comparable w.r.t. E -instantiation. The uni cation type of a theory E is de ned with reference to the existence and cardinality of minimal complete sets. The theory E is unitary ( nitary, in nitary, respectively) if minimal complete sets of E -uni ers always exist, and their cardinality is at most one (always nite, at least once in nite, respectively). The theory E is of uni cation type zero if there exists an E -uni cation problem without a minimal complete set of E -uni ers. If the terms in the uni cation problems may contain free constants, we talk about uni cation with constants, otherwise we talk about uni cation without constants. In many applications, the uni cation problems that occur contain not only free constants, but also additional free function symbols of arity larger than 0. Such problems will be called general uni cation problems. If nothing else is speci ed, \uni cation" will mean \uni cation without constants." : : An E -uni cation problem ? = hs1 = t1; : : :; sn = tni can be reformulated as a problem for morphisms in the category C (E ). Let Y be the nite set of variables occurring in some si or ti. Evidently, we can consider si and ti as elements of FE (Y ). Since we do not distinguish between =E -equivalent uni ers, any E -uni er can be regarded as a -homomorphism from FE (Y ) into FE (Z ) for some nite set of variables Z . Let X = fx1; : : :; xng be a set of cardinality n. We de ne -homomorphisms , : FE (X ) ! FE (Y ) by xi := si and xi := ti. Now, : FE (Y ) ! FE (Z ) is an E -uni er of ? i xi = si = ti = xi for all i, that is, i = . This observation justi es to conceive E -uni cation as a problem involving only morphisms of the category C (E ): given , : FE (X ) ! FE (Y ), nd a : FE (Y ) ! FE (Z ) such that = .
3.3 Semirings
A semiring S is a tuple (S ; +; 0; ; 1) such that (S ; +; 0) is an Abelian monoid, (S ; ; 1) is a monoid, and all q, r, s 2 S satisfy the equalities 7
(1) (q + r) s = q s + r s (3) 0s=0
(2) q (r + s) = q r + q s (4) s 0 = 0:
The elements 0 and 1 are called zero and unit . Semirings are dierent from rings in that they need not be groups w.r.t. addition. Obviously, any ring is a semiring. A prominent example for a semiring which is not a ring is the semiring N of nonnegative integers. Similar to the construction of polynomial rings over a given ring, one can use a semiring S and a monoid H to construct a new semiring, namely the monoid semiring ShH i. As for polynomials,Pthe elements of the monoid semiring may be represented as sums of the form h2H sh h where only nitely many of the coecients sh 2 S are nonzero. The zero element of ShH i is the sum where all the coecients are zero, and the unit element is the sum where only the unit of H has a coecient dierent from zero and this coecient is the unit element of S . Addition and multiplication in ShH i are de ned as follows: X X X sh h + th h = (sh + th) h h2H h2H h2H X X X X sf f tg g = ( sf tg ) h f 2H
g2H
h2H h=fg
Polynomial semirings are special cases of monoid semirings. For example, the ring Z[X1; : : :; Xn ] of integer polynomials in n indeterminates is the monoid semiring ZhFAM ni where FAM n denotes the free Abelian monoid in n generators. As mentioned in the introduction, uni cation in commutative/monoidal theories can be reduced to solving systems of linear equations in certain semirings. Similar to uni cation in Abelian monoids [23], problems without constants will correspond to systems of homogeneous equations. For problems with constants one has to solve in addition systems of inhomogeneous equations. Modules over semirings are a generalization of vector spaces over elds. Since (S ; ; 1) need not be commutative, we have to distinguish between left and right S -modules. Solutions of homogeneous systems form right S -modules. The uni cation type of a theory will depend on whether these modules are nitely generated or not. A subset M of the n-fold Cartesian product S n is a nitely generated right S -module if there exist nitely many x1; : : : ; xk 2 S n such that M = fx1s1 + + xk sk j s1; : : : ; sk 2 Sg. Solutions of inhomogeneous systems do not form right modules, but unions of cosets of right modules. For the uni cation type it will be crucial how many cosets are needed to represent all solutions. If M S n is a right S -module, and N is a subset of S n, then N is a coset of M if there exists some y 2 S n such that N = fy + x j x 2 M g. Consequently, the set N is a niteSunion of cosets of M if there exist nitely many y ; : : :; y 2 S n such that N = k fy + x j x 2 M g. 1
k
i=1 i
8
4 Commutative and Monoidal Theories In this section we shall give the de nitions of commutative and monoidal theories, and show in what sense these two notions are equivalent.
4.1 De nitions and Examples
Motivated by the categorical reformulation of E -uni cation (see Subsection 3.2), the class of commutative theories is de ned by properties of the category C (E ) of nitely generated E -free algebras as follows: an equational theory E is commutative if the corresponding category C (E ) is semiadditive (see [16, 1] for the de nition and for properties of semiadditive categories). In order to give a more algebraic de nition we need some additional notation from universal algebra. Let E = (; E ) be an equational theory. A constant symbol e of the signature is called idempotent in E if for all symbols f 2 we have f (e; : : :; e) =E e. Note that for nullary f this means f =E e. Let K be a class of -algebras. An n-ary implicit operation in K is a family o = foA j A 2 Kg of mappings oA : An ! A which is compatible with all homomorphisms, i.e., for all homomorphisms !: A ! B with A, B 2 K and all a1; : : :; an 2 A, we have (oA (a1; : : : ; an))! = oB (a1!; : : : ; an!). In the sequel we shall omit the index and just write o in place of oA . -terms induce implicit operations on any class of -algebras in the following way: let t be a -term and let x1; : : : ; xn be a sequence of variables such that all the variables occurring in t are contained in this sequence. The n-ary implicit operation (t; x1; : : :; xn) is de ned by (a1; : : :; an) 7?! t[x1=a1; : : : ; xn=an]: For example, assume that the signature consists of a binary symbol \" and a unary symbol \?1", and let K be the class of all groups. Then the binary implicit operation (x y?1; x; y) expresses division in a group. If we apply this operation to a pair of group elements a, b, we obtain the quotient a b?1. For the classes V (E ) and F (E ) all implicit operations can be de ned by -terms [21]. We are now ready to give an algebraic de nition of commutative theories. An equational theory E = (; E ) is called commutative if the following holds: 1. the signature contains a constant symbol e that is idempotent in E , 2. there is a binary implicit operation \" in F (E ) such that (a) the constant e is a neutral element for \" in any algebra FE (X ) 2 F (E ), (b) for any n-ary function symbol f 2 , any algebra FE (X ) 2 F (E ), and any s1; : : : ; sn, t1; : : :; tn 2 F (E ) we have f (s1 t1; : : : ; sn tn) = f (s1; : : :; sn ) f (t1; : : : ; tn). 9
Though it is not explicitly required by the de nition, the implicit operation \" turns out to be associative and commutative (see [1], Corollary 5.4). This justi es the name \commutative theory." An obvious consequence of the de nition of an idempotent constant is that the initial algebra, i.e., FE (;), is of cardinality one for any commutative theory E . Well-known examples of commutative theories are the theory AM of Abelian monoids (sometimes called AC1 in the literature), the theory AIM of idempotent Abelian monoids, and the theory AG of Abelian groups (see [1]). In these theories, the implicit operation \" is given by the explicit binary operation in the signature. An example for a commutative theory where \" is really implicit can also be found in [1] (Example 5.1). We shall now consider examples of commutative theories where the signature contains some additional function symbols (see [29, 3] for more examples). Examples 4.1 We consider the following signatures: := f+; 0; hg, where \+" is binary, 0 is nullary, and h is unary; := f+; 0; f g, where \+" is binary, 0 is nullary, and f is binary; and := f+; 0; ?; ig, where \+" is binary, 0 is nullary, and ? and i are unary. AMH = (; EAMH ), the theory of Abelian monoids with a homomorphism. EAMH consists of the identities which state that \+" is associative, commutative with neutral element \0", and the identities which state that: h is a homo: morphism, i.e., the identities h(x + y) = h(x) + h(y), h(0) = 0. AMIn = (; EAMIn), the theory of Abelian monoids with an involution. EAMIn consists of the identities of EAMH , and the additional identity h(h(x)) =: x, which states that h is an involution. COM = (; ECOM ). ECOM consists of the identities which state that \+" is associative,: commutative with neutral element 0, and the identities f (x + : 0 0 0 0 x ; y + y ) = f (x; y) + f (x ; y ) and f (0; 0) = 0 which ensure that COM is really commutative. GAUSS = ( ; EGAUSS). EGAUSS consists of the identities which state that \+" is the binary operation of an Abelian group with: neutral element 0 and inverse ?, and the additional identity x + i(i(x)) = 0. With the exception of the third example, the additional function symbols| i.e., the function symbols apart from the binary symbol yielding the implicit operation, and the idempotent constant symbol|are all unary symbols. This motivates the de nition of monoidal theories. An equational theory E = (; E ) is monoidal if 1. contains a constant symbol 0, a binary function symbol \+", and all the other symbols in are unary 10
2. \+" is associative and commutative 3. 0 is the neutral element for \+", that is, 0 + x =E x + 0 =E x 4. every unary symbol h is a homomorphism for \+" and 0, that is, h(x+y) =E h(x) + h(y) and h(0) =E 0. It is easy to see that monoidal theories are always commutative theories. Obviously, the theories AM, AIM, AG, AMH, AMIn, and GAUSS are monoidal. The theory COM is not monoidal, since its signature contains an additional binary function symbol. However, we shall see in the next subsection that COM may also be regarded as monoidal theory if the signature is translated appropriately.
4.2 Commutative and Monoidal Theories are Equivalent
Next we show that by means of a signature transformation every commutative theory can be turned into a monoidal theory that, from the viewpoint of uni cation, is equivalent. Let and 0 be signatures. A signature transformation from 0 to is a mapping that associates to every 0-term a -term such that 1. x = x for every variable x 2. f (t1; : : : ; tn) = (f (x1; : : :; xn))[x1=t1; : : : ; xn=tn] if f is an n-ary symbol and x1; : : :; xn are n distinct variables. It follows from the de nition that is completely de ned by the images of the
at terms f (x1; : : :; xn ) where f ranges over 0. Intuitively, interprets every 0symbol by a -term, and then extends this interpretation consistently to arbitrary 0-terms. To every commutative theory E = (; E ) we associate a theory Eb = (b ; Eb ) and a signature transformation from b to as follows. The signature b consists of a constant 0, a binary symbol \+", and unary symbols f1; : : :; fn for every n-ary symbol f 2 , where n 1. To de ne the set of identities Eb we need the transformation . Let e be the idempotent constant in E and let (t; x; y) be the pair corresponding to the implicit operation \" in E . We de ne by 0 := e, (x + y) := t, and fi(x) := f (e; : : : ; x; : : :; e), where f (e; : : : ; x; : : :; e) has the variable x in the i-th argument position and the constant e in the other positions.: Now, with the help of this signature transformation we de ne Eb as Eb := fs^ = t^ j s^ =E ^tg. That is, Eb is the preimage of \=E " under .
Proposition 4.2 Let E = (; E ) be a commutative theory with associated theory Eb = (b ; Eb ) and signature transformation . Then: 1. Eb is a monoidal theory 11
2. s^ =Eb t^ implies s^ =E t^ for all b -terms s^, t^. Proof. 1. Since the implicit operation \" is associative and commutative, the same is true for \+". From part (2.b) of the de nition of commutative theories we conclude that every fi is a homomorphism for \+". Finally, since e is neutral for \", we have that 0 is a zero for \+", and since e is idempotent, we conclude that 0 is a zero for the homomorphisms fi. 2. The claim follows from the de nition of Eb and the fact that Eb is a stable congruence, i.e., a congruence that is invariant under substitution. Let E = (; E ) and E 0 = (0; E 0) be equational theories. We say that E and 0 E are equivalent if there exist signature transformations 0 from to 0 and from 0 to such that 1. s =E t implies s0 =E t0 for all -terms s and t and s0 =E t0 implies s0 =E t0 for all 0-terms s0 and t0 2. s0 =E s for all -terms s, and s00 =E s0 for all 0-terms s0. The rst condition means that and 0 can be seen as mappings on equivalence classes of terms. The second says that and 0 are inverses of each other modulo the equational theories. One of the most prominent examples of equivalent theories are boolean rings and boolean algebras. If two theories are equivalent they describe essentially the same structures. More precisely, if E and E 0 are equivalent, then the categories C (E ) and C (E 0) are isomorphic, and so are the varieties of E and E 0 [36]. Since uni cation properties of a theory E depend on the category C (E ), it follows that equivalent theories share the same uni cation properties. Theorem 4.3 Let E = (; E ) be a commutative theory with associated theory Eb = (b ; Eb ). Then E and Eb are equivalent. Proof. Let be the signature transformation from b to . To show the equivalence of E and Eb we exhibit a signature transformation ^ from to b and show that and ^ have the required properties. We de ne ^ by e^ = 0, and f (x1; : : : ; xn)^ = f1(x1) + + fn(xn ) for every n-ary symbol f in . By Proposition 4.2 we already know that s^ =Eb t^ implies s^ =E t^ for all b-terms s^, t^. Next we prove that s^ =E s for every -term s. For this purpose it suces to show the claim for at terms of the form f (x1; : : :; xn). For such terms we have f (x1; : : :; xn)^ = (f1(x1) + + fn (xn)) = f (x1; e; : : :) f (: : : ; e; xn) =E f (x1 e e; : : :; e e xn) =E f (x1; : : :; xn); 0
0
0
12
where the rst two equalities follow from the de nition of ^ and , and the last two equalities follow from parts (2.b) and (2.a) of the de nition of commutative theories. b To show that s^^ =Eb s^ for every -term s^, it suces by the de nition of Eb to show that s^^ =E s^, which is a consequence of the fact that s^ =E s for every -term s. Finally, we show that for all -terms s, t we have that s =E t implies s^ =Eb t^. But this follows again from the de nition of Eb , since s^ =E s =E t =E t^ then yields s^ =Eb t^. From this result it follows that from the viewpoint of uni cation there is no dierence between commutative and monoidal theories.
4.3 Adding Monoids of Homomorphisms
There is an interesting dierence between the theory GAUSS on the one hand, and the theories AMH and AMIn on the other hand. The additional identity : x + i(i(x)) = 0 in the theory GAUSS establishes a closer connection between the unary symbol i and the binary symbol \+" than just the fact that i is a homomorphism for \+". This is not the case for the additional identity h(h(x)) =: x in AMIn which says something about h alone. This observation will now be put into a more general setting. Let E = (; E ) be a monoidal theory, and let H be a monoid generated by the nitely many elements h1; : : : ; hn. Since composition of unary functions is associative, one may consider the generators of H as unary function symbols, and represent the monoid H by an equational theory EH that has these unary symbols as signature, and the set EH := fhi1 (: : :hik (x) : : :) =: hj1 (: : : hjl (x) : : :) j hi1 hik = hj1 hjl holds in H g as its set of identities. We de ne the augmented theory EhH i = (0; E 0) as follows: the signature 0 extends by the unary function symbols h1; : : : ; hn; the set of identities E 0 is the union of E [ EH with the identities which state that h1; : : : ; hn are homomorphisms and that these homomorphisms commute with the unary functions in , i.e., E 0 = E [ EH [ fhi(x + y) :=: hi(x) + hi(y); hi(0) =: 0 j i = 1; : : : ; ng [ fhi(f (x)) = f (hi(x)) j f is a unary symbol in g: In Sections 7 and 8 we shall study uni cation in theories of the form EhH i. The theory AMH is AMhhi where h stands for the free monoid in one generator, and AMIn is AMhZ2i where Z2 stands for the cyclic group of order 2, i.e., Z2 consists of two elements e and h, and the multiplication in Z2 is de ned 13
as e e = e, h e = e h = h, and h h = e. On the other hand, one can prove that GAUSS cannot be represented in the form AGhH i because of the interaction between i and \+" stated by x + i(i(x)) =: 0.
4.4 Being Commutative/Monoidal is an Undecidable Property The goal of this subsection is to prove the undecidability result stated in the next theorem:
Theorem 4.4 The following problem is in general undecidable: Given a nite signature and a nite set of identities E . Is (; E ) monoidal (resp. commutative)? We shall reduce a known undecidable problem for monoids and groups to this problem. It is well-known (see, e.g., [10], Corollary 3.8) that for nitely presented groups it is in general undecidable whether the group is trivial (i.e., consists of only one element) or not. Since nitely presented groups are a special case of nitely presented monoids, this undecidability result holds for monoids as well. Now assume that a nite presentation of a monoid is given. This presentation consists of a set of generators = fh1; : : :; hn g and a nite set of relations R = fu1 = v1; : : :; um = vmg, where the ui and vi are words over . Obviously, the monoid presented this way is trivial if, and only if, for all generators hi , the relation hi = " follows from R (where " denotes the empty word). As in the previous subsection, we consider the set of generators as a set of unary function symbols. The set of relations R can then be turned into a set of identities over this signature: ER := fu1(x) = v1(x); : : :; um(x) = vm(x)g.3 The monoid presented by and R is trivial if, and only if, the equational theory ER = (; ER) satis es hi(x) =ER x for all i; i = 1; : : : ; n. Let = f+; 0g for a binary symbol \+" and a constant symbol 0, and let AM be the theory that says that \+" is associative and commutative and that 0 is a neutral element for \+". As mentioned before, this theory is both commutative and monoidal. The theorem is now an immediate consequence of the next lemma:
Lemma 4.5 The monoid presented by and R is trivial if, and only if, the equational theory E = ( [ ; EAM [ ER ) is monoidal (resp. commutative). 3
For u = hi1 : : : hik , we use u(x) as an abbreviation for hi1 (
h ik
14
(x) ).
Proof. If the monoid is trivial then we have hi(x) =ER x for all i; i = 1; : : : ; n. This implies that the hi behave like homomorphisms for \+" and 0 in E , since the identity is obviously a homomorphism. Consequently, E is monoidal, and thus also commutative. Conversely, assume that the monoid is not trivial. Thus, there exists a generator hi such that hi(x) 6=ER x. We claim that this implies hi(0) 6=E 0. In fact, since the theory E is obtained as disjoint union of ER and AM, one can use the Abstraction Lemma (Lemma 4.1) of [5] to show that hi(0) =E 0 implies hi(x) =ER x.4 Obviously, hi(0) 6=E 0 shows that E is not monoidal. In addition, this inequality also implies that the initial E -algebra is of cardinality greater than one, and thus E cannot be commutative (since there is no idempotent constant).
5 Uni cation in Commutative/Monoidal Theories We rst show how to construct in a canonical way a semiring from a commutative/monoidal theory and how to use it for solving uni cation problems with and without constants. Then we exhibit a commutative/monoidal theory where uni cation with constants and the existence of nontrivial solutions for uni cation without constants are undecidable.
5.1 Commutative/Monoidal Theories and Semirings
In [1] the following properties for a commutative theory E are shown within the categorical framework, using well-known results for semiadditive categories. 1. The implicit operation \" required in the de nition of commutative theories induces a binary operation \+" on any morphism set hom(FE (X ); FE (Y )) as follows: for ; : FE (X ) ! FE (Y ) we de ne + by t( + ) := (t) (t ) for all t 2 FE (X ). This operation is associative and commutative, and it distributes with the composition of morphisms. The morphism 0: FE (X ) ! FE (Y ) de ned by x 7! e for all x 2 X , where e is the idempotent constant required in the de nition of commutative theories, is a neutral element for \+" on hom(FE (X ); FE (Y )). 2. The Cartesian product of FE (X ) and FE (Y ) is also a product in the categorical sense. Furthermore, the product is isomorphic to the coproduct, that is FE (X ] Y ) ' FE (X ) FE (Y ). The canonical injection X : FE (X ) ! FE (X ] Y ) is given by xX := x for any x 2 X . The canonical projection X : FE (X ] Y ) !
Note that one can without loss of generality assume that the substitution [x=0] satis es the normalization requirement in Lemma 4.1 of [5], since one can choose an ordering in which 0 is minimal. 4
15
FE (X ) is given by xX := x for x 2 X and yX := 0 for y 2 Y . If X = fxg is a
singleton, we write x and x instead of fxg and fxg, respectively. 3. Consider : FE (LX ) ! FE (Y ). Let x for x 2 X be the injections of the coproduct FE (X ) =N x2X FE (x) and y for y 2 Y be the projections of the product FE (Y ) = y2Y FE (y). Then is uniquely determined by the matrix M := (x y)x2X;y2Y . For , : FE (X ) ! FE (Y ) and : FE (Y ) ! FE (Z ), we have M+ = M + M , and M = M M . As an example, consider the morphism = [x1=h(y1); x2=y1 + h2(y2)] from FAMH (x1; x2) to FAMH (y1; y2). Then is determined by the matrix ! ! [ x =h ( y )] [ x = 0] 1 1 1 11 12 M = = [x =y ] [x =h2(y )] : 2 1 2 2 21 22
Let 1 be an arbitrary set of cardinality one. Property 1 from above yields that the set hom(FE (1); FE (1)) with addition \+" and composition as multiplication is a semiring, which will be denoted by SE . Any FE (x) is isomorphic to FE (1), and thus, for jX j = n, FE (X ) is the n-th power and copower of FE (1). Consequently, for : FE (X ) ! FE (Y ), the entries xy of the jX jjY j-matrix M may all be considered as elements of SE .5 That means that all morphisms in C (E ) can be written as matrices over the semiring SE . Addition and multiplication of matrices correspond to addition and composition of morphisms, as stated in Property 3 above. Conversely, any jX jjY j-matrix over SE gives rise to a morphism : FE (X ) ! FE (Y ). As an example, consider an arbitrary morphism : FAMH (y) ! FAMH (y). Then there exist a0; : : : ; ak 2 N such that y =AMH a0y + a1h(y) + : : : + ak hk (y), where multiplication of a term by a an element of N stands for repeated addition of the term to itself. We associate with the morphism the polynomial a0 + a1X + : : : + ak X k , which is an element of the semiring N[X ] of polynomials in one indeterminate X with nonnegative integer coecients. The morphism = [x1=h(y1); x2=y1 + h2(y2)] from above and the morphism = [y1=h(z); y2=2z] can be expressed by the matrices ! ! X X 0 and M = 2 M = 1 X 2 over N[X ]. An easy calculation shows that the morphism = [x1=h2(z); x2=h(z) + 2h2 (z)] corresponds to the matrix M M .
Examples 5.1 The theories of Example 4.1 yield the following semirings (see [28, 3]).
If no order on X and Y is speci ed, we refer to x y as the entry in the x-th row and the -th column. 5
y
16
SAMH , the semiring corresponding to the theory AMH of Abelian monoids with a homomorphism, is isomorphic to N[X ], the semiring of polynomials in
one indeterminate X with nonnegative integer coecients. SAMIn, which corresponds to the theory of Abelian monoids with an involution, is the monoid semiring NhZ2i, where Z2 denotes the cyclic group of order 2. SCOM , the semiring corresponding to the theory COM, is isomorphic to NhX; Y i, the semiring of polynomials in two noncommuting indeterminates X , Y with nonnegative integer coecients. Note that NhX; Y i is the monoid semiring NhfX; Y gi, where fX; Y g denotes the free monoid in two generators X, Y . SGAUSS is isomorphic to the ring of Gaussian numbers Z iZ, consisting of the complex numbers m + in, where m; n 2 Z. The rst two examples suggest that there is a close connection between augmenting a commutative/monoidal theory by a monoid (as de ned at the end of Subsection 4.3) and adjoining a monoid to the corresponding semiring (as de ned in Subsection 3.3). For AMIn = AMhZ2 i, for instance, one veri es that the semirings SAMhZ2i and SAM hZ2 i are isomorphic. It is easy to see that this kind of connection holds in general. Theorem 5.2 Let E be a commutative/monoidal theory, and let H be a nitely generated monoid. Then SEhH i, the semiring corresponding to E augmented by H , and the monoid semiring SE hH i are isomorphic. Proof. Let E = (; E ) be a commutative/monoidal theory and H be a monoid generated by the nitely many elements h1; : : :; hn . Then EhH i has the signature 0 = [ fh1; : : : ; hng. We shall construct a semiring isomorphism that maps every element 2 SEhH i to an element b 2 SE hH i. Recall that the elements of SEhH i are the 0-homomorphisms from FEhH i(1) to FEhH i(1) where 1 = fxg is a singleton. Let be such a 0-homomorphism. Then is uniquely determined by the element x . Since all hi are homomorphisms for \+" and commute with every homomorphism in , P m we can assume without loss of generality that x =EhH i i=1 hi1(: : : (hini (ti)) : : :) where the ti's are -terms. For every i = 1; : : :; m let i be the -homomorphism from P FE (1) to FE (1) de ned by x i := ti. Then we have i 2 SE . We de ne b as b := mi=1 i hi1 hini 2 SE hH i. One can verify that the de nition of b does not depend on the particular presentation of and that the mapping \ b " is bijective. Exploiting the fact that h1; : : : ; hn are homomorphisms in EhH i one shows that \ b " is compatible with the semiring operations and hence is a semiring isomorphism. The isomorphism of SEhH i and SE hH i will be used in Sections 7 and 8 to study the uni cation problem for EhH i in an algebraic setting. 17
5.2 Uni cation without Constants
In Subsection 3.2 we have seen that E -uni cation can be reformulated as uni cation in the category C (E ). A uni cation problem in C (E ) is given by a pair of morphisms , , and a uni er is a morphism such that = . If we translate the morphisms into matrices over SE , this means that an E -uni er corresponds to a matrix M over SE such that M M = M M . This correspondence is used in [25, 28, 3] to characterize the uni cation types of commutative/monoidal theories by algebraic properties of the corresponding semirings.
Theorem 5.3 A commutative/monoidal theory E is unitary w.r.t. uni cation without constants if, and only if, SE satis es the following condition: for any pair M1, M2 of mn-matrices over SE the set U (M1; M2) := fx 2 SE n j M1x = M2xg is a nitely generated right SE -module. If U (M ; M ) is generated by x1; : : : ; xk 2 SE n, then the matrix which has x1; : : :; xk as columns corresponds to a most general E -uni er of and .
Since constant-free uni cation problems in commutative/monoidal theories are either unitary or of type zero [25, 1, 28], the theorem yields that the theory E is of type zero i there exist matrices M1, M2 over SE such that the right SE module U (M1; M2) is not nitely generated. Using this characterization, it can be shown that the theories AMH and COM are of type zero (see [1, 3]). The theories AMIn and GAUSS are unitary w.r.t. uni cation without constants (see [1] for the rst, and [28] for the second result).
5.3 Uni cation with Constants
Following [29], we also reformulate uni cation with constants as uni cation in C (E ). To this end we view constants as special variables that are always substituted by themselves. Then a uni cation problem with constants from a nite set C gives rise to morphisms , : FE (X [ C ) ! FE (Y [ C ) with the property that c = c = c for all c 2 C .6 We say that such a morphism respects constants. If respects constants, then the matrix M has a special form: h Mi ! M M = 0 I ; where Mh is an jX jjY j-matrix, Mi is an jX jjC j-matrix, 0 is the jC jjY jmatrix with all entries 0, and I is the jC jjC j-unit matrix. The 0-submatrix is 6
This idea rst appeared in [1].
18
due to the fact that does not substitute terms with variables for constant. The unit matrix expresses that maps any constant to itself.7 If M is composed from Mh and Mi like above, we write M = hMh ; Mi i. Obviously, any such matrix corresponds to a morphism that respects constants. Consider the uni cation problem with constants given by , . A uni er of and is a morphism : FE (Y [ C ) ! FE (Z [ C ) that respects constants such that = . Because of the correspondence between morphisms and matrices, uni cation of and is equivalent to nding a matrix M = hM h ; M ii such that M M = M M . Taking into account the particular shape of the matrices we obtain hM h M hM i + M i ! h Mi ! Mh Mi ! M M ; M M = 0 I 0 I 0 I = and an analogous representation of M M . Thus, M M = M M holds if, and only if,
Mh M h = Mh M h Mh M i + Mi = Mh M i + Mi
(1) (2)
hold. Equation (1) means that the columns of M h have to satisfy the homogeneous linear equation system Mh x = Mh x, which is a problem that we already encountered when solving uni cation problems without constants. To translate equation (2), let ac, bc be the c-th column of Mi , Mi , respectively. Then (2) holds i for every c 2 C the c-the column of M i satis es the equation
Mh x + ac = Mh x + bc:
(3)
Now, we relate uni ers to solutions of linear equation systems. Let Ic denote the set of all solutions to (3). A set of vectors Kc Ic is a cover if Ic can be represented as the union of cosets [ Ic = y + U (Mh; Mh ): y2Kc
A cover Kc represents Ic in the sense that for every y 2 Ic there is a y0 2 Kc and a y00 2 U (Mh ; Mh) such that y = y0 + y00. Obviously, a cover always exists because Ic itself is a cover. Suppose that M h is a matrix whose columns generate U (Mh ; Mh), and that for every c 2 C we have a cover Kc of Ic. Then we can construct a set M of matrices that correspond to a complete set of uni ers: M consists of all matrices hM h ; N i, where N is a jY j jC j-matrix whose c-th column is an element of Kc . 7The superscripts h and i are chosen to indicate that in uni cation problems M h and M i will give rise to homogeneous and inhomogeneous linear equations, respectively.
19
Note that this construction generalizes the uni cation method for AM described in [23]. Obviously, if each Kc is a singleton ( nite), then M is a singleton ( nite). Conversely, one can also translate arbitrary inhomogeneous linear equation systems into uni cation problems for E . Thus, we can characterize the type of uni cation with constants in algebraic terms.
Theorem 5.4 Let E be a commutative/monoidal theory which is unitary w.r.t. uni cation without constants. Then E is unitary ( nitary) w.r.t. uni cation with constants if, and only if, SE satis es the following condition: for any pair M1 , M2 of mn-matrices over SE , and any pair a, b 2 SE m the set fx 2 SE n j M1x + a = M2x + bg is a coset ( nite union of cosets) of the right SE -module U (M1 ; M2 ). This characterization has been used to show that AMIn is nitary w.r.t. uni cation with constants. The theory GAUSS is even unitary w.r.t. uni cation with constants. This is due to the fact that SGAUSS ' Z iZ is a ring, and not only a semiring. In fact, let SE be a ring, and let x0 be an arbitrary solution of the equation M1x + a = M2x + b. We show that fx0g is a cover. For any solution y of the inhomogeneous equation system, the dierence y ? x0 is a solution of the homogeneous equation system M1x = M2x. This shows that any solution y of the inhomogeneous equation is an element of the coset x0 + U (M1; M2). Conversely, any element of this coset is a solution of the inhomogeneous equation.
5.4 The Uni cation Problem is Undecidable
The goal of this subsection is to show that there exists a commutative/monoidal theory E such that it is in general undecidable whether an E -uni cation problem with constants, ?, has a solution or not. For uni cation problems without constants, there is always the trivial solution that substitutes all variables by the idempotent constant of the commutative theory. On the semiring level, this corresponds to the fact that the zero vector is always a solution of a homogeneous linear equation. It is still undecidable, however, whether there exists a nontrivial solution. In order to show these undecidability results, we shall use the undecidability of the word problem for groups in the following (slightly modi ed) formulation.
Proposition 5.5 There exists a nitely presented group with an undecidable word problem such that the only element of nite order is the identity.
Actually, such a group was exhibited by Boone and Collins (see [32] for a description of the construction and a proof that this group has an undecidable 20
word problem; the fact that any element of this group dierent from the identity is of in nite order was proved in [27]). Now, assume that G is such a ( nitely presented) group, generated by . For words u; v over , we write u =G v i u and v belong to the same equivalence class in the presentation of G. We shall reduce the word problem for G (i.e., the question whether u =G v for given words u, v) to solvability of uni cation problems in the commutative/monoidal theory AMhGi.
Lemma 5.6 Let u and v: be words over . Then u =G v i the AMhGiuni cation problem hu(x) = v(x)i has a non-trivial solution. Proof. As shown above, uni cation modulo AMhGi corresponds to solving linear equations in the group semiring NhGi, where N is the semiring of nonnegative integers. The uni cation problem hu(x) =: v(x)i is translated into the equation u x = v x, which must be solved by an element s 2 NhGi. First, assume that u =G v. Thus, u is equal to v in NhGi, which means that the unit of the semiring is a (obviously non-trivial) solution of u x = v x. Now, assume that u x = v x has a non-trivial solution s 2 NhGi. Thus, s = a1 h1 + + ak hk for k 1 positive integers a1; : : : ; ak and h1; ; : : :; hk 2 G, and a1 uh1 + + ak uhk = us = vs = a1 vh1 + + ak vhk : This equality in NhGi implies that any monom that occurs on the left-hand side
must occur on the right-hand side as well, and vice versa. Let i1 be an arbitrary index between 1 and k. For i1 there exists an index i2 such that uhi1 =G vhi2 . Since G is a group, this equality can be rewritten to hi2 =G v?1uhi1 . Assume that index ij is already de ned. For this index, there exists an index ij+1 with uhij =G vhij+1 , i.e., hij+1 =G v?1uhij . Since there are only nitely many possible indices, there exists j < l such that ij = il. Consequently, we obtain hij = hil = (v?1u)l?j hij , which implies that (v?1u)l?j is the unity of the group G. This shows that v?1u is of nite order in G. By our assumption on G, only the unit of G has nite order, and thus u =G v. Since the word problem for G is undecidable, the lemma implies that the existence of a non-trivial solution for uni cation problems without constants modulo the monoidal theory AMhGi is in general undecidable. For uni cation with constants, undecidability follows from the next lemma.
Lemma 5.7 Let u and v be words over , and let c be a free constant. Then u =G v i the AMhGi-uni cation problem hu(c) =: v(c)i has a solution. Proof. As described in the previous subsection, uni cation modulo AMhGi corresponds to solving linear equations in the group semiring NhGi. The uni cation problem hu(c) =: v(c)i is translated into the inhomogeneous equation 21
(without variables) u = v. Obviously, this equation is solvable i u = v holds in NhGi, and this is the case i u = v holds in G.
Theorem 5.8 There exists a commutative/monoidal theory E such that it is in general undecidable whether an E -uni cation problem with constants has a solution or not. In addition, it is in general undecidable whether an E -uni cation problem without constants has a non-trivial solution or not.
6 Uni cation with Constant Restrictions Baader and Schulz [5] showed that one can devise a uni cation algorithm for arbitrary combinations of disjoint theories if one is given algorithms that solve uni cation problems with free constants and so-called constant restrictions in the individual theories. In this section we extend our techniques to tackle such problems in commutative/monoidal theories. We show that they correspond to particular systems of inhomogeneous linear equations. If C is a nite set of free constants, then a constant restriction over C is a family Y = (Yc )c2C of nite sets of variables Yc . A substitution satis es Y if for each c 2 C the constant c does not occur in any term y with y 2 Yc . For a uni cation problem ? and a constant restriction Y we denote with UE (?; Y) the set of E -uni ers of ? satisfying Y. Complete subsets of UE (?; Y) are de ned similarly as in the case of arbitrary uni ers. We say that E is nitary (unitary) for uni cation with constant restrictions if for any ? and Y there is a complete subset of UE (?; Y) which is nite (a singleton). The combination algorithm in [5] constructs complete sets of uni ers for a problem in a combined theory from complete sets of uni ers satisfying certain uni cation problems with constant restrictions in the individual theories. The resulting set is nite if the input sets are nite. Thus it is important to know whether a theory is nitary for uni cation with constant restrictions. General Assumption. In the following, we assume that E = (; E ) is a commutative/monoidal theory, C is a nite set of free constants, and Y = (Yc )c2C is a constant restriction. By \+" we denote the associative-commutative binary operation of this theory, and by 0 the corresponding neutral element. In the categorical framework we consider terms as elements of free algebras and substitutions as morphisms. Hence, we do not distinguish between E -equal terms and substitutions. This means that t, considered as an element of FE (Z [ C ), does not contain c 2 C if there is a term t0 with t =E t0 such that c does not occur in t0, and that , considered as a morphism, satis es Y i there is a substitution 0 which satis es Y in the sense de ned above. In uni cation problems we view free constants as special variables that are not moved. Thus, if we characterize the absence of variables in terms we cover also 22
the case of free constants. Recall that for a variable x the canonical projection x is the morphism that keeps x xed and maps every variable distinct from x to 0. Lemma 6.1 Let t be a -term and x1; : : :; xn be the variables occurring in t. Then t =E tx1 + + txn . Proof. The mapping : FE (X ) ! FE (X ) de ned by t := tx1 + + txn is the sum of the projections xi . Each i is a morphism. Because E is commutative/monoidal, is also a morphism (see Subsection 5.1). The morphism satis es xi =E xi for all i, i = 1; : : : ; n. Hence, we have that is E -equal to the identity morphism, which implies the claim.
Lemma 6.2 Let t be a -term and x be a variable. Then tx =E 0 if, and only if, there exists a term t0 with t =E t0 such that x does not occur in t0. Proof. \)" If x does not occur in t, then we are done. Otherwise, let fx0; : : :; xng be the set of variables occurring in t, where x = x0. De ne ti := txi , i.e., ti is obtained from t by replacing every variable other than xi with 0 and keeping xi in its place. De ne t0 := t1 + + tn. Obviously, t0 does not contain x. Moreover, we have t0 =E 0 + t0 =E tx0 + tx1 + + txn =E t; where the last identity holds because of the preceding lemma. \(" Suppose that t =E t0 for some term t0 that does not contain x. The term t0x is obtained from t0 by replacing every variable x0 6= x by 0. Since x does not occur in t0, it follows that tx is a ground term. Since E is commutative/monoidal, this yields t0x =E 0, which implies tx =E 0. The next lemma shows that a morphism satis es Y i certain entries in the matrix M are zero. Lemma 6.3 Let : FE (Y [C ) ! FE (Z [C ) be a morphism that respects constants and M = (uv )u2Y [C;v2Z[C be the corresponding matrix. Then satis es (Yc )c2C if, and only if, yc = 0 for all c 2 C and y 2 Yc .
Proof. Recall that uv = u v, i.e., the entry at position uv of is given by the substitution [u=uv] (see Section 5). Now, satis es (Yc )c2C , i for all c 2 C and every y 2 Yc , y does not contain c, i for all c 2 C and y 2 Yc we have yc =E 0 by Lemma 6.2, i for all c 2 C and y 2 Yc the morphism y c is E -equal to the 0-morphism. Obviously, uni cation with constants is a special case of uni cation with constant restrictions because it corresponds to the case where Yc = ; for every c. Thus, the \only if"-part of the following theorem is obvious. 23
Theorem 6.4 The theory E is nitary for uni cation with constant restrictions if, and only if, E is nitary for uni cation with constants. In the rest of the section we assume that E is nitary for uni cation with
constants. We shall prove Theorem 6.4 by showing how to compute a complete set of uni ers by solving an appropriate set of linear equation systems. First, observe that E is also nitary w.r.t. uni cation without constants| because this is a special case of uni cation with constants|and thus, since the only possible types are unitary or zero (see [25, 28, 3]), even unitary w.r.t. uni cation without constants. We consider a uni cation problem given by morphisms , : FE (X [ C ) ! FE (Y [ C ) that respect constants. We want to describe those matrices M that correspond to uni ers of and satisfying Y. By the results of Section 5.3, such a matrix has the form M = hM h ; M i i and the equations (1) Mh M h = MhM h and (2) Mh M i + Mi = Mh M i + Mi hold. Equation (1) means that each column of M h satis es (4) Mh x = Mhx: Equation (2) is equivalent to the requirement that for every c 2 C we have Mhmc + ac = Mh mc + bc, where mc, ac, bc is the c-th column of M i, Mi , Mi , respectively. To describe the impact of the constant restriction Y, we de ne for every c 2 C the matrix NcY = (yy )y;y 2Y by yy := 1 i y = y0 and y 2 Yc , and yy := 0 otherwise. Then the entries at position (y; c) in M are 0 for any y 2 Yc if, and only if, NcY mc = 0. Combined with equation (2), this yields that each column mc of M i must satisfy the equation ! ! ! ! Mh x + bc = Mh x + dc : (5) 0 0 0 NcY Now, we construct a set of matrices that corresponds to a complete set of uni ers of and that satisfy Y. Since E is unitary w.r.t. uni cation without constants, the set of solutions to the equation (4) is nitely generated. We construct M h by choosing a nite set of generators and placing them as columns into a matrix. Since E is nitary w.r.t. uni cation with constants, there is a family K = (Kc)c2C , where Kc is a nite cover for the solutions of equation (5) (see Subsection 5.3). We de ne MK as the set of all matrices of the form ! Mh N 0 1 where N is a jY j jC j-matrix whose c-th column is an element of Kc .8 0
8
0
0
0
Note the similarity to the construction in Section 5.3.
24
Lemma 6.5 The set of matrices MK corresponds to a complete set of uni ers of , satisfying the constant restriction Y. Proof. Obviously, all elements of MK correspond to uni ers of , satisfying Y. In order to show completeness, let be an arbitrary uni er of , satisfying Y. We show that there exist matrices M = hM h ; N i 2 MK and L = hLh ; Lii
such that M = ML. Then = , where , are the morphisms corresponding to M and L. Since is a uni er, we have Mh Mh = Mh Mh. This means that each column of Mh is a solution of equation (4). By construction, the columns of Mh generate all solutions to this equation. Therefore, each column of Mh can be represented as a linear combination of the columns of M h . We construct a matrix Lh by placing into the z-th column the coecients of such a representation of the z-th column of Mh . Then Mh = M hLh . Now let c 2 C . The c-th column ec of Mi is a solution of the equation (5). Since Kc is a cover of the solutions to (5), there is a vector nc 2 Kc such that ec = xc + nc for some solution xc of the corresponding homogeneous equation system. This system is an extension of (4), and thus xc is a solution to (4) as well. Again, since the columns of M h generate all solutions to (4), there is a vector lc such that xc = M h lc, which implies that ec = M h lc + nc. Now, let N be the matrix whose c-th column is nc and Li be the matrix whose c-th column is lc. Then we have Mi = M h Li + N . Since also Mh = M hLh , it follows that M = hMh ; Mi i = hM h Lh; M h Li + N i = ML, and we have shown the claim. For any equational theory, an algorithm for general uni cation, i.e., uni cation where terms may contain additional free function symbols, is obtainable from an algorithm for uni cation with constant restrictions [5]. It returns nite complete sets of general E -uni ers if the intermediate problems with constant restrictions produced by it have nite complete sets of uni ers.
Corollary 6.6 There is an algorithm for general E -uni cation if, and only if, there is an algorithm to solve inhomogeneous linear equations over SE . Moreover, E is nitary for general uni cation if, and only if, it is nitary for uni cation with constants.
7 A Sucient Condition for Uni cation Type Zero In this section we shall generalize the \type zero" result for the theory AMH to a whole class of commutative/monoidal theories. This class will be de ned by properties of the corresponding semiring. Before we can do that, we need one more notation. 25
Let S be a semiring which is not a ring. That means that the Abelian monoid (S ; +; 0) is not a group, i.e., there exists an element p 2 S such that, for all q 2 S , we have p + q 6= 0. We shall call such an element p of S non-invertible. An element s 2 S which has an inverse w.r.t. \+" is called invertible. For the semiring N, all elements dierent from 0 are non-invertible. For the direct product N Z, an element (n; z) is invertible i n = 0. Here are some trivial facts about invertible and non-invertible elements. 1. The elements s1; : : : ; sk of S are invertible if, and only if, their sum s1 + + sk is invertible. 2. The element Ph2H sh h of the monoid semiring ShH i is non-invertible if, and only, if there exists h 2 H such that sh is non-invertible in S . Thus, if S is not a ring, then ShH i is not a ring for any monoid H . Recall that the theory AMH corresponds to the semiring N[X ] of polynomials in one indeterminate X with nonnegative integer coecients. That means that we have a monoid semiring ShH i where all the nonzero elements of S are noninvertible, and where the monoid H is the free monoid X in one generator. The \type zero" result for AMH can now be generalized to the case where S contains at least one non-invertible element.
Theorem 7.1 Let E be a commutative/monoidal theory such that the corresponding semiring SE is isomorphic to a monoid semiring ShX i. If S is not a ring, i.e., if S contains at least one non-invertible element, then E is of uni cation type
zero.
As mentioned before the monoid semiring ShX i is just the polynomial semiring S [X ]. The theorem is proved if we can nd matrices M , M over S [X ] such that the right S [X ]-module U (M ; M ) is not nitely generated. In the following we shall show that the 13-matrices M := (X; X; 0) and M := (0; 1; X 2) have the required property. Thus we consider the homogeneous linear equation
X x 1 + X x 2 = x2 + X 2 x3
(6)
which has to be solved by a vector L 2 S [X ]3. If L is such a vector, we denote its components by L(1), L(2), L(3). Let p be a non-invertible element in S . Obviously, for any n 1, the vector Ln (2) n+1 (3) n which consists of the components L(1) n := p, Ln := pX + + pX , Ln := pX is a solution of (6). Now assume that U (M ; M ) is nitely generated, i.e., there exist nitely many solutions G1; ; Gm of (6) which generate all the solutions of (6). Let n 1 26
be arbitrary but xed. Since Ln is a solution of (6) there exist l1; ; lm 2 S [X ] such that m X (7) Ln = Gi li: i=1
If we consider (7) in the rst component, we get p = Pmi=1 G(1) i li . For i = 1; : : : ; m, (1) let pi 2 S be the constant coecient of the polynomial Gi , and hi 2 S be the constant coecient of li. The last equation implies that p = Pmi=1 pihi. Since p is non-invertible, there exists some j with 1 j m such that pj hj is noninvertible.
Lemma 7.2 The polynomial G(3) j is of degree at least n. Proof. Assume that the degree of G(3) j is less than n. Since Gj is a solution of (6), we know that Gj hj is also a solution, that is, (2) (2) 2 (3) X G(1) j hj + X Gj hj = Gj hj + X Gj hj :
(8)
The components of the solution Gj hj satisfy the following properties:
The constant coecient of the polynomial G(1) j hj is e1 := pj hj . Thus we
know by the choice of j that e1 is non-invertible. The polynomial G(2) j hj has constant coecient 0. This is an immediate consequence of the equation (8).
All the coecients of G(3) j hj are invertible. This can be seen by considering
equation (7) in the third component, which yields pX n = Pmi=1 G(3) i li . Since (3) Gj hj contains only monomials of degree less than n, all these monomials vanish during the summation. Consequently, all the coecients of these monomials have to be invertible. (2) From the fact that the coecient of X in X G(1) j hj is e1 and in X Gj hj is 0 2 (3) we get by (8) that the coecient of X in G(2) j hj + X Gj hj is also e1. Hence, the coecient of X in G(2) j hj is e1. Starting with the fact the coecient e1 of X in G(2) j hj is non-invertible, we (2) shall now deduce that the coecient of X 2 in Gj hj is also non-invertible. Since (2) 2 the coecient of X in G(2) j hj is e1, the coecient of X in X Gj hj is also e1. Thus the coecient of X 2 on the left hand side of (8) is e0 := e1 + e for some e. The coecient e0 is non-invertible because otherwise e(3) 1 could not be (2) 2 2 non-invertible. By (8), the coecient of X in Gj hj + X Gj hj is also e0. 27
Since all the coecients of X 2 G(3) j hj are invertible, this nally shows that the (2) 2 coecient e2 of X in Gj hj is non-invertible. This argument can be iterated to show that, for all k 1, the coecient ek (2) k of X in Gj hj is non-invertible. This is a contradiction to the fact that the polynomial G(2) j hj has only nitely many nonzero coecients. We have just shown that, for any n 1, there exists a j such that G(3) j is of degree at least n. This is a contradiction to our assumption that there are nitely many generators Gj of all solutions of (6). This completes the proof of the theorem.
8 Adding Finite Monoids of Homomorphisms We now investigate commutative/monoidal theories that are augmented with nite monoids of homomorphisms. In contrast to the case of free monoids, which was treated in the previous section, we can derive the positive result that adding nite monoids doesn't change the uni cation type and that algorithms for the original theory can be used to solve problems in the augmented theory. An example for such a theory is AMIn, the theory of Abelian monoids with an involution. Recall that AMIn can be written as AMhZ2 i, and that the corresponding semiring is NhZ2i. General Assumption. In this section E is a commutative/monoidal theory and H is a nite monoid. Since uni cation problems in EhH i are equivalent to systems of linear equations over SE hH i, our basic technique will be to reduce such systems to systems of linear equations over SE . As a rst step we shall establish a one-to-one correspondence between vectors. Every vector x 2 SE hH in has a unique representation as x = Ph2H xhh where xh 2 SE n . As an example the vector ! 1 + 2 h x= 2 NhZ2 i h can be written as
! ! ! 1 e + 2 h 1 2 x = 0 e + 1 h = 0 e + 1 h:
We can formally justify this notation if we consider SE and H as subsets of SE hH i. This can be done by identifying every element s 2 SE with se 2 SE hH i, where e is the unit in H , and every element h 2 H with 1 h 2 SE hH i. 28
Suppose the elements of H are numbered as h1; : : :; hjH j. If x 2 SE hH in has a representation as x = xh1 h1 + + xh H hjH j, we de ne 0 1 x h1 B .. CC xb = B @ . A 2 SE njH j xh H as the vector obtained from x by writing the vectors xh one below another. Continuing our example from above we have 011 B 0 CC xb = B B@ 2 CA : 1 j
j
j
j
We thus obtain a bijection between SE hH in and SE njH j. In particular, every vector in SE njH j has a representation as xb for some x 2 SE hH in. Obviously, for all x, y 2 SE njH j and all s 2 SE we have xd + y = xb + yb and xb s = xd s: (9) In algebraic terms we can rephrase these equalities by saying that the mapping \b" is a right SE -module isomorphism. Next we will associate to every mn-matrix M with entries in SE hH i an c with entries in SE , such that Mx d =M cxb holds for every mjH jnjH j-matrix M n c x 2 SE hH i . To derive an appropriate de nition of M , observe that, similar to P a vector, the matrix M has a unique representation M = h2H Mh h, where the Mh are matrices with entries in SE . Applying M to a vector x yields X X X Mx = ( Mf f )( xg g) = Mf xg f g f 2H g2H f;g2H X X X X X = ( Mf x g ) h = ( ( Mf )xg ) h: h2H g2H h=f g
h2H h=fg
d corresponding This series of equalities says that the component of the vector Mx to the element h is obtained by summing over all g the products (Ph=f g Mf )xg . c as the mjH jnjH j-matrix consisting of the This shows that we have to de ne M submatrices ci;j = X Mh; M h2H hi =hhj
where a sum over an empty set of indices is to be understood as the zero matrix. With this de nition we obtain d =M cab: Ma (10) 29
Returning to our example theory AMIn, consider a matrix M over NhZ2i. If M = Me e + Mh h, then the associated matrix is ! M M e h c M= M M : h e Thus, our general approach gives us the same representation of uni cation problems in AMIn as the one derived in [1]. Next we apply our transformation technique to uni cation problems without constants.
Proposition 8.1 Let M1, M2 be mn-matrices over SE hH i, and x 2 SE hH in. Then:
c1; M c2) 1. x 2 U (M1 ; M2) if, and only if, xb 2 U (M
c1; M c2) is generated by xb1; : : :; xbk . 2. U (M1 ; M2 ) is generated by x1; : : :; xk if U (M Proof. 1. Let x 2 SE hH in . Then we have x 2 U (M1; M2) if and only if c xb = M c xb if and only if M1x = M2x if and only if Md1x = Md2x if and only if M c1; M c2). xb 2 U (M 2. It suces to show that every x 2 U (M1; M2) is a linear combination c1; M c2) by part (1). Hence, of x1; : : :; xk . If x 2 U (M1; M2), then xb 2 U (M xb = xb1s1 + + xbksk . Using equalities (9), we conclude that x = x1s1 + + xksk . Thus, x is a linear combination of x1; : : :; xk . If E is unitary w.r.t. uni cation without constants, then for all matrices M1, c1; M c2) is nitely generated, M2 with entries from SE hH i the right SE -module U (M and by the preceding proposition, U (M1; M2) is nitely generated. Together with Theorem 5.3 this proves our next theorem.
Theorem 8.2 If E is unitary w.r.t. uni cation without constants, then EhH i is
unitary w.r.t. uni cation without constants.
The approach to uni cation problems with constants again consists in reducing a problem for EhH i to a problem for E . Speaking in terms of semirings, we shall reduce inhomogeneous linear equations over SE hH i to inhomogeneous linear equations over SE . For a set S SE hH in let Sb := fxb j x 2 S g.
Proposition 8.3 Let M1, M2 be mn-matrices with entries in SE hH i and a, b 2 SE hH im. Let N := fx 2 SE hH in j M1x + a = M2x + bg. Then: c y + ab = M c y + bbg 1. Nc = fy 2 SE njH j j M 30
2. N is a coset ( nite union of cosets) of U (M1 ; M2), if Nc is a coset ( nite c1; M c2). union of cosets) of U (M
Proof. 1. By equalities (9) and (10) it follows that for all x 2 SE hH in we have c xb + ab = M c xb + bb. Since for every y 2 SE njH j M1x + a = M2x + b if and only if M n there is a unique x 2 SE hH i such that y = xb, this yields the claim. c1; M c2), then there exists a vector x 2 SE hH in such 2. If Nc is a coset of U (M c1; M c2)g. Using equality (9) and Proposition 8.1 we that Nc = fxb + y j y 2 U (M conclude that N = fx + z j z 2 U (M1; M2)g. For the case that Nc is a nite union of cosets, the argument has to be slightly generalized. By Theorem 5.4, the preceding result gives us a condition for EhH i to be unitary or nitary.
Theorem 8.4 Suppose E is unitary w.r.t. uni cation without constants. If E is unitary ( nitary) w.r.t. uni cation with constants, then EhH i is unitary ( nitary) w.r.t. uni cation with constants, if E is unitary ( nitary) w.r.t. uni cation with constants.
Propositions 8.1 and 8.3 tell us how we can use an algorithm for E to solve problems in EhH i. An EhH i-uni cation problem without constants is given by mn-matrices M1, M2 with entries in SEhH i ' SE hH i. We compute the transc and M c and solve the equation M c y = M c y over SE , which we can do forms M with the algorithm for E . If the set of solutions of the matrix equation over SE is generated by vectors y1; : : :; yk 2 SE njH j, we compute x1; : : : ; xk 2 SE hH in such that xbi = yi. Then the set of solutions of the original equation is generated by x1; : : :; xk and the matrix M that has x1; : : :; xk as columns represents a most general uni er of the given problem. Since inhomogeneous linear equations over SEhH i ' SE hH i can be transformed into inhomogeneous equations over SE , an algorithm for E can be used in a similar way as in the constant free case to solve uni cation problems with constants in EhH i.
9 Conclusion Two approaches to solving uni cation problems can be distinguished. The rst, which might be called the \syntactic approach," relies heavily on the syntactic structure of the identities that de ne the equational theory (see for instance [14, 26, 20]). The second, which we may characterize as the \semantic approach," exploits the structure of the algebras that satisfy the theory. If little or nothing 31
is known of the algebras involved, the rst approach is useful, whereas the second is applicable to theories that describe algebraic structures which have been investigated in mathematics. With this paper we pursue the semantic approach to uni cation. We have combined techniques for commutative and monoidal theories that had been developed independently. We have shown that both classes of theories are essentially the same in that every monoidal theory is commutative, and every commutative theory can be turned into a monoidal theory by a signature transformation. One of the major topics of research in uni cation in recent years was to construct algorithms for the combination of equational theories. This problem has been solved|at least in principle|for theories with disjoint signatures [33, 5]. The result in Section 6 show that the combination method developed in [5] can always be applied for nitary commutative/monoidal theories. Of course, the case where signatures are not disjoint is too dicult to be treated in full generality. We concentrated on a special case, namely the combination of a commutative/monoidal theory with a monoid of homomorphisms. By exploiting the algebraic structure of the canonical semiring associated to such a theory, we have found combinations that are of uni cation type zero, and others that are of type unitary or nitary. For the latter case we have pointed out how a uni cation algorithm can be derived. There still remain open questions for this kind of combination. We have augmented a given theory either by free monoids or by nite monoids, but we do not know what happens with in nite monoids that are not free. The only commutative/monoidal theories of uni cation type zero that we know are those described in this paper. They all have canonical semirings that are not rings. It would be interesting to know whether there exist theories of uni cation type zero for which the canonical semiring is a ring. Since every semiring can be obtained from a commutative/monoidal theory this question can be posed in purely algebraic terms: is there a ring such that the set of solutions for some system of homogeneous linear equations is not nitely generated? It is not known whether (1) there exists a unitary or nitary equational theory that is in nitary or of type zero for uni cation w.r.t. constants, or whether (2) there exists a theory that is unitary or nitary for uni cation w.r.t. constants, but in nitary or of type zero for general uni cation or uni cation with constant restrictions. These question has been raised in the context of combining theories with disjoint signatures. We have shown that the second case cannot occur for commutative/monoidal theories. The rst question can be reformulated for commutative/monoidal theories as an algebraic problem: does there exist a semiring such that for every system of homogeneous equations the set of solutions is a nitely generated right module, but there is a system of inhomogeneous equations such that the corresponding set of solutions is not a nite union of cosets? Given the substantial body of results in linear algebra, it is conceivable to nd a 32
semiring satisfying this condition. Such a semiring would then give us an example of an equational theory with the above property.
33
References [1] Baader, F.: Uni cation in Commutative Theories. J. Symbolic Computation 8, 479{497 (1989) [2] Baader, F.: Uni cation Properties of Commutative Theories: A Categorical Treatment. In: Pitt, D.H., Rydeheard, D.E., Dybjer, P., Pitts, A.M., Poigne, A. (eds.) Proceedings of the Conference on Category Theory and Computer Science. Lecture Notes in Computer Science, Vol. 389. Berlin, Heidelberg, New York: Springer 1989 [3] Baader, F.: Uni cation in Commutative Theories, Hilbert's Basis Theorem, and Grobner Bases. J. ACM 40, 477{503 (1993) [4] Baader, F., Nutt, W.: Adding Homomorphisms to Commutative/Monoidal Theories or How Algebra Can Help in Equational Uni cation. In: Book, R. (ed.) Proceedings of the 4th International Confernece on Rewriting Techniques and Applications. Lecture Notes in Computer Science, Vol. 488. Berlin, Heidelberg, New York: Springer 1991 [5] Baader, F., Schulz, K.U.: Uni cation in the Union of Disjoint Equational Theories: Combining Decision Procedures. In: Kapur, D. (ed.) Proceedings of the 11th International Conference on Automated Deduction. Lecture Notes in Computer Science, Vol. 607. Berlin, Heidelberg, New York: Springer 1992 [6] Baader, F., Siekmann, J.H.: Uni cation Theory. In: Gabbay, D.M., Hogger, C.J., Robinson, J.A. (eds.) Handbook of Logic in Arti cial Intelligence and Logic Programming. Oxford: Oxford University Press 1994 [7] Bachmair, L.: Canonical Equational Proofs. Boston, Basel, Berlin: Birkhauser 1991 [8] Cohn, P.M.: Universal Algebra. New York: Harper and Row 1965 [9] Comon, H., Haberstrau, M., Jouannaud, J.-P.: Decidable Problems in Shallow Equational Theories. In: Scedrov, A. (ed.) Proceedings of the 7th Annual IEEE Symposium on Logic in Computer Science. Washington D.C.: IEEE Computer Society Press 1992 [10] Davis, M.: Unsolvable Problems. In: Barwise, J. (ed.) Handbook of Mathematical Logic. Amsterdam: Elsevier Science Publishers 1977 [11] Fay, M.: First-order Uni cation in an Equational Theory. In: Proceedings 4th Workshop on Automated Deduction. 1979 34
[12] Fitting, M.: Basic Modal Logic. In: Gabbay, D.M., Hogger, C.J., Robinson, J.A. (eds.) Handbook of Logic in Arti cial Intelligence and Logic Programming. Oxford: Oxford University Press 1993 [13] Gallier, J., Raatz, S.: SLD-Resolution Methods for Horn Clauses with Equality Based on E -Uni cation. In: Keller, R.M. (ed.) Proceedings of the 3rd IEEE Symposium on Logic Programing. Washington D.C.: IEEE Computer Society Press 1986 [14] Gallier, J., Snyder, S.: Complete Sets of Transformations for General E -Uni cation. Theoretical Computer Science 27, 203{260 (1989) [15] Gratzer, G.: Universal Algebra. Princeton: Van Nostrand 1968 [16] Herrlich, H., Strecker, G.E.: Category Theory. Boston: Allyn and Bacon 1973 [17] Huet, G.: Con uent Reductions: Abstract Properties and Applications to Term Rewriting Systems. J. ACM 27, 797{821 (1980) [18] Jaar, J., Lassez, J.L., Maher, M.: A Theory of Complete Logic Programs with Equality. J. Logic Programming 1, 211{224 (1984) [19] Jouannaud, J.P., Kirchner, H.: Completion of a Set of Rules Modulo a Set of Equations. SIAM J. Comp. 15, 1155{1194 (1986) [20] Kirchner, C., Klay, F.: Syntactic Theories and Uni cation. In: Mitchell, J. (ed.) Proceedings of the 5th Annual IEEE Symposium on Logic in Computer Science. Washington D.C.: IEEE Computer Society Press 1990 [21] Lawvere, F.W.: Functional Semantics of Algebraic Theories. Ph.D. Thesis, Columbia University, New York (1963) [22] Lemmon, E.J.: Algebraic Semantics for Modal Logics I. J. Symbolic Logic 31, 46{65 (1966) [23] Livesey, M., Siekmann, J.: Uni cation of Bags and Sets. SEKI-MEMO 76-II, Institut fur Informatik I, Universitat Karlsruhe (1976) [24] Nevins, A. J.: A Human Oriented Logic for Automated Theorem Proving. J. ACM 21, 606{621 (1974) [25] Nutt, W.: Uni cation in Monoidal Theories, Presentation at the Second Workshop on Uni cation. Val d'Ajol, France, (1988) 35
[26] Nutt, W., Rety, P., Smolka, G.: Basic Narrowing Revisited. J. Symbolic Computation 7, 295{317 (1989) [27] Nutt, W.: The Uni cation Hierarchy is Undecidable. J. Automated Reasoning 7, 369{381 (1991) [28] Nutt, W.: Uni cation in Monoidal Theories. In: Stickel, M. (ed.) Proceedings 10th International Conference on Automated Deduction. Lecture Notes in Computer Science, Vol. 449. Berlin, Heidelberg, New York: Springer 1990 [29] Nutt, W.: Uni cation in Monoidal Theories is Solving Linear Equations over Semirings. Technical Report RR-92-01, DFKI Saarbrucken (1992) [30] Peterson, G., Stickel, M.: Complete Sets of Reductions for Some Equational Theories. J. ACM 28, 233{264 (1981) [31] Plotkin, G.: Building in Equational Theories. Machine Intelligence 7, 73{90 (1972) [32] Rotman, J. J.: The Theory of Groups. Boston: Allyn and Bacon 1973 [33] Schmidt-Schau, M.: Combination of Uni cation Algorithms. J. Symbolic Computation 8, 51{99 (1989) [34] Slagle, J.R.: Automated Theorem Proving for Theories with Simpli ers, Commutativity and Associativity. J. ACM 21, 622{642 (1974) [35] Stickel, M.: Automated Deduction by Theory Resolution. J. Automated Reasoning 1, 333{355 (1985) [36] Taylor, W.: Equational Logic. Houston J. of Mathematics 5, 1{51(1979)
36