| OCR Text |
Show B because the existence of the reduction sequence (*) implies -yA =E -yB. This proves the correctness of the algorithm. The proof is complete if we note that the set of variables W can be easily protected during the term construction process.-" 0 32 Notice that in the algorithm the process of testing for existence of a reduction sequence of the form cr'(H(A,B)) - > '~ H(R,R) is based on the fact that we are dealing with term rewriting systems. When considering equations rather than rewrite rules, by the well-known Birkhoff's completeness theorem [7], cr'A =E cr 'B if and only if this can be proved by a finite number of proof steps. We have therefore shown the main result of this chapter: the existence of a complete E-unification algorithm for all equational theories. Theorem 3-3: There exists an E-unification algorithm which is complete for all equational theories. D 3.1.2 An Algorithm based on Term Construction and Narrowing A complete E-unification algorithm does not need to enumerate the set of all unifiers, but only an appropriate subset thereof. Algorithm 2 uses a slightly restricted version of term construction in the first phase and narrowing as its second phase. The term construction process defined in Section 3.1.1 is now restricted to the set of n-ary function symbols for n > 0. The new version of term construction will be referred to as restricted term construction. Note that in the t-trees generated by the process of restricted term con-struction there are no ground leaf nodes since constant function symbols are excluded. In the case that all functions are constant functions, the t-tree has * Recall that the introduction of W is technical, and is needed in order to separate the variables introduced by unification from those of the context where unification is employed. |