I need to apply the unification function to unify the following expression:
foo(X,X,Y) and foo(Z,p(Z),w)
So far, I've determined that I must substitute 'w's for occurances of 'Y', making
foo(X,X,w) and foo(Z,p(Z),w)
Then, I can saw X/Z (replaces 'Z' with 'X'), making:
foo(X,X,w) and foo(X,p(X),w)
Now all that's left is making p(X) equivalent to X
My question here is, is it allowed to replace this P(X) with X using the substitution X/p(X)? Or am I going about the question in the wrong pattern?