| OCR Text |
Show 14 In this case, some terms are equal to some others. For example, we should consider the terms f(a, b) and f(b, a) to be equal because the commutativity law says that they are equal. The commutativity law actually defines a congruence rela t ion over the set of terms. We say that this congruence relation is an equa-tion a! theory, generated by the commutativity law, and the unification in the presence of this equational theory is what we have called E-unification. Two terms are E-unifiable if there exists a substitution, such that when the substitu-tion is applied to both terms, the resulting two terms belong to the same con-gruence class. It is clear that 111 is still a unifier for t 1 and t 2. Moreover, 113 = {y <-a} is al so a un ifier for t 1 and t 2 , si nce 11 3(t 1) = f(x, g(a, z)) 11 3(t 2) = f(g {a, z}, x), and from the commutativ ity law, we can show t hat f{x, g(a, z}) and f(g(a, z), x) are indeed equal. It is clear that 111 is an instance of 11 3 . In E-unification, there are cases w here t he two given te rms have more than one most general unifier (also called mini mum unifier), i.e., t hey are not in-stances of any other unifier. This is in contrast to unification in free terms, where every pair of unifiable terms has a unique most general un ifier (up to variable renaming). It has been shown that the number of most general unifiers in the presence of commutativity law is finitely many [108]. The situation becomes quite different when the function f obeys the as-sociativity law: f(x, f{y, z)) = f(f(x, y), z). The substitution 111 is still a unifier for t 1 and t 2 . It can be v erif ied t hat all the substitutions below are most general unifiers for t 1 and t 2 :* * Notice that there is an infinite chain for the substit utions of t he vari able x. All the substitutions for x can be ex pressed by an equation : f(p, p) = f (p, f (p, p)), w here p = g(a, z). |