| OCR Text |
Show process (and possibly by t he enumeration of nonlinear terms), and 11 is generated by a narrow ing sequence afterwards, the composition ~~~ , is t hen a substitution generated by Algorithm 2, and is more general than the given unifier ~ . This shows the completeness of the algorithm. From Theorem 2- 10, for any unifier 11 generated by a narrowing sequence, there is a reduction sequence issuing from 11(C) = ~~~ ' (H(A,B)). Theref ore, v~ ' is indeed a un if ier for A and B. We have thus proved the correct ness of Algorithm 2. We conclude the proof by noticing t hat W can be easily protect ed. 0 3.1.3 An Algorithm based on Fair Interleaving of Term Construction and Narrowing 35 Algorithm 2 performs the restricted term construction process before ap-plying narrowing. It can be further generalized to obtain a new algorithm, which we call Algorithm 3. The idea is to perform the restricted term construct ion process along with narrowing sequences. In other words, the term construction process is interleaved with the narrowing process. Algorithm 3 is a general iza-tion of the algorithms of Fay and Hullot. Definition 3-5: Let A be a term, and V = {x1, ... ,xn} be the set of variables in A. In the case where A is a ground term, V is empty. Let t = {x. <- t ., ... , x. <- t .} I I J J be any substitution obtained from any combination of generated terms by the restricted term construction, including corresponding nonlinear terms. We say that the term A' is a T- i nstanti at ion of A by t iff tA = A'. We say that B is TN-derived (T -instantiation and Narrowing) from A, denoted by A ,..,. > > [[u,k,-y l.tl B, if A' is a T -instantiation of A by t and A'- >ru,k,-y]B. The narrowing process and the T -instantiation process are tw o special cases of TN-derivation, and denoted respectively as follow s: A = A' - > >[u,k,-yl B, A - > >rtl A' = B. We denote by ...... > > * the reflexive, transitive closure of - > > . 0 |