Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

Resolution in FOL Why Occur Check ?

? In Unification algo, it requires that the substitution of term ti+1 for variable Xi+1 is allowed if variable Xi+1 does not occur in term ti+1. Eg. for variable X and term f(X), X occur in f(X). The occur check would prevent the substitution which results in the infinite term.

Example Consider clauses p(W, W) and p(f(X), f(f(X))). Without the occur check, the unification algo would produce mgu. = {W f(X), X f(X)}. Such mgu would produce the infinite term f(f(f(f(f(..))))). Resolution together with Unification is used to determine whether a set of clauses is unsatisfiable or not. Without the occur check, two clauses which are not unsatifiable may be determined as unsatisfiable. Without occur check, the two clauses p(W, W) and p(f(X), f(f(X))) are determined as unsatisfiable due to a unifier {Wf(X), Xf(X)} but they are actually satisfiable. In particular, p(W, W) means that property p holds for two identical terms, but p(f(X), f(f(X))) means that p does not hold for two terms where one is obtained by applying function f to the other.

Why Renaming Variables? We need to rename variables so that any two different clauses do not have the same variable. 1

Without renaming variables, the two clauses p(f(X)) and p(X) cannot be resolved due to the occur check on { X f(X) }. With the renaming two variables in the two clauses into p(f(X1)) and

p(X2), the two clauses can be resolved by { X2 f(X1) }.


Moreover, the renaming of variables is applied for the unification also. Without renaming, there is no mgu for p(X) and p(f(X)). With renaming into p(X1) and p(f(X2)), the mgu. is {X1 f(X2) }. Example Resolution Suppose that there are clauses as follows: 1) p(X) q(X) r(X, f(X)) 2) p(X) q(X) s(f(X)) 3) t(a) 4) p(a) 5) r(a,Y) t(Y) 6) t(X) q(X) 7) t(X) s(X)

You might also like