Abstract 1 Introduction 2 Basic definitions and general results 3 The unification type of 𝓔𝓛 4 The unrestricted unification types of ACUI, ACU, and AC 5 Conclusion References Appendix A The unification type of ACU

The Unification Type of an Equational Theory May Depend on the Instantiation Preorder

Franz Baader ORCID Theoretical Computer Science, TU Dresden, Germany
Center for Scalable Data Analytics and Artificial Intelligence (ScaDS.AI) Dresden/Leipzig, Germany
Oliver Fernández Gil ORCID Theoretical Computer Science, TU Dresden, Germany
Center for Scalable Data Analytics and Artificial Intelligence (ScaDS.AI) Dresden/Leipzig, Germany
Abstract

The unification type of an equational theory is defined using a preorder on substitutions, called the instantiation preorder, whose scope is either restricted to the variables occurring in the unification problem, or unrestricted such that all variables are considered. It has been known for more than three decades that the unification type of an equational theory may vary, depending on which instantiation preorder is used. More precisely, it was shown in 1991 that the theory 𝖠𝖢𝖴𝖨 of an associative, commutative, and idempotent binary function symbol with a unit is unitary w.r.t. the restricted instantiation preorder, but not unitary w.r.t. the unrestricted one. In 2016 this result was strengthened by showing that the unrestricted type of this theory also cannot be finitary. Here, we considerably improve on this result by proving that 𝖠𝖢𝖴𝖨 is infinitary w.r.t. the unrestricted instantiation preorder, thus precluding type zero. We also show that, w.r.t. this preorder, the unification type of 𝖠𝖢𝖴 (where idempotency is removed from the axioms) and of 𝖠𝖢 (where additionally the unit is removed) is infinitary, though it is respectively unitary and finitary in the restricted case. In the other direction, we prove (using the example of unification in the description logic ) that the unification type may actually improve from type zero to infinitary when switching from the restricted instantiation preorder to the unrestricted one. In addition, we establish some general results on the relationship between the two instantiation preorders.

Keywords and phrases:
Unification type, Instantiation preorder, Equational theories, Modal and Description Logics
Funding:
Franz Baader: Supported by the German Federal Ministry of Education and Research (BMBF, SCADS22B) and the Saxon State Ministry for Science, Culture and Tourism (SMWK) by funding the competence center for Big Data and AI “ScaDS.AI Dresden/Leipzig”.
Oliver Fernández Gil: Same support as Franz Baader.
Copyright and License:
[Uncaptioned image] © Franz Baader and Oliver Fernández Gil; licensed under Creative Commons License CC-BY 4.0
2012 ACM Subject Classification:
Theory of computation Equational logic and rewriting
; Theory of computation Automated reasoning ; Theory of computation Description logics
Editors:
Maribel Fernández

1 Introduction

Syntactic unification of terms was independently introduced by Robinson [47] and Knuth and Bendix [38] as a tool for computing resolvents in resolution-based theorem proving and critical pairs in the completion of term rewriting systems. Both showed the important result that any solvable unification problem has a most general unifier (mgu), i.e., a unifier that has all other unifiers as instances. In these papers, a substitution θ is defined to be an instance of a substitution σ if there is a substitution λ such that λσ=θ, i.e., λ(σ(x))=θ(x) holds for all variables x in the countably infinite set of variables V available for building terms. In this paper, we call the preorder on substitutions obtained this way the unrestricted instantiation preorder and write it as σVθ, where the index indicates that terms are to be made syntactically equal. In addition to many papers on how to compute the mgu efficiently (e.g., [43, 42, 25]), properties of the preorder on substitutions defined this way have, for instance, been investigated in [28, 41].

In his seminal paper [45], Plotkin proposed to build certain equational theories (such as associativity or commutativity) into the unification algorithm rather than treating their axiomatization within the general theorem proving process. Similar proposals were also made in the setting of Knuth-Bendix completion in term rewriting [44, 37]. As already pointed out by Plotkin, in the equational setting most general unifiers need not exist and their rôle is instead taken on by minimal complete sets of unifiers, i.e., sets of unifiers such that every unifier is an instance of a unifier in this set, and no distinct elements in the set are comparable w.r.t. the instantiation preorder.111Plotkin actually calls these sets “maximally general set of unifiers” and requires two additional technical conditions. As instantiation preorder he uses what we call the restricted instantiation preorder, i.e., σEXθ where E is the theory modulo which unification is considered and X is the set of variables occurring in the unification problem. This preorder requires the existence of a substitution λ such that λ(σ(x))Eθ(x) holds for all variables xX. He explains the use of equality modulo E (E) in this definition, but does not comment on the restriction to the variables of the unification problem. Plotkin also gives an example of an equational theory (associativity 𝖠) where minimal complete sets of unifiers may become infinite, and conjectures that there may exist theories for which such sets do not exist.

Siekmann proposed to characterize equational theories according to the cardinality and existence of minimal complete sets of unifiers into the types unitary, finitary, infinitary, and zero. However, in the first overview paper on results in this direction [46], he uses the unrestricted instantiation preorder, and the same is true for his work on unification modulo commutativity [50]. In later overview papers [51, 52, 53] he describes the unrestricted instantiation preorder in the introduction, but employs the restricted one in the formal definition of unification types, again without explanation. Due to potential applications of equational unification in resolution-based theorem proving and term rewriting, unification properties (among them the unification type) of frequently encountered equational axioms such as associativity, commutative, idempotency, distributivity and their combinations were extensively studied in the automated deduction community in the 1980s and 1990s (see [36, 18, 19] for overviews). More recently, unification in certain logics such as modal and description logics has drawn considerable interest [31, 13, 8], where the goal is to make a formula valid or two formulas equivalent by applying a substitution. In particular, the unification types of various modal logics have been determined (see, e.g., [35, 34, 26, 22, 1, 21, 27]). In both areas, the authors usually employ the restricted instantiation preorder.

In the present paper, we investigate the impact that using the unrestricted rather than the restricted instantiation preorder has on the unification type. Until now, there were only two partial results in this direction. Already in [4] it was shown that the theory 𝖠𝖢𝖴𝖨 of an associative, commutative, and idempotent binary function symbol f with a unit 0, which is unitary w.r.t. the restricted instantiation preorder [7] for elementary222This means that unification problems may only contain terms built using variables, 0, and f. unification, is not unitary w.r.t. the unrestricted one, and thus must be finitary, infinitary or of type zero. In [10], this result was strengthened by demonstrating that also type finitary is not possible. In the present paper, we prove that the unification type of 𝖠𝖢𝖴𝖨 is actually infinitary w.r.t. the unrestricted instantiation preorder. We show the same result for the theory 𝖠𝖢 of an associative and commutative binary function symbol and for 𝖠𝖢𝖴, which extends 𝖠𝖢 with a unit. Note that 𝖠𝖢𝖴 is unitary and 𝖠𝖢 is finitary for elementary unification w.r.t. the restricted instantiation preorder [56] (see also Section 10.3 in [16]). Quite surprisingly, we are also able to show that the unification type of the description logic actually improves from type zero [13] to infinitary when switching from the restricted instantiation preorder to the unrestricted one. In addition to these results for specific theories/logics, we establish some general results on the relationship between the two instantiation preorders, which among other things imply that for associativity 𝖠 and for commutativity 𝖢 the unification type does not depend on which of the two instantiation preorders is employed.

2 Basic definitions and general results

Given a signature Σ consisting of a finite set of function symbols (with associated arities) and a countably infinite set of variables V, the set T(Σ,V) of terms over Σ with variables in V is defined in the usual way [16]. An equational theory E is given by a finite set of identities st between terms, which are (implicitly) assumed to be universally quantified. Such a set of identities E induces the congruence relation E on terms, which can either be defined syntactically through rewriting or semantically through first-order interpretations of Σ, with as identity relation [16].

A substitution σ is a mapping from V to T(Σ,V) that has a finite domain Dom(σ):={xVσ(x)x}. It can be homomorphically extended to a mapping from T(Σ,V) to T(Σ,V) by defining σ(f(t1,,tn)):=f(σ(t1),,σ(tn)). The variable range VRan(σ) of σ consists of the set of variables occurring in the terms σ(x) for xDom(σ). Substitutions can be compared using the instantiation preorder: given an equational theory E, a set of variables XV, and two substitutions σ,τ, we say that σ is more general than τ (or τ is an instance of σ) w.r.t. E and X (written σEXτ) if there is a substitution λ such that λσEXτ, i.e., λ(σ(x))Eτ(x) holds for all xX. In case X=V we also write λσEτ in place of λσEVτ. It is easy to see that EX is indeed a preorder, i.e., reflexive and transitive, but in general not antisymmetric. We write EX for the equivalence relation induced by EX, i.e., σEXτ iff σEXτ and τEXσ. We say that σ is strictly more general than τ (or τ is a strict instance of σ) w.r.t. E and X (written σ<EXτ) if σEXτ and σ≁EXτ.

An E-unification problem is a finite set of equations of the form Γ={s1E?t1,,snE?tn} such that s1,t1,,sn,tn are terms in T(Σ,V). An E-unifier of Γ is a substitution σ that solves all the equations in Γ, i.e., satisfies σ(si)Eσ(ti) for all i,1in. The unification problem Γ is solvable if it has an E-unifier. The set of all E-unifiers of Γ is denoted as 𝒰E(Γ). For elementary E-unification it is assumed that Σ (and thus also Γ) contains only function symbols occurring in E. For E-unification with constants Σ and Γ may contain additional constant symbols, and for general E-unification Σ and Γ may contain additional function symbols of arbitrary arity.

Unification types for non-empty sets of identities E are usually defined w.r.t. the restricted instantiation preorder, which is EX where X is the finite set Var(Γ) of all variables occurring in the given unification problem Γ, but some authors also use the unrestricted instantiation preorder EV. In this section, we will additionally consider settings where X is between these two extremes. Note that Var(Γ)X is required for the set of E-unifiers to be closed under instantiation.

Lemma 1.

If Γ is an E-unification problem and XV a set of variables satisfying Var(Γ)X, then σ𝒰E(Γ) implies θ𝒰E(Γ) for all substitutions θ such that σEXθ.

Given an E-unification problem Γ and some set of variables X with Var(Γ)XV, we say that a set 𝒮 of substitutions is a complete set of E-unifiers of Γ w.r.t. EX if it consists of E-unifiers of Γ, and every E-unifier of Γ is an instance of an element of the complete set, i.e., for every θ𝒰E(Γ) there exists σ𝒮 such that σEXθ. Such a set is called minimal if it does not contain two distinct elements that are comparable w.r.t. EX. It is easy to see that minimal complete sets of E-unifiers of a given unification problem Γ are unique up to the equivalence relation EX induced by the preorder EX (see, e.g., Corollary 3.13 in [19] and Theorem 3 below), and thus all have the same cardinality.

Definition 2.

Let Γ be a solvable E-unification problem and X a set of variables such that Var(Γ)XV. Then the unification type of Γ w.r.t. EX is

  • unitary if Γ has a minimal complete set of E-unifiers of cardinality one w.r.t. EX, whose single element is then called most general E-unifier (mgu),

  • finitary if Γ has a finite minimal complete set of E-unifiers of cardinality greater than one w.r.t. EX,

  • infinitary if Γ has an infinite minimal complete set of E-unifiers w.r.t. EX,

  • zero if Γ does not have a minimal complete set of E-unifiers w.r.t. EX, i.e., every complete set is redundant in the sense that it must contain two distinct elements that are comparable w.r.t. EX.

Minimal complete sets of unifiers can alternatively be characterized using the following order-theoretic point of view [3, 19]. Let Γ be an E-unification problem and XV a set of variables satisfying Var(Γ)X. We denote the EX-equivalence class of a unifier σ as [σ]EX and the set of all equivalence classes of unifiers as [𝒰E(Γ)]EX. The partial order EX on [𝒰E(Γ)]EX induced by the instantiation preorder EX on unifiers is defined as [σ]EXEX[τ]EX if σEXτ. We say that S[𝒰E(Γ)]EX is complete w.r.t. EX if every element of [𝒰E(Γ)]EX is above (w.r.t. EX) some element of S.

Theorem 3 ([19]).

Let M be the set of EX-minimal elements of [𝒰E(Γ)]EX. If 𝒮 is a minimal complete set of E-unifiers of Γ w.r.t. EX, then M={[σ]EXσ𝒮}. Conversely, if M is complete in [𝒰E(Γ)]EX, then any set of substitutions obtained by picking one representative for each element of M is a minimal complete set of E-unifiers of Γ.

Consequently, unification type zero corresponds to the case where the set M of minimal elements is not complete, whereas the other types are determined by the cardinality of the set M in case it is complete. Theorem 3.1 in [3] establishes conditions that are necessary, sufficient, or both for proving unification type zero.333Note that, in [3], the instantiation preorder is written the other way round, i.e., more general substitutions are larger. Here, we present one of these sufficient conditions since we will use it in Section 3 to show that the unification type of the description logic is zero w.r.t. the restricted instantiation preorder. It was also employed in the first paper showing unification type zero for an equational theory [29, 30].

Lemma 4 ([3]).

If there exists a strictly decreasing chain σ1>EXσ2>EXσ3>EX such that the set 𝒮={σ1,σ2,σ3,} is a complete set of E-unifiers of Γ w.r.t. EX, then Γ has type zero w.r.t. EX.

Proof.

Suppose there exists a chain σ1>EXσ2>EXσ3>EX satisfying the conditions stated in the lemma. This chain satisfies the following properties:

  1. 1.

    It has no lower bound in 𝒰E(Γ), i.e., there is no E-unifier τ of Γ such that σiEXτ for all i1. To see why this is true, suppose such a unifier τ does exist. Since 𝒮 is complete, there is j1 such that τEXσj>EXσj+1EXτ. Transitivity of EX yields that σj+1EXσj, but this contradicts σj>EXσj+1.

  2. 2.

    For all i1, if there is τ𝒰E(Γ) such that σiEXτ, then there exists τ𝒰E(Γ) such that τEXτ and σi+1EXτ. To show this, assume that σiEXτ. The completeness of 𝒮 yields j1 such that σiEXτEXσj. This implies that σiEXσj because EX is a transitive relation. Hence, since the chain is strictly decreasing, it follows that ij, and thus σi+1EXσj+1 and τEXσj+1. Consequently, we can set τ:=σj+1.

Now, let M be the set of EX-minimal elements of [𝒰E(Γ)]EX. To prove that Γ has type zero, it suffices to show that M is not complete. Assume to the contrary that M is complete. Then there exists [τ]EXM such that [τ]EXEX[σ1]EX, and thus σ1EXτ. Since our chain does not have a lower bound, there must be an i1 such that σiEXτ and σi+1EXτ. Using the second property shown for our chain, there exists a unifier τ such that τEXτ and σi+1EXτ. Minimality of [τ]EX implies that τEXτ, and thus σi+1EXτEXτ, which yields a contradiction. Thus, we have shown that M cannot be complete, which implies that Γ has type zero.

As usual, we order unification types w.r.t. how bad they are (larger is worse) by setting

zero > infinitary > finitary > unitary.

The unification type w.r.t. EX of an equational theory E is the worst type of any solvable E-unification problem w.r.t. EX. The unrestricted unification type of Γ (E) is the one w.r.t. EV and the restricted unification type of Γ (E) is the one w.r.t. EX for X=Var(Γ).

The results on the unification type of equational theories in the literature are usually shown for the restricted case. As we will demonstrate in this paper, it may indeed make a considerable difference for the unification type which instantiation preorder is employed in its definition. This is however not the case in the following situation.

Lemma 5.

Let E be an equational theory, Γ an E-unification problem, X0:=Var(Γ), and XV a set of variables such that X0X and VX is infinite. If Γ has a minimal complete set of E-unifiers w.r.t. EX, then it has a minimal complete set of E-unifiers w.r.t. EX0 of the same cardinality, and vice versa.

Proof.

Let 𝒮 be a minimal complete set of E-unifiers of Γ w.r.t. EX. For every unifier θ in 𝒮 we can rename the variables in VRan(θ) such that they do not belong to X by applying an appropriate permutation π that maps the variables of VRan(θ) bijectively to a set of variables Y with |Y|=|VRan(θ)| and Y(XVRan(θ))=. Such a finite set Y of variables exists since VRan(θ) is finite and VX is infinite. For a given bijection p:VRan(θ)Y, we can define π as follows: π(z):=p(z) for all zVRan(θ), π(y):=p1(y) for all yY, and π(x)=x for all other variables. Note that π is a substitution since its domain is VRan(θ)Y, which is finite. To show that π really is a permutation, i.e., a bijective mapping from V to V, it is sufficient to show that it is an injective mapping from V to V (see Lemma 2.6 in [28]). This is an immediate consequence of the facts that p and p1 are bijections and Y and VRan(θ) are disjoint.

The substitution πθ is equivalent to θ w.r.t. the equivalence relation V induced by V, and thus also w.r.t. EX. In fact, π1πθ=θ. If we restrict the domain of this substitution to X, then the resulting substitution πθ|X is still equivalent to θ w.r.t. EX and also satisfies VRan(πθ|X)X=. To see the latter, consider a variable xDom(πθ|X). First assume that xDom(θ)X. Then all the variables in θ(x) belong to VRan(θ), and thus all the variables in πθ|X(x) belong to Y, which is disjoint with X. If xXDom(θ), then πθ|X(x)=π(x)x. Since Dom(π)=VRan(θ)Y and Y is disjoint with X, this implies xVRan(θ), and thus π(x)Y.

Let 𝒮 be the set of substitutions obtained from 𝒮 by applying this renaming and domain restriction process to every element of 𝒮. Due to the EX-equivalence of the elements of 𝒮 with their modified variants in 𝒮 and the fact that X contains all the variables occurring in Γ, it is easy to see that 𝒮 is also a minimal complete set of E-unifiers of Γ w.r.t. EX. In a second step, we restrict the domains of the elements of 𝒮 to X0. Given an element θ of 𝒮, we define θ|X0 to be the substitution that coincides with θ on X0 and maps each variable xX0 to x. Since θ is an E-unifier of Γ and this unification problem contains only variables from X0, the substitution θ|X0 is clearly also an E-unifier of Γ. We claim that θ|X0EXθ. To prove this, we define the substitution λ by setting λ(x):=θ(x) if xXX0 and λ(x):=x for all other variables. We now show that λθ|X0EXθ. If xX0Dom(θ), then λ(θ|X0(x))=λ(θ(x))=θ(x). The first identity holds by the definition of θ|X0 and the second since the variables occurring in θ(x) are elements of VRan(θ), and thus do not belong to X. If xX0Dom(θ), then λ(θ|X0(x))=λ(x)=x=θ(x). Finally, if xXX0, then λ(θ|X0(x))=λ(x)=θ(x). Again, the first identity holds by the definition of θ|X0 and the second by the definition of λ. Summing up, we have shown that the following holds for every element θ of 𝒮: θ|X0 is an E-unifier of Γ and θ|X0EXθ. Since 𝒮 is a minimal complete set of E-unifiers of Γ w.r.t. EX, its elements are minimal w.r.t. EX, which yields θ|X0EXθ. Consequently, we know that the set 𝒮|X0:={θ|X0θ𝒮} is also a minimal complete set of E-unifiers of Γ w.r.t. EX.

We claim that the same is true w.r.t. the smaller set of variables X0, i.e., that 𝒮|X0 is also minimal and complete w.r.t. EX0. Completeness trivially follows from the fact that EXEX0. To prove minimality, assume that θ and τ are two distinct elements of 𝒮|X0. Then these two substitutions are not comparable w.r.t. EX. Assume that they are comparable w.r.t. EX0, i.e., there is a substitution λ such that λ(θ(x))Eτ(x) holds for all xX0. By our construction of 𝒮|X0, we know that Dom(θ)X0, Dom(τ)X0, and VRan(θ)X=. If x is a variable in XX0, then λ(θ(x))=λ(x) and τ(x)=x. Thus, if we modify λ to λ such that λ(x)=x holds for all xXX0, then λ(θ(x))=τ(x) holds for all xXX0. This modification has no effect on the variables xX0. In fact, let x be such a variable. If xDom(θ), then θ(x) does not contain any variable from X, and thus λ(θ(x))=λ(θ(x))Eτ(x) holds. If xDom(θ), then θ(x)=x, and thus again λ(θ(x))=λ(x)=λ(x)=λ(θ(x))Eτ(x) since λ coincides with λ on the variables in X0. Summing up, we have shown that the assumption θEX0τ implies θEXτ, which contradicts the fact that 𝒮|X0 is minimal w.r.t. EX. Consequently, 𝒮|X0 is a minimal complete set w.r.t. EX0, and this set has the same cardinality as the minimal complete set 𝒮 of E-unifiers of Γ w.r.t. EX we have started with.

Conversely, let 𝒮 be a minimal complete set of E-unifiers of Γ w.r.t. EX0. By applying the same construction as in the proof of the other direction, we can assume without loss of generality that every unifier θ𝒮 satisfies Dom(θ)X0 and VRan(θ)X=. In fact, by applying this construction to a minimal complete set 𝒮 of E-unifiers of Γ w.r.t. EX0, we obtain a new set 𝒮 where every element θ of the original set 𝒮 is replaced with an element θ that satisfies the above conditions and is EX-equivalent to θ, and thus also EX0-equivalent. Consequently, this new set 𝒮 is also a minimal complete set of E-unifiers of Γ w.r.t. EX0.

We claim that 𝒮 is also minimal and complete w.r.t. the larger set of variables X. Minimality trivially follows from the fact that EXEX0. To prove completeness, assumed that τ is an E-unifier of Γ. Completeness of 𝒮 w.r.t. EX0 yields an element θ of 𝒮 such that θEX0τ, i.e., there is a substitution λ such that λθ(x)Eτ(x) holds for all xX0. Let x be a variable in XX0. Then λθ(x)=λ(x). Thus, if we modify λ to λ such that λ(x)=τ(x) holds for all xXX0, then λ(θ(x))=τ(x) holds for all xXX0. The claim that this modification has no effect for the variables xX0 can be shown as in the proof of minimality of 𝒮|X0 w.r.t. EX0 above. This proves that λθ(x)Eτ(x) holds for all xX, and thus 𝒮 is also complete w.r.t. EX.

The following theorem is an immediate consequence of this lemma.

Theorem 6.

Let E be an equational theory, Γ an E-unification problem, and XV a set of variables such that Var(Γ)X and VX is infinite. Then the restricted unification type of Γ coincides with the unification type of Γ w.r.t. EX.

Note that the condition of the theorem is in particular satisfied if X is a finite superset of Var(Γ). However, it is clearly not satisfied for X=V, which corresponds to the unrestricted instantiation preorder setting. We will see below that in this case the unification type can indeed depend on whether the restricted or the unrestricted instantiation preorder is used. However, there is a special case where this cannot happen.

Theorem 7.

Let E be an equational theory, Γ an E-unification problem, and 𝒮 a set of E-unifiers of Γ such that VRan(σ)Dom(σ)Var(Γ) holds for all σ𝒮. Then 𝒮 is a minimal complete set of E-unifiers of Γ w.r.t. EV iff it is a minimal complete set of E-unifiers of Γ w.r.t. EVar(Γ).

Proof.

Let 𝒮 be a minimal complete set of E-unifiers of Γ w.r.t. EV. Since EVEVar(Γ), this set is also complete w.r.t. EVar(Γ). To show minimality w.r.t. EVar(Γ), assume to the contrary that σ,θ are two distinct elements of 𝒮 such that σEVar(Γ)θ, i.e., there is a substitution λ such that λσ(x)Eθ(x) holds for all xVar(Γ). We modify λ to λ by setting λ(x)=x for all variables xVVar(Γ). For xVar(Γ), we know that σ(x) contains only variables from VRan(σ)Var(Γ) if xDom(σ) or σ(x)=xVar(Γ). Since λ and λ coincide on Var(Γ), this yields λσ(x)=λσ(x)Eθ(x). For xVVar(Γ), this variable does not belong to any of the sets Dom(σ), Dom(θ), and Dom(λ), and thus λσ(x)=λ(x)=x=θ(x). Summing up, we have shown that σEVθ, which contradicts our assumption that 𝒮 is minimal w.r.t. EV.

Conversely, assume that 𝒮 is a minimal complete set of E-unifiers of Γ w.r.t. EVar(Γ). Since EVEVar(Γ), minimality also holds w.r.t. EV. To show completeness w.r.t. EV, assume that θ is an E-unifier of Γ. Completeness of 𝒮 w.r.t. EVar(Γ) yields a substitution σ𝒮 such that σEVar(Γ)θ. Similarly to the first part of the proof, we can show that this also implies σEVθ. The difference is that now θ is an arbitrary unifier, and thus VRan(θ)Dom(θ)Var(Γ) need not hold. Let λ be such that λσ(x)Eθ(x) holds for all xVar(Γ). We modify λ to λ by setting λ(x)=θ(x) for all variables xVVar(Γ). For xVar(Γ), we obtain λσ(x)=λσ(x)Eθ(x) as in the first part of the proof. For xVVar(Γ), this variable does not belong to Dom(σ), and thus λσ(x)=λ(x)=θ(x).

Examples of equational theories where the conditions of this theorem are always satisfied are the empty theory (unitary), the theory 𝖢 axiomatizing commutativity of a binary function symbol (finitary), and the theory 𝖠 axiomatizing associativity of a binary function symbol (infinitary). This is an easy consequence of the known algorithms [42, 50, 45] computing (or enumerating, in the case of 𝖠) minimal complete sets of unifiers for these theories.

The following result is an easy consequence of the fact that EVEVar(Γ).

Theorem 8.

Let E be an equational theory. If E has unrestricted unification type unitary (finitary), then it has restricted unification type unitary (finitary or unitary).

Proof.

A given finite minimal complete set 𝒮 of E-unifiers of Γ w.r.t. EV is also complete w.r.t. EVar(Γ). If it is not minimal (which can only happen in the finitary case), then one can make it minimal by removing redundant element (i.e., elements θ such that 𝒮 contains an element σ<EVar(Γ)θ) without destroying completeness.

3 The unification type of 𝓔𝓛

Unification was introduced in description logics as a tool for detecting redundancies in large knowledge bases [14]. The description logic  [6] has drawn considerable attention since its standard reasoning problems can be solved in polynomial time while the logic is still expressive enough for formalizing bio-medical ontologies [11]. In [12, 13] it was shown that, in the setting of unification with constants, has unification type zero w.r.t. the restricted instantiation preorder. In the following, we will analyze the example used in [13] to prove this result in more detail, and explain why it does not work for the unrestricted instantiation preorder. Then we show that the unification type of in the unrestricted setting is actually infinitary, not just for this example, but in general.

But first, we briefly introduce and recall why unification in can be seen as unification modulo an equational theory (see [6, 13, 15] for more detailed descriptions). Given sets of concept names (unary predicates) and role names (binary predicates), concept descriptions (or simply concepts) are built from concept names using the concept constructors top concept (), conjunction (CD), and existential restriction (r.C). In the model-theoretic semantics of , a given interpretation assigns sets C to concept descriptions C according to the semantics of the constructors. To be more precise, an interpretation =(Δ,) consists of a non-empty interpretation domain and an extension function that assigns subsets of this domain to concept names and binary relations on the domain to role names. This interpretation function is extended to concept descriptions as follows:

:=Δ,(CD):=CD,(r.C):={dΔeCsuch that(d,e)r}.

The concept description C is subsumed by the concept description D (written CD) if CD holds for all interpretations , and C and D are equivalent (written CD) if they subsume each other.

In [13], the notion of a reduced concept is employed to derive characterizations of equivalence and subsumption of concepts. Here, we recall this notion and the characterizations since they are used later on to explain why has unification type zero w.r.t. the restricted instantiation preorder. Küsters [39] introduces the following rules for reducing concept descriptions:

CCfor all  concept descriptions C,AAAfor all concept names A,r.Cr.Dr.Cfor all  concept descriptions C,D with CD.

A reduced form of a given concept description C is then obtained from C by applying these rules exhaustively modulo associativity and commutativity of . The following theorem is stated in [13] as an easy consequence of Corollary 6.3.1 on page 181 of [39].

Theorem 9 (Theorem 3.1 of [13]).

Let C,D be concept descriptions, and C^,D^ reduced forms of C,D, respectively. Then CD iff C^ is identical to D^ up to associativity and commutativity of .

This theorem is used in [13] to derive a recursive characterization of subsumption in .

Corollary 10 (Corollary 3.2 of [13]).

Let C=A1Akr1.C1rm.Cm and D=B1Bs1.D1sn.Dn, where A1,,Ak,B1,,B are concept names. Then CD iff {B1,,B}{A1,,Ak} and for every j,1jn, there exists an i,1im, such that ri=sj and CiDj.

From this corollary, the following lemma is then derived in [13].

Lemma 11 (Lemma 3.3 of [13]).

If C,D are reduced concept descriptions such that r.DC, then C is either , or of the form C=r.C1r.Cn where n1; C1,,Cn are reduced and pairwise incomparable w.r.t. subsumption; and DC1,,DCn. Conversely, if C,D are concept descriptions such that C=r.C1r.Cn and DC1,,DCn, then r.DC.

Equivalence of concept descriptions can be axiomatized by the equational theory 𝖻𝖲𝖫𝗆𝖮 of bounded semilattices with monotone operators [54, 15, 55]. For this purpose, we view the conjunction operator as a binary function symbol, as a constant symbol, and r. for a role name r as a unary function symbol. The theory 𝖻𝖲𝖫𝗆𝖮 over this signature then consists of the identities stating that is associative, commutative, and idempotent, has as unit, and existential restrictions as monotone operators:

xyyx,(xy)zx(yz),xxx,xx,r.xr.(xy)r.(xy).

For unification in we partition the set of concept names into concept variables and concept constants. Substitutions can then replace concept variables in concept descriptions with concept descriptions. Unifiers are supposed to solve equations between concept descriptions with variables by making them equivalent. This corresponds to unification with constants modulo the equational theory 𝖻𝖲𝖫𝗆𝖮. In the following, we use (rather than 𝖻𝖲𝖫𝗆𝖮) to denote equivalence between concept descriptions and also employ the subscript when writing the respective instantiation preorders.

Example 12.

Consider the -unification problem Γ:={xr.y?r.y}. Then, for every n0, the substitution

σn:={xr.z1r.zn,yz1znz}

for distinct variables x,y,z1,,zn,z is an -unifier of Γ, where the empty conjunction is , i.e., σ0={x,yz}. We will show below that, w.r.t. the restricted instantiation preorder, the set {σnn0} is a complete set of -unifiers that constitutes a strictly decreasing chain σ0>{x,y}σ1>{x,y}σ2>{x,y} of more and more general unifiers. According to Lemma 4 this implies that Γ has unification type zero, and thus has unification type zero.

Lemma 13.

Let Γ and σn for n0 be defined as in Example 12. Then the set {σnn0} is a complete set of -unifiers of Γ w.r.t. {x,y}.

Proof.

Let σ be an -unifier of Γ and C:=σ(y) and D:=σ(x). Then r.CD. In addition, we can assume without loss of generality that C and D are reduced. The characterization of subsumption in (see Corollary 10) yields D=r.D1r.Dn for n0 concept descriptions D1,,Dn satisfying CD1,,CDn (see Lemma 11). Thus, if we define λ:={z1D1,,znDn,zC}, then λσn{x,y}σ, which shows σn{x,y}σ.

Lemma 14.

If σn for n0 are defined as in Example 12, then σ0>{x,y}σ1>{x,y}σ2>{x,y}.

Proof.

First note that σn+1{x,y}σn since λσn+1{x,y}σn for λ:={zn+1}. Second, assume that σn{x,y}σn+1, i.e., there is a substitution τ such that τσn{x,y}σn+1. Then r.τ(z1)r.τ(zn)r.z1r.zn+1. Consequently, by Theorem 9, the reduced forms of these two concept descriptions would need to be equal up to associativity and commutativity of . However, the reduced form of the concept description on the left-hand side has at most n existential restrictions, whereas the reduced form of the concept description on the right-hand side has n+1 existential restrictions, which yields a contradiction. Thus, we have shown σn+1<{x,y}σn.

The following theorem is now an immediate consequence of Lemma 4.

Theorem 15.

The restricted unification type of is zero.

With respect to the unrestricted instantiation preorder, the instance relationship between the substitutions σn and σn+1 no longer holds. More generally, we can show the following result.

Lemma 16.

If σn for n0 are defined as in Example 12, then σnVσm for all distinct n,m0.

Proof.

Let n<m. Then we know from Lemma 14 that σn{x,y}σm, which implies σnVσm since V{x,y}.

Assume that n>m and that there is a substitution λ such that λσnσm. Then λσn(x)σm(x), and since σm(x) does not contain zn, but σn(x) does, λ must replace zn by a concept description not containing zn, and thus in particular λ(zn)zn. But then λσn(zn)=λ(zn)zn and σm(zn)=zn yield a contradiction to λσnσm.

Thus, w.r.t. the unrestricted instantiation preorder, the set {σnn0} consists of unifiers that are incomparable. However, this set is also no longer complete.

Lemma 17.

Let Γ and σn for n0 be defined as in Example 12. The -unifier σ:={xr.A,yA} of Γ is not an instance of any of the substitutions σn for n0 if we use the unrestricted instantiation preorder.

Proof.

First, note that σ0Vσ is not possible since σ0(x)=, and thus λσ0(x)= holds for all substitutions λ, whereas σ(x)=r.A. If n1 and λσnσ, then λ must replace all variables zi occurring in σn(x) with A, and thus λσn(zi)=λ(zi)A. However, σ(zi)=zi, which yields a contradiction to λσnσ.

Summing up, we have seen that the -unification problem Γ of Example 12 has unification type zero for the restricted instantiation preorder, but the proof that we have used to show this result does not work if we employ the unrestricted instantiation preorder instead.

In the following, we prove the general result that the unrestricted unification type of is not zero. Note that, by Theorem 8, this type cannot be unitary or finitary, and thus must be infinitary. The main idea underlying our proof of this result is to show that, up to the equivalence relation V, every substitution has only finitely many more general substitutions w.r.t. V. The most challenging technical result needed to prove this is the following lemma.

Lemma 18.

Let σ,θ be substitutions such that σVθ. Then there is a substitution σ such that σVσ and Dom(σ)Dom(θ).

Proof.

First note that we can assume without loss of generality that VRan(σ)Dom(θ)=. Otherwise, we can apply a permutation to σ that renames the variables in VRan(σ) appropriately, which yields a substitution that is V-equivalent to σ and satisfies the required disjointness condition (see the proof of Lemma 5 for how such a permutation can be obtained).

Since σVθ, we know that there is a substitution λ such that λσθ. Consider the set 𝒳 of all variables x such that xDom(σ)Dom(θ). Then λσ(x)θ(x)=x holds for all x𝒳. Consequently, the top-level conjunction of σ(x) cannot contain concept constants (i.e., constants) or existential restrictions (i.e., terms starting with a function application). This means that σ(x) is a conjunction of variables:

σ(x)=z1xznxx,

where we assume (without loss of generality) that all the variables zix for a fixed x are pairwise distinct. To obtain λσ(x)x, the substitution λ must thus assign (modulo ) x or to the variables zix for all i,1inx, and x to at least one of these variables. Let us assume without loss of generality that λ assigns x to z1x for all x𝒳. This implies that z1xz1y for different elements x,y of 𝒳.

Since VRan(σ)Dom(θ)=, we know that zixDom(θ) for all x𝒳 and 1inx. We claim that zixDom(σ) also holds, and thus zix𝒳. Otherwise, λσ(zix)=λ(zix){x,}. However, λσ(zix)θ(zix)=zix. This yields a contradiction unless zix=x. But then we also have zixDom(σ) since xDom(σ). We have thus shown that all the variables zix for x𝒳 also belong to 𝒳=Dom(σ)Dom(θ). Since z1xz1y for different elements x,y of 𝒳, this implies that the z-variables with index 1 already “use up” all of 𝒳, and thus nx=1 holds for all x𝒳.

Consequently, σ is a W-renaming for W=Dom(σ)Dom(θ), where according to Definition 2.11 in [28] a substitution τ is a W-renaming if τ(x) is a variable for all xW and τ is injective on W. Since σ is the identity on VDom(σ) and elements of Dom(σ)Dom(θ) are mapped to Dom(σ)Dom(θ) by σ, the substitution σ is also a W-renaming for W=VDom(θ). By Lemma 2.12 in [28], there is a permutation π that coincides with σ on W=VDom(θ). Let σ:=π1σ. Then σVσ, and thus also σVσ. In addition, for all xDom(θ) we have σ(x)=π1σ(x)=x, which yields xDom(σ). This shows that Dom(σ)Dom(θ).

This lemma together with the next result shows that, up to equivalence, we can bound the variables occurring in more general substitutions by the substitutions they have as instance.

Lemma 19.

Let σ,θ be substitutions such that σVθ and Dom(σ)Dom(θ). Then VRan(σ)Dom(θ)VRan(θ).

Proof.

Let λ be such that λσθ. Assume that zVRan(σ), but zDom(θ)VRan(θ). Then zDom(σ), and thus λ(z)=λσ(z)θ(z)=z. However, since zVRan(σ), there is a variable xDom(σ) such that σ(x) contains z. Then xDom(θ), and thus all variables occurring in θ(x) belong to VRan(θ). Since λσ(x)θ(x), this means that zVRan(θ), which contradicts our assumptions on z.

The following lemma bounds the role depth (i.e., the maximal nesting of existential restrictions) as well as the concept constants and role names occurring in more general substitutions. Formally, the role depth rd(C) of an concept description C is defined inductively as follows:

  • rd(A):=rd():=0 for all concept names A,

  • rd(CD):=max{rd(C),rd(D)} and rd(r.C):=1+rd(C).

Lemma 20.

Let σ,θ be substitutions such that σVθ. Then the following holds for all xV: the role depth of σ(x) is bounded by the role depth of θ(x), and the concept constants and role names occurring in σ(x) also occur in θ(x).

Proof.

This is an easy consequence of the fact that preserves the role depth as well as the set of concept constants and role names occurring in a concept description, and applying a substitution to a concept description can only increase the role depth and add concept constants or role names, but not decrease the role depth or remove concept or role names.

As a consequence of the sequence of lemmas we have just shown we know that, for a given substitution θ, the set of more general substitutions is finite up to the equivalence relation V. In fact, Lemmas 18 and 19 show that one can restrict the attention to substitutions σ satisfying Dom(σ)VRan(σ)Dom(θ)VRan(θ). In addition, for all xDom(σ), the concept descriptions σ(x) are built using role names and concept constants occurring in θ(x) as well as variables from Dom(θ)VRan(θ), and have a role depth that is bounded by the one of θ(x). It is well-known [13] that there are up to equivalence only finitely many -concept descriptions satisfying these properties.

Lemma 21.

For a given substitution θ, the set {σσVθ} is finite up to V-equivalence.

As an immediate consequence we obtain that the set of substitutions more general than θ contains elements that are minimal w.r.t. V. This obviously shows that the unrestricted unification type of cannot be zero. Since the restricted unification type is zero, the unrestricted type cannot be unitary or finitary by Theorem 8.

Theorem 22.

The unrestricted unification type of is infinitary.

4 The unrestricted unification types of ACUI, ACU, and AC

We consider a signature consisting of a binary function symbol f and a constant symbol 0. The theory 𝖠𝖢𝖴 consists of identities stating that f is associative and commutative and that 0 is a unit for f. The theory 𝖠𝖢𝖴𝖨 additionally states that f is idempotent. The theory 𝖠𝖢 is obtained from 𝖠𝖢𝖴 by removing the unit 0 from the signature and the identity involving it from the axiomatization. For elementary unification (where unification problems may only contain f, 0, and variables), 𝖠𝖢𝖴 and 𝖠𝖢𝖴𝖨 are unitary w.r.t. the restricted instantiation preorder, whereas 𝖠𝖢 is finitary [19]. In the following, we show that all three theories are infinitary w.r.t. the unrestricted instantiation preorder. These results extend the one from [10] in two directions. First, [10] considers only 𝖠𝖢𝖴𝖨, whereas here we also investigate 𝖠𝖢𝖴 and 𝖠𝖢. Second, [10] provides only the lower bound “at least infinitary” for 𝖠𝖢𝖴𝖨, whereas here we determine the exact unification type (infinitary) for the three theories.

We start with proving that the unrestricted unification type of 𝖠𝖢, 𝖠𝖢𝖴, and 𝖠𝖢𝖴𝖨 is at least infinitary. In contrast to , where we were able to use Theorem 8 to deduce that it is not unitary or finitary w.r.t. the unrestricted instantiation preorder from the fact that it is of type zero for the restricted instantiation preorder, we must prove this directly for 𝖠𝖢𝖴𝖨, 𝖠𝖢𝖴, and 𝖠𝖢. Actually, following [10], we show a more general result that holds for regular theories satisfying certain additional restrictions.

Recall that a set of identities E is regular if Var(s)=Var(t) holds for all identities st in E. Regularity of the defining set of identities of an equational theory implies regularity of the whole theory, i.e., if E is a regular set of identities, then Var(s)=Var(t) holds for all terms s,t satisfying sEt [58]. The identities of 𝖠𝖢, 𝖠𝖢𝖴, and 𝖠𝖢𝖴𝖨 are regular, and thus the following result from [10] applies to them.

Lemma 23 ([10]).

Let E be a regular theory and Γ={sE?t} an E-unification problem s.t. Var(s)Var(t)=. Then the set 𝒞E(Γ) consisting of all E-unifiers σ of Γ satisfying

yVRan(σ).x,xV s.t. xx and yVar(σ(x))Var(σ(x))

is complete w.r.t. EV.

Together with Theorem 3, this lemma yields the following result.

Lemma 24.

Let E be a regular theory and Γ={sE?t} an E-unification problem s.t. Var(s)Var(t)=. If Γ has a minimal complete set of E-unifiers w.r.t. EV, then it has one that is contained in 𝒞E(Γ).

Proof.

Since Γ has a minimal complete set of E-unifiers, the set M of minimal elements of [𝒰E(Γ)]EV is complete. For 𝒞E(Γ) to be complete, it must contain for every equivalence class in M at least one representative. Thus, by selecting for each class in M one of its representatives in 𝒞E(Γ), we obtain a minimal complete set that is contained in 𝒞E(Γ).

We are now ready to formulate the “additional restrictions” mentioned above.

Definition 25.

Given a regular equational theory E, we say that the E-unification problem Γ is NUOF if the following conditions are satisfied:

  • Γ={sE?t} for terms s,t satisfying Var(s)Var(t)=,

  • there is a EV-minimal unifier σ of Γ that uses fresh variables, i.e., VRan(σ)X where X=Var(s)Var(t), and

  • this unifier σ belongs to the set 𝒞E(Γ) defined in the formulation of Lemma 23.

Intuitively, NUOF stands for “not unitary or finitary,” but we still need to show that this name is justified. Given a NUOF E-unification problem Γ, let x0VRan(σ)X and consider the following construction of substitutions:

σz:=στx0,zwhere zV and τx0,z:={x0z,zx0}.

One can show that, under certain conditions on z, such substitutions σz are EV-minimal unifiers that are incomparable to each other w.r.t. EV. By Theorem 3, this implies that Γ cannot have a finite minimal complete set of unifiers w.r.t. EV since there are infinitely many variables z satisfying these conditions.

Lemma 26 ([10]).

Let E be a regular equational theory E, Γ a NUOF E-unification problem, and X and σz for zV be defined as above.

  • For each zVX, σz is a minimal E-unifier of Γ w.r.t. EV.

  • For any two distinct variables z,zV(Dom(σ)VRan(σ)), σz and σz are incomparable w.r.t. EV.

Since V(XDom(σ)VRan(σ)) is infinite, this lemma together with Theorem 3 implies that Γ cannot have a finite minimal complete set w.r.t. EV.

Theorem 27.

If E is a regular equational theory and Γ a NUOF E-unification problem, then Γ does not have a finite minimal complete set of E-unifiers w.r.t. the unrestricted instantiation preorder EV.

We are now ready to apply this result to 𝖠𝖢𝖴𝖨.

Corollary 28 ([10]).

The unrestricted unification type of 𝖠𝖢𝖴𝖨 for elementary unification is at least infinitary.

Proof.

Since 𝖠𝖢𝖴𝖨 is regular, it is sufficient to show that there is an 𝖠𝖢𝖴𝖨-unification problem Γ that is NUOF. According to Corollary 3.6 in [7], any most general unifier (w.r.t. restricted instantiation) of the 𝖠𝖢𝖴𝖨-unification problem Γ={f(x,f(y,z))𝖠𝖢𝖴𝖨?f(u,v)} must use a fresh variable. Let θ be such an mgu.

If Γ does not have a minimal complete set of 𝖠𝖢𝖴𝖨-unifiers w.r.t. unrestricted instantiation, then we are done. Thus, assume that Γ has a minimal complete set 𝒮 w.r.t. unrestricted instantiation. By Lemma 24, we can assume without loss of generality that 𝒮𝒞E(Γ), and by Theorem 3 we know that the elements of 𝒮 are 𝖠𝖢𝖴𝖨V-minimal. Since θ is an 𝖠𝖢𝖴𝖨-unifier of Γ, there is a σ𝒮 such that σ𝖠𝖢𝖴𝖨Vθ. Since 𝖠𝖢𝖴𝖨V𝖠𝖢𝖴𝖨Var(Γ), this implies that σ is also an mgu of Γ w.r.t. the restricted instantiation preorder, and thus it introduces a fresh variable.

Consequently, we have shown that Γ is NUOF, and thus Theorem 27 is applicable, which proves the corollary.

It remains to show that type zero is not possible for 𝖠𝖢𝖴𝖨. This is actually an easy consequence of the results for we have shown in the previous section. In fact, for elementary unification in 𝖠𝖢𝖴𝖨, we consider a term set that is a subset of the one for if we use the conjunction operator of as f and the top concept of as unit 0. On such terms (which we will call 𝖠𝖢𝖴𝖨-terms in the following), the equational theories and 𝖠𝖢𝖴𝖨 coincide. If we consider substitutions σ,θ using only 𝖠𝖢𝖴𝖨-terms, then σ𝖠𝖢𝖴𝖨Vθ clearly implies σVθ. To show the other direction, assume that λσθ, but there is a variable z such that λ(z) is not an 𝖠𝖢𝖴𝖨 term, i.e., contains a concept constant or an existential restriction. If zDom(σ) or zVRan(σ), then this leads to a contradiction. Otherwise, we can modify λ to λ by setting λ(z)=z and still have λσθ. This shows that we can assume without loss of generality that λ uses only 𝖠𝖢𝖴𝖨-terms, which completes the proof that σVθ implies σ𝖠𝖢𝖴𝖨Vθ. Thus, Lemma 21 entails that the set {σσ𝖠𝖢𝖴𝖨Vθ} is finite up to V-equivalence, and thus also up to 𝖠𝖢𝖴𝖨V-equivalence.

Theorem 29.

The unrestricted unification type of 𝖠𝖢𝖴𝖨 for elementary unification is infinitary.

Theorem 27 also applies to elementary unification in 𝖠𝖢𝖴. It is well-known (see, e.g., Section 10.3 in [16]) that a given elementary 𝖠𝖢𝖴-unification problem Γ can be translated into a system of homogeneous linear diophantine equations. W.r.t. the restricted instantiation preorder, the mgu of the problem Γ can then be obtained from the minimal generating set of the solutions of this system, also called its Hilbert base, where the number of variables used in the range of this mgu corresponds to the cardinality of the Hilbert base of the system. As pointed out in Example 2 of [40], the cardinality of the Hilbert base for equations of the form ny=x1+2x2+nxn grows at least exponentially in n, and thus there are clearly instances where the mgu of the corresponding 𝖠𝖢𝖴-unification problem needs more than n+1 variables. Given this, one can now proceed as in the case of 𝖠𝖢𝖴𝖨 to show that Theorem 27 applies.

Corollary 30.

The unrestricted unification type of 𝖠𝖢𝖴 for elementary unification is at least infinitary.

Proving that type infinitary is also the upper bound in these cases turns out to be more involved than for 𝖠𝖢𝖴𝖨. In fact, our proof of the finiteness result used for and then adapted to 𝖠𝖢𝖴𝖨 depends on idempotency, and thus does not apply to 𝖠𝖢𝖴. Instead, we show that a set of the form {σσ𝖠𝖢𝖴Vθ} for a given unifier θ cannot contain an infinite decreasing chain w.r.t. >𝖠𝖢𝖴V, and thus θ must be above a minimal unifier. Our proof of this result in Appendix A uses the fact that analogues of Lemmas 18 and 19 also hold for 𝖠𝖢𝖴, but requires quite some additional effort to prove the non-existence of infinite decreasing chains.

Theorem 31.

The unrestricted unification type of 𝖠𝖢𝖴 for elementary unification is infinitary.

The theory 𝖠𝖢, which is obtained from 𝖠𝖢𝖴 by removing the unit 0 from the signature and the identity containing it from the axiomatization, is finitary w.r.t. the restricted instantiation preorder. Proving that the unrestricted unification type of 𝖠𝖢 is infinitary turns out to be easier than for 𝖠𝖢𝖴.

Showing that the unrestricted unification type of 𝖠𝖢 cannot be unitary or finitary is very similar to our proofs for 𝖠𝖢𝖴𝖨 and 𝖠𝖢𝖴. In contrast to 𝖠𝖢𝖴, the theory 𝖠𝖢 is finitary rather than unitary in the restricted setting. A minimal complete set of unifiers is obtained by taking appropriate subsets of the Hilbert base and turning them into unifiers that have a variable in the range for each element of the subset (see, e.g., [16, 32]). Since the full Hilbert base is an appropriate subset, the minimal complete set of 𝖠𝖢-unifiers for the unification problem Γn corresponding to the linear diophantine equation ny=x1+2x2+nxn for a large enough natural number n must contain a unifier θ that introduces a fresh variable. As in the case of 𝖠𝖢𝖴𝖨 we can now show that, under the assumption that Γ has a minimal complete set 𝒮 of 𝖠𝖢-unifiers w.r.t. the unrestricted instantiation preorder, this set 𝒮 contains a 𝖠𝖢V-minimal 𝖠𝖢-unifier σ satisfying σ𝖠𝖢Vθ, and thus also σ𝖠𝖢Var(Γn)θ. Since θ contains a variable in the range for each element of the Hilbert base and elements of the Hilbert base cannot be generated by a sum of other vectors, this implies that σ must also contain at least as many variables in its range as θ. Consequently, we have shown that Γn is NUOF, and thus Theorem 27 is applicable.

Corollary 32.

The unrestricted unification type of 𝖠𝖢 for elementary unification is at least infinitary.

To prove that the unrestricted unification type of 𝖠𝖢 cannot be zero, we employ the same approach as for unification in . First note that Lemmas 18 and 19 also hold if we replace with 𝖠𝖢. The main difference is that the crucial argument in the proof of Lemma 18 becomes simpler. There, we consider a setting where λσ(x)θ(x)=x holds for all variables x𝒳, and conclude that then σ(x)=z1xznxx for some variables z1x,,znxx. Thus is trivially the case for 𝖠𝖢 if we replace with 𝖠𝖢 and the binary conjunction operator of with the 𝖠𝖢 function symbol f. Then it is proved (by a somewhat involved counting argument) that nx=1 for all x𝒳 and z1xz1y for distinct elements x,y𝒳. For 𝖠𝖢, this is again trivially the case since there is no idempotency and the unit 0 (corresponding to in ) is not available. The rest of the proof of Lemma 18 and the proof of Lemma 19 then work as in the case of . Lemma 20 can be replaced by the following result.

Lemma 33.

Let σ,θ be substitutions such that σ𝖠𝖢Vθ. Then the following holds for all xV: if σ(x) and θ(x) respectively contain m and n occurrences of (not necessarily distinct) variables, then mn.

Proof.

Since we consider elementary unification in 𝖠𝖢, all terms are built using the 𝖠𝖢 symbol f and variables. If λσ(x)𝖠𝖢θ(x), then every occurrence of a variable in σ(x) is replaced by a term containing one or more variables. Consequently, λσ(x) is a term containing occurrences of at least as many variables as σ(x). Since the theory cannot change the number of variable occurrences, but only rearrange parentheses and reorder variables, the same is true for θ(x).

Together with the 𝖠𝖢 analogues of Lemmas 18 and 19, this lemma yields an 𝖠𝖢 analogue of Lemma 21, and thus the following theorem.

Theorem 34.

The unrestricted unification type of 𝖠𝖢 for elementary unification is infinitary.

Note that, due to the availability of the unit 0, an 𝖠𝖢𝖴-analogue of Lemma 33 does not hold. This is why we need the more involved argument in Appendix A.

5 Conclusion

In this paper, we have investigated the effect that the employed instantiation preorder has on the unification type of an equational theory. As a rule of thumb, one can extract from this investigation that nothing changes if unifiers in a minimal complete set w.r.t. the restricted instantiation preorder do not need fresh variables (Theorem 7), whereas the unification type switches from unitary or finitary to at least infinitary otherwise (Theorem 27), though the latter result was only shown for regular theories. We have employed Theorem 27 to prove that the unification type of the frequently used theories 𝖠𝖢𝖴𝖨, 𝖠𝖢𝖴, and 𝖠𝖢 is at least infinitary w.r.t. the unrestricted instantiation preorder (Corollaries 28, 30, and 32), and were also able to show the matching upper bound, i.e., that these three theories are indeed infinitary rather than of type zero (Theorems 29, 31, and 34). We have clarified that the reason for such changes is not that the unrestricted instantiation preorder considers infinitely many variables, but that it does not leave infinitely many variables unobserved (Theorem 6). In particular, this shows that nothing changes compared to the restricted setting if one compares unifiers on finite supersets of the set of variables occurring in the unification problem instead. Rather surprisingly, we have found an example (unification in the description logic ) where the unification type improves from type zero to infinitary when going from the restricted to the unrestricted instantiation preorder (Theorem 22).

While the contributions of this work are primarily foundational, one can nevertheless ask whether the obtained results also have a practical impact. The answer to the question which instantiation preorder should be used in practice mainly depends on the application that employs unification, i.e., which variables are relevant in the overall procedure and for which of them need the instantiation relation between the unifiers hold. In case the restricted unification type is unitary/finitary, the restricted instantiation preorder should be used unless the application enforces comparison on all variables. For example, in Knuth-Bendix completion modulo equational theories [44, 37, 20], where unification is employed to test confluence by computing critical pairs, the restricted instantiation preorder is clearly sufficient, and thus should be used for theories that are unitary or finitary w.r.t. it. In case the restricted unification type is zero and the unrestricted one is infinitary, it may be useful to employ unrestricted unification if one can find a unification algorithm that enumerates a minimal complete set of unifiers w.r.t. the unrestricted preorder. From the restricted preorder point of view, such an algorithm would enumerate a complete set of unifiers that is non-minimal, but usually still much smaller than the set of all unifiers. With few exceptions, where the restricted and the unrestricted types coincide according to our Theorem 7 (e.g., the empty theory, commutativity 𝖢, or associativity 𝖠) there are no unification algorithms known for the unrestricted case since research on equational unification concentrated on the restricted case. For the cases where the unrestricted type is better (i.e., infinitary), it is thus a new challenge to find an algorithm enumerating a minimal complete set of unifiers. Our proof of type infinitary for does not directly yield a practical algorithm.

Regarding future foundational work, it is probably not very interesting to find further equational theories where the phenomena already exhibited in this paper also occur, unless one can prove a meta-theorem that exactly characterizes under what conditions these changes in the unification type happen for a given class of equational theories. A candidate class for such a meta-result are commutative/monoidal theories [17]: 𝖠𝖢𝖴𝖨 and 𝖠𝖢𝖴 belong to this class and 𝖠𝖢 is obtained from an element of this class by removing the unit, but the equational theory corresponding to does not belong to it. A description logic of restricted unification type zero whose equational theory is commutative/monoidal is the DL 0 [14, 5], but its unrestricted unification type is unknown. On the level of single equational theories, some interesting questions still remain. Are there actually equational theories of unification type zero w.r.t. the unrestricted instantiation preorder? If the answer is yes, which restricted unification types can such theories have? For instance, the theory 𝖠𝖨 of an associative and idempotent binary function symbol has restricted unification type zero [2, 48], but its unrestricted type is still unclear, and thus might be also zero. From the order-theoretic point of view, which only takes into account that the unrestricted preorder is a subset of the restricted one, it is also conceivable that there might be theories whose restricted type is infinitary whereas the unrestricted type is zero. But finding an example of an equational theory where this happens may be hindered by the fact that only very few natural theories of restricted unification type infinitary are known. The overview article [19] mentions only two: associativity (𝖠) and both-sided distributivity (𝖣). Now, 𝖠 is not a candidate since our Theorem 7 implies that its unrestricted type is also infinitary. The theory 𝖣 might be a candidate, but unification in it is rather complicated, though it is decidable [49].

Regarding related work, let us point out that recently there has also been other work on the impact that changing the preorder on substitutions has on the unification type [23, 24, 9, 33, 57], but the preorders investigated there differ from the (un)restricted instantiation preorder.

References

  • [1] Majid Alizadeh, Mohammad Ardeshir, Philippe Balbiani, and Mojtaba Mojtahedi. Unification types in Euclidean modal logics. Log. J. IGPL, 31(3):422–440, 2023. doi:10.1093/JIGPAL/JZAB036.
  • [2] Franz Baader. The theory of idempotent semigroups is of unification type zero. J. Autom. Reason., 2(3):283–286, 1986. doi:10.1007/BF02328451.
  • [3] Franz Baader. Characterization of unification type zero. In Nachum Dershowitz, editor, Rewriting Techniques and Applications, 3rd International Conference, RTA-89, Proceedings, volume 355 of Lecture Notes in Computer Science, pages 2–14. Springer, 1989. doi:10.1007/3-540-51081-8_96.
  • [4] Franz Baader. Unification, weak unification, upper bound, lower bound, and generalization problems. In Ronald V. Book, editor, Rewriting Techniques and Applications, 4th International Conference, RTA-91, Proceedings, volume 488 of Lecture Notes in Computer Science, pages 86–97. Springer, 1991. doi:10.1007/3-540-53904-2_88.
  • [5] Franz Baader. Unification in commutative theories, Hilbert’s basis theorem, and Gröbner bases. J. ACM, 40(3):477–503, 1993. doi:10.1145/174130.174133.
  • [6] Franz Baader, Sebastian Brandt, and Carsten Lutz. Pushing the envelope. In Leslie Pack Kaelbling and Alessandro Saffiotti, editors, IJCAI-05, Proceedings of the Nineteenth International Joint Conference on Artificial Intelligence, pages 364–369. Professional Book Center, 2005. URL: http://ijcai.org/Proceedings/05/Papers/0372.pdf.
  • [7] Franz Baader and Wolfram Büttner. Unification in commutative idempotent monoids. Theor. Comput. Sci., 56:345–353, 1988. doi:10.1016/0304-3975(88)90140-5.
  • [8] Franz Baader and Silvio Ghilardi. Unification in modal and description logics. Log. J. IGPL, 19(6):705–730, 2011. doi:10.1093/JIGPAL/JZQ008.
  • [9] Franz Baader and Pierre Ludmann. The exact unification type of commutative theories. In Santiago Escobar and Mateu Villaret, editors, Proceedings of the 29th International Workshop on Unification (UNIF’15), pages 19–23, 2015. URL: https://lat.inf.tu-dresden.de/research/papers/2015/BaLu-UNIF2015.pdf.
  • [10] Franz Baader and Pierre Ludmann. The unification type of ACUI w.r.t. the unrestricted instantiation preorder is not finitary. In Silvio Ghilardi and Manfred Schmidt-Schauß, editors, Proceedings of the 30th International Workshop on Unification, UNIF 2016, pages 31–36, 2016. URL: http://users.mat.unimi.it/users/ghilardi/UNIF2016/UNIF16-abstracts.pdf#page=31.
  • [11] Franz Baader, Carsten Lutz, and Boontawee Suntisrivaraporn. CEL - A polynomial-time reasoner for life science ontologies. In Ulrich Furbach and Natarajan Shankar, editors, Automated Reasoning, Third International Joint Conference, IJCAR 2006, Proceedings, volume 4130 of Lecture Notes in Computer Science, pages 287–291. Springer, 2006. doi:10.1007/11814771_25.
  • [12] Franz Baader and Barbara Morawska. Unification in the description logic . In Ralf Treinen, editor, Rewriting Techniques and Applications, 20th International Conference, RTA 2009, Proceedings, volume 5595 of Lecture Notes in Computer Science, pages 350–364. Springer, 2009. doi:10.1007/978-3-642-02348-4_25.
  • [13] Franz Baader and Barbara Morawska. Unification in the description logic . Log. Methods Comput. Sci., 6(3), 2010. URL: http://arxiv.org/abs/1006.2289.
  • [14] Franz Baader and Paliath Narendran. Unification of concept terms in description logics. J. Symb. Comput., 31(3):277–305, 2001. doi:10.1006/JSCO.2000.0426.
  • [15] Franz Baader, Thanh Binh Nguyen, Stefan Borgwardt, and Barbara Morawska. Deciding unifiability and computing local unifiers in the description logic without top constructor. Notre Dame J. Formal Log., 57(4):443–476, 2016. doi:10.1215/00294527-3555507.
  • [16] Franz Baader and Tobias Nipkow. Term Rewriting and All That. Cambridge University Press, 1998. doi:10.1017/CBO9781139172752.
  • [17] Franz Baader and Werner Nutt. Combination problems for commutative/monoidal theories or how algebra can help in equational unification. Appl. Algebra Eng. Commun. Comput., 7(4):309–337, 1996. doi:10.1007/BF01195536.
  • [18] Franz Baader and Jörg H. Siekmann. Unification theory. In Dov M. Gabbay, Christopher J. Hogger, J. A. Robinson, and Jörg H. Siekmann, editors, Handbook of Logic in Artificial Intelligence and Logic Programming, Volume 2, Deduction Methodologies, pages 41–126. Oxford University Press, 1994. doi:10.1093/oso/9780198537465.003.0002.
  • [19] Franz Baader and Wayne Snyder. Unification theory. In John Alan Robinson and Andrei Voronkov, editors, Handbook of Automated Reasoning, volume 1, pages 445–532. Elsevier and MIT Press, 2001. doi:10.1016/B978-044450813-3/50010-2.
  • [20] Leo Bachmair and Nachum Dershowitz. Completion for rewriting modulo a congruence. Theor. Comput. Sci., 67(2&3):173–201, 1989. doi:10.1016/0304-3975(89)90003-0.
  • [21] Philippe Balbiani and Çiğdem Gencer. About the unification types of modal logics. In Nick Bezhanishvili, Rosalie Iemhoff, and Fan Yang, editors, Dick de Jongh on Intuitionistic and Provability Logics, pages 175–202. Springer International Publishing, 2024. doi:10.1007/978-3-031-47921-2_7.
  • [22] Philippe Balbiani, Çigdem Gencer, Maryam Rostamigiv, and Tinko Tinchev. Remarks about the unification types of some locally tabular normal modal logics. Log. J. IGPL, 31(1):115–139, 2023. doi:10.1093/JIGPAL/JZAB033.
  • [23] Leonardo Manuel Cabrer and George Metcalfe. From admissibility to a new hierarchy of unification types. In Temur Kutsia and Christophe Ringeissen, editors, Proceedings of the 28th International Workshop on Unification, UNIF 2014, pages 41–46, 2014. URL: https://www3.risc.jku.at/publications/download/risc_5001/proceedings-UNIF2014.pdf#page=46.
  • [24] Leonardo Manuel Cabrer and George Metcalfe. Exact unification and admissibility. Log. Methods Comput. Sci., 11(3), 2015. doi:10.2168/LMCS-11(3:23)2015.
  • [25] Jacques Corbin and Michel Bidoit. A rehabilitation of Robinson’s unification algorithm. In R. E. A. Mason, editor, Proceedings of the 9th World Computer Congress, IFIP’83, pages 909–914, Paris, France, 1983. Elsevier.
  • [26] Wojciech Dzik, Slawomir Kost, and Piotr Wojtylak. Finitary unification in locally tabular modal logics characterized. Ann. Pure Appl. Log., 173(4):103072, 2022. doi:10.1016/J.APAL.2021.103072.
  • [27] Wojciech Dzik, Slawomir Kost, and Piotr Wojtylak. Unification types and union splittings in intermediate logics. Ann. Pure Appl. Log., 176(1):103508, 2025. doi:10.1016/J.APAL.2024.103508.
  • [28] Elmar Eder. Properties of substitutions and unifications. J. Symb. Comput., 1(1):31–46, 1985. doi:10.1016/S0747-7171(85)80027-4.
  • [29] François Fages and Gérard P. Huet. Complete sets of unifiers and matchers in equational theories. In Giorgio Ausiello and Marco Protasi, editors, CAAP’83, Trees in Algebra and Programming, 8th Colloquium, Proceedings, volume 159 of Lecture Notes in Computer Science, pages 205–220. Springer, 1983. doi:10.1007/3-540-12727-5_12.
  • [30] François Fages and Gérard P. Huet. Complete sets of unifiers and matchers in equational theories. Theor. Comput. Sci., 43:189–200, 1986. doi:10.1016/0304-3975(86)90175-1.
  • [31] Silvio Ghilardi. Unification in intuitionistic logic. J. Symb. Log., 64(2):859–880, 1999. doi:10.2307/2586506.
  • [32] Miki Hermann, Laurent Juban, and Phokion G. Kolaitis. On the complexity of counting the Hilbert basis of a linear diophnatine system. In Harald Ganzinger, David A. McAllester, and Andrei Voronkov, editors, Logic Programming and Automated Reasoning, 6th International Conference, LPAR’99, Proceedings, volume 1705 of Lecture Notes in Computer Science, pages 13–32. Springer, 1999. doi:10.1007/3-540-48242-3_2.
  • [33] Michael Hoche, Jörg H. Siekmann, and Peter Szabó. String unification is essentially infinitary. FLAP, 3(5):755–788, 2016. URL: http://www.collegepublications.co.uk/downloads/ifcolog00009.pdf.
  • [34] Rosalie Iemhoff. A syntactic approach to unification in transitive reflexive modal logics. Notre Dame J. Formal Log., 57(2):233–247, 2016. doi:10.1215/00294527-345997.
  • [35] Emil Jerábek. Blending margins: the modal logic K has nullary unification type. J. Log. Comput., 25(5):1231–1240, 2015. doi:10.1093/LOGCOM/EXT055.
  • [36] Jean-Pierre Jouannaud and Claude Kirchner. Solving equations in abstract algebras: A rule-based survey of unification. In J.-L. Lassez and G. Plotkin, editors, Computational Logic: Essays in Honor of A. Robinson. MIT Press, Cambridge, MA, 1991.
  • [37] Jean-Pierre Jouannaud and Helene Kirchner. Completion of a set of rules modulo a set of equations. SIAM J. Computing, 15(4):1155–1194, 1986. doi:10.1137/0215084.
  • [38] Donald E. Knuth and Peter B. Bendix. Simple word problems in universal algebras. In J. Leech, editor, Computational Problems in Abstract Algebra. Pergamon Press, Oxford, 1970. doi:10.1016/B978-0-08-012975-4.50028-X.
  • [39] Ralf Küsters. Non-Standard Inferences in Description Logics, volume 2100 of Lecture Notes in Computer Science. Springer, 2001. doi:10.1007/3-540-44613-3.
  • [40] Dallas Lankford. Non-negative integer basis algorithms for linear equations with integer coefficients. J. Autom. Reason., 5(1):25–35, 1989. doi:10.1007/BF00245019.
  • [41] Jean-Louis Lassez, Michael J. Maher, and Kim Marriott. Unification revisited. In Jack Minker, editor, Foundations of Deductive Databases and Logic Programming, pages 587–625. Morgan Kaufmann, 1988. doi:10.1016/B978-0-934613-40-8.50019-1.
  • [42] Alberto Martelli and Ugo Montanari. An efficient unification algorithm. ACM Trans. Program. Lang. Syst., 4(2):258–282, 1982. doi:10.1145/357162.357169.
  • [43] Mike Paterson and Mark N. Wegman. Linear unification. J. Comput. Syst. Sci., 16(2):158–167, 1978. doi:10.1016/0022-0000(78)90043-0.
  • [44] Gerald E. Peterson and Mark E. Stickel. Complete sets of reductions for some equational theories. J. of the ACM, 28(2):233–264, 1981. doi:10.1145/322248.322251.
  • [45] Gordon Plotkin. Building in equational theories. Machine Intelligence, 7:73–90, 1972.
  • [46] Peter Raulefs, Jörg H. Siekmann, Peter Szabó, and E. Unvericht. A short survey on the state of the art in matching and unification problems. SIGSAM Bull., 13(2):14–20, 1979. doi:10.1145/1089208.1089210.
  • [47] John Alan Robinson. A machine oriented logic based on the resolution principle. J. of the ACM, 12(1):23–41, 1965. doi:10.1145/321250.321253.
  • [48] Manfred Schmidt-Schauß. Unification under associativity and idempotence is of type nullary. J. Autom. Reason., 2(3):277–281, 1986. doi:10.1007/BF02328450.
  • [49] Manfred Schmidt-Schauß. A decision algorithm for distributive unification. Theor. Comput. Sci., 208(1-2):111–148, 1998. doi:10.1016/S0304-3975(98)00081-4.
  • [50] Jörg H. Siekmann. Matching under commutativity. In Edward W. Ng, editor, Symbolic and Algebraic Computation, EUROSAM ’79, An International Symposium on Symbolic and Algebraic Computation, Proceedings, volume 72 of Lecture Notes in Computer Science, pages 531–545. Springer, 1979. doi:10.1007/3-540-09519-5_101.
  • [51] Jörg H. Siekmann. Universal unification. In Robert E. Shostak, editor, 7th International Conference on Automated Deduction, CADE 7, Proceedings, volume 170 of Lecture Notes in Computer Science, pages 1–42. Springer, 1984. doi:10.1007/978-0-387-34768-4_1.
  • [52] Jörg H. Siekmann. Unification theory. In Benedict du Boulay, David C. Hogg, and Luc Steels, editors, Advances in Artificial Intelligence II, Seventh European Conference on Artificial Intelligence, ECAI 1986, Proceedings, pages 365–400. North-Holland, 1986.
  • [53] Jörg H. Siekmann. Unification theory. J. Symb. Comput., 7(3/4):207–274, 1989. doi:10.1016/S0747-7171(89)80012-4.
  • [54] Viorica Sofronie-Stokkermans. Locality and applications to subsumption testing in and some of its extensions. Sci. Ann. Comput. Sci., 23(2):251–284, 2013. doi:10.7561/SACS.2013.2.251.
  • [55] Viorica Sofronie-Stokkermans. Representation theorems and locality for subsumption testing and interpolation in the description logics , + and their extensions with n-ary roles and numerical domains. Fundam. Informaticae, 156(3-4):361–411, 2017. doi:10.3233/FI-2017-1612.
  • [56] Mark E. Stickel. A unification algorithm for associative-commutative functions. J. ACM, 28(3):423–434, 1981. doi:10.1145/322261.322262.
  • [57] Peter Szabó and Jörg H. Siekmann. E-unification based on generalized embedding. Math. Struct. Comput. Sci., 31(8):898–917, 2021. doi:10.1017/S0960129522000019.
  • [58] Katherine A. Yelick. Combining unification algorithms for confined regular equational theories. In Jean-Pierre Jouannaud, editor, Rewriting Techniques and Applications, First International Conference, RTA-85, Proceedings, volume 202 of Lecture Notes in Computer Science, pages 365–380. Springer, 1985. doi:10.1007/3-540-15976-2_18.

Appendix A The unification type of ACU

In this section, we complete the proof of Theorem 31 by showing that type infinitary is also the upper bound for 𝖠𝖢𝖴. In contrast to the other equational theories considered in Sections 3 and 4, an analog of Lemma 21 does not hold for 𝖠𝖢𝖴. Instead, we show that a set of the form {σσ𝖠𝖢𝖴Vθ} for a given unifier θ cannot contain an infinite decreasing chain w.r.t. >𝖠𝖢𝖴V. We do this in two steps:

  1. 1.

    We recall a well-known characterization of the congruence classes of 𝖠𝖢𝖴, and then employ this characterization to show an auxiliary result about 𝖠𝖢𝖴V.

  2. 2.

    Finally, we use this auxiliary result to provide the final argument that shows that type zero is not possible for 𝖠𝖢𝖴.

Let Σ={f,0} be the signature introduced in Section 4 to define 𝖠𝖢𝖴. Given a term tT(Σ,V), we denote by cxt the number of occurrences of the variable x in t. The congruence classes of 𝖠𝖢𝖴 can be characterized in the following way (Lemma 10.3.1 of [16]).

Lemma 35 ([16]).

Let s,tT(Σ,V). Then, s𝖠𝖢𝖴t iff cxt=cxs for all xV.

This lemma tells us that, given a finite set Xn={x1,,xn}V, the 𝖠𝖢𝖴-equivalence class of a term tT(Σ,Xn) can be uniquely represented by the vector vn(t)=(cx1t,,cxnt). If t𝖠𝖢𝖴0, then each component cxjt (1jn) of vn(t) has value zero.

Based on this representation, a substitution σ with Dom(σ)Xn and VRan(σ)Xm (n,m0) can be represented as an n×m matrix with rows vm(σ(x1)),,vm(σ(xn)). Then, applying a substitution σ to a term t corresponds to multiplying the vector for t with the matrix for σ, i.e., the representation vm(σ(t)) of σ(t) can be obtained by computing the following sums (for all j,1jm):

cxjσ(t)=k=1ncxktcxjσ(xk).

For example, if t=f(x1,f(x2,x2)) and σ={x1x2,x2f(x1,x1)}, then v2(t)=(1,2) and the matrix representing σ has the rows (0,1) and (2,0). The vector representing σ(t)=f(x2,f(f(x1,x1),f(x1,x1))) is (4,1). Note that 4=10+22 and 1=11+20.

Based on these representations, we next introduce some notions, and show a property about 𝖠𝖢𝖴V that will be useful later on. For simplicity, given a substitution σ, we will write (ci1σ,,cimσ) instead of (cx1σ(xi),,cxmσ(xi)) to refer to the vector vm(σ(xi)). In addition, we denote by Pn the set of pairs {1,,n}×{1,,n}.

Definition 36.

Let n0 and PPn. Further, let σ1 and σ2 be substitutions whose domains and variable ranges are contained in Xn. We say that σ1 is greater than σ2 w.r.t. P (denoted as >P), if

  • for all (i,j)P and k{1,,n}: cijσ1>cikσ2.

Further, we say that σ1 and σ2 coincide on P, if

  • for all (i,j)P: cijσ1=cijσ2.

It is not hard to show that >P is a transitive relation.

Lemma 37.

Let n0 and PPn. The relation >P is transitive.

Proof.

Let σ1,σ2 and σ3 be substitutions such that σ1>Pσ2 and σ2>Pσ3. To prove transitivity of >P, we need to show that σ1>Pσ3.

Let us take any pair (i,j)P. Since σ1>Pσ2, we have that cijσ1>cikσ2 for all k{1,,n}). In particular, this yields cijσ1>cijσ2. Furthermore, from σ2>Pσ3, we know that cijσ2>cikσ3 for all k{1,,n}). Consequently, it follows that cijσ1>cikσ3for all k{1,,n}. Thus, since (i,j)P was arbitrarily chosen, we can conclude that σ1>Pσ3.

We continue by proving the following property about 𝖠𝖢𝖴V.

Lemma 38.

Let n0 and PPn. In addition, let σ1, σ2,σ3 be substitutions such that:

  • Dom(θ)VRan(θ)Xn for {1,2,3},

  • σ1𝖠𝖢𝖴Vσ2,

  • σ1 is greater than σ2 w.r.t. P, and

  • σ1 and σ3 coincide on PnP.

Then, σ3𝖠𝖢𝖴Vσ2.

Proof.

Since σ1𝖠𝖢𝖴Vσ2, there is a substitution λ such that λσ1𝖠𝖢𝖴σ2. We can assume that the domain and variable range of λ satisfy the following properties:

  • Dom(λ)Xn. For otherwise, if there is a variable z such that zDom(λ) but zXn, then Dom(σ1)Xn implies that λσ1(z)z. However, this would contradict λσ1𝖠𝖢𝖴σ2, since Dom(σ2)Xn.

  • VRan(λ)Xn. Note that if VRan(λ) contains a variable z not in Xn, then λ(xi) contains z for some i{1,,n}. But, since zVRan(σ2), the variable xi cannot be in VRan(σ1). Thus, we can safely remove the occurrences of z from λ(xi), i.e., λσ1𝖠𝖢𝖴σ2 remains true.

Hence, since Dom(σ1)Dom(σ3)Dom(λ)Xn, we have that Dom(λσ1)Xn and Dom(λσ3)Xn. Therefore, to prove that σ3𝖠𝖢𝖴Vσ2, it suffices to show that

λσ1(xi)𝖠𝖢𝖴λσ3(xi)for all i{1,,n}. (1)

Let i{1,,n}. Since VRan(σ1)VRan(λ)Xn, the 𝖠𝖢𝖴-equivalence class of λσ1(xi) can be represented with a vector of the form (ci1λσ1,,cinλσ1), where each value cijλσ1 (1jn) is determined by the following expression:

cijλσ1=k=1ncikσ1ckjλ.

As λσ1(xi)𝖠𝖢𝖴σ2(xi), an application of Lemma 35 yields:

cijλσ1=k=1ncikσ1ckjλ=cijσ2for all j{1,,n}. (2)

Consider any pair (i,k)P. Since σ1>Pσ2, this means that cikσ1>cijσ2 for all j{1,,n}. Hence, since VRan(λ)Xn, it must be that λ(xk)=0. For otherwise, ckjλ>0 for some j{1,,n} and the expression in (2) would not be true for such j. Therefore, (2) can be turned into:

cijλσ1=k=1(i,k)PnPncikσ1ckjλ=cijσ2for all j{1,,n}.

Regarding λσ3, we also have VRan(σ3)VRan(λ)Xn. Hence, the 𝖠𝖢𝖴-equivalence class of λσ3(xi) has a representation of the form (ci1λσ3,,cinλσ3), where (1jn):

cijλσ3=k=1(i,k)PnPncikσ3ckjλ.

But then, since σ1 and σ3 coincide on PnP, we have that:

cijλσ3=k=1(i,k)PnPncikσ3ckjλ=k=1(i,k)PnPncikσ1ckjλ=cijλσ1.

Hence, we have shown that (ci1λσ1,,cinλσ1)=(ci1λσ3,,cinλσ3). Then, an application of Lemma 35 yields that λσ1(xi)𝖠𝖢𝖴λσ3(xi). Thus, since i was arbitrarily selected, we have proved the claim in (1). This concludes the proof of the lemma.

We are now ready to move into the final part of our proof. The main idea is to show the following: if {σσ𝖠𝖢𝖴Vθ} for a given substitution θ contains an infinite decreasing chain w.r.t. >𝖠𝖢𝖴V, then such a chain contains three substitutions σ1,σ2 and σ3 such that:

  • σ3>𝖠𝖢𝖴Vσ2>𝖠𝖢𝖴Vσ1, and

  • σ1,σ2 and σ3 satisfy the hypothesis of Lemma 38.

This implies that σ2𝖠𝖢𝖴Vσ3, which contradicts the existence of such an infinite chain.

In order to apply Lemma 38, we first need to show that there is n0 such that the domain and variable range of each substitution in {σσ𝖠𝖢𝖴Vθ} is contained in Xn. This is a consequence of the analogs of Lemmas 18 and 19 for 𝖠𝖢𝖴.

Lemma 39.

Let σ,θ be substitutions such that σ𝖠𝖢𝖴Vθ. Then there is a substitution σ such that σ𝖠𝖢𝖴Vσ and Dom(σ)Dom(θ).

Proof.

Let 𝒳=Dom(σ)Dom(θ). Since σ𝖠𝖢𝖴Vθ, there exists a substitution λ such that λσ𝖠𝖢𝖴θ. This means that λσ(x)𝖠𝖢𝖴θ(x)=x for all x𝒳. Hence, an application of Lemma 35 (and consequences thereof described above) yields that:

cxλσ(x)=zVczσ(x)cxλ(z)=cxθ(x)= 1.

This implies that σ(x) must contain a single occurrence of some variable zx such that λ(zx)=x, and that λ(y)=0 for any other variable y occurring in σ(x). In addition, zxzy for different elements x,y of 𝒳. Once we have this, the same counting argument employed in the proof of Lemma 18 can be applied here to conclude that σ(x)=zx for all x𝒳.

The rest of the proof uses the same arguments as our proof of Lemma 18.

The following lemma states that Lemma 19 also holds if we replace with 𝖠𝖢𝖴. The proof is the same as for Lemma 19.

Lemma 40.

Let σ,θ be substitutions such that σ𝖠𝖢𝖴Vθ and Dom(σ)Dom(θ). Then VRan(σ)Dom(θ)VRan(θ).

Thus, given a substitution θ and an enumeration x1,,xn of Dom(θ)VRan(θ), we can assume (modulo 𝖠𝖢𝖴V) that any substitution in {σσ𝖠𝖢𝖴Vθ} is such that Dom(σ)VRan(σ)Xn. It remains to establish the contradiction mentioned above. We will do this with the help of the following result.

Lemma 41.

Let θ be a substitution, x1,,xn an enumeration of Dom(θ)VRan(θ), and PPn. Suppose that {σσ𝖠𝖢𝖴Vθ} contains an infinite decreasing chain 𝔰=σ1σ2 w.r.t. >𝖠𝖢𝖴V such that σ+1>Pσfor all 1. Then, there exists (i,j)PnP such that {σσ𝖠𝖢𝖴Vθ} contains an infinite decreasing chain τ1τ2 w.r.t. >𝖠𝖢𝖴V satisfying τp+1>P{(i,j)}τpfor all p1.

Proof.

Suppose such an infinite decreasing chain 𝔰 exists. We claim that there is a pair (i,j) in PnP such that the sequence of values cijσ1,cijσ2, is not bounded, i.e.,

for all m, there exists 1 such that:cijσ>m. (3)

If that were not the case, then there would be infinitely many substitutions in 𝔰 that coincide on PnP. As a consequence, we could select substitutions σ1,σ2 and σ3 in 𝔰 such that:

  • σ3>𝖠𝖢𝖴Vσ2>𝖠𝖢𝖴Vσ1,

  • σ1 is greater than σ2 w.r.t. P, and

  • σ1 and σ3 coincide on PnP.

Hence, an application of Lemma 38 would yield σ3𝖠𝖢𝖴Vσ2, which contradicts σ3>𝖠𝖢𝖴Vσ2.

Based on such a pair (i,j), we define the infinite chain τ1τ2 as follows:

  1. 1.

    τ1=σ1.

  2. 2.

    By (3), there is p>1 such that cijσp>cikσ1 for all k{1,,n}. We choose τ2 as σp. The following arguments show that τ1 and τ2 satisfy the properties required of τ1τ2 w.r.t. P{(i,j)}:

    • Since σ1>𝖠𝖢𝖴Vσp, we have that τ1>𝖠𝖢𝖴Vτ2.

    • By selection of p, we know that σp>{(i,j)}σ1. Moreover, since σ+1>Pσ for all 1, transitivity of >P yields that σp>Pσ1. Consequently, we can conclude that τ2 is greater than τ1 w.r.t. P{(i,j)}.

  3. 3.

    Once we fix σp, (3) also yields q>p such that cijσq>cikσp for all k,1kn. We select τ3 as σq. The same arguments yield that τ2 and τ3 are as required.

  4. 4.

    By repeating (ad infinitum) the described selection process, we can extract from 𝔰 an appropriate remaining sequence of substitutions τ4τ5.

The described process ensures that each selected substitution τ (1) belongs to {σσ𝖠𝖢𝖴Vθ}. Thus, τ1τ2 is an infinite decreasing chain satisfying the claim of the lemma.

Finally, by using the previous lemma, we can show the main result of this section.

Lemma 42.

For a given substitution θ, the set {σσ𝖠𝖢𝖴Vθ} does not contain an infinite decreasing chain w.r.t. >𝖠𝖢𝖴V.

Proof.

Suppose {σσ𝖠𝖢𝖴Vθ} contains an infinite decreasing chain 𝔰 w.r.t. >𝖠𝖢𝖴V. By Definition 36, we have η>η for all η,η{σσ𝖠𝖢𝖴Vθ}. This means that 𝔰 and P= satisfy the hypothesis of Lemma 41. Hence, there is (i,j)Pn such that {σσ𝖠𝖢𝖴Vθ} contains an infinite decreasing chain τ1τ2 satisfying τp+1>{(i,j)}τp for all p1. This new chain now satisfies the hypothesis of Lemma 41 w.r.t. P={(i,j)}. Thus, by a sequence of n21 further applications of Lemma 41, we conclude that {σσ𝖠𝖢𝖴Vθ} contains an infinite decreasing chain σ1σ2 such that σp+1>Pnσp for all p1. Finally, it is not hard to verify that this last chain must contain three substitutions σ1,σ2 and σ3 such that

  • σ3>𝖠𝖢𝖴Vσ2>𝖠𝖢𝖴Vσ1,

  • σ1 is greater than σ2 w.r.t. P=Pn, and

  • σ1 and σ3 coincide on PnP=.

Hence, the application of Lemma 38 yields that σ3𝖠𝖢𝖴Vσ2, which contradicts the existence of σ1σ2 since σ3>𝖠𝖢𝖴Vσ2. Thus, we have derived a contradiction from our initial assumption. This concludes the proof of the lemma.

Lemma 42 shows that the unrestricted unification type of 𝖠𝖢𝖴 cannot be zero. In fact, this lemma implies that every unifier θ is above a minimal unifier, and thus the set of minimal unifiers is complete. By Theorem 3, we can conclude that the unification type cannot be zero, which completes the proof of Theorem 31.