apply the unification algorithm to the following two clauses and show how it progresss towards finding a most general unifier or concluding that the clause is not unifiable?
{P(x,y),P(y,f(z))},{P(g(x),y),P(y,y),P(u,f(w))}
can somebody show me how to do it step by step and explain the meaning of it. im a bit lost on this section(about the unifier and general unifier)
by the way im using the book "logic for computer scientists" by uwe schoning
based on the algorithm in p.84 of the textbook.
this is what i have done: for the clause {P(x,y),P(y,f(z))} i have the substitution as sub=sub[x/y][y/f(z)] and the most general unifier as Lsub={P(f(z),f(z))}
for the second clause {P(g(x),y),P(y,y),P(u,f(w))} i follow the unifier algorithm step1:sub=sub[y/g(x)] and has a result as {P(g(x),g(x)} step2:sub=sub[u/g(x)] and has a result as {P(g(x),f(w)} step3:since non of "f" and "g" is variable. so output non-unifiable
See page 83 :
The "trick is that with the above subst, we will have :
so that we have unified the two literals $P(x)$ and $P(f(y))$.
The Unification Algorithm is described at page 84.
You have to recall the resolution calculus [page 29] :
In propositional logic, first you transform a formula $F$ in CNF ;
$F = (L_{1,1} \lor ... \lor L_{1,n_1}) \land ... \land (L_{k,1} \lor ... \lor L_{k,n_k})$ ;
the we represent the CNF as sets of clauses where a clause is a set of literals:
$F = \{ \{ L_{1,1},... L_{1,n_1} \}, ... \{ L_{k,1}, ... L_{k,n_k} \} \}$.
The resolution procedure "simplify" the set of clauses until reach an end; if the result of the last step is the empty clause, then the "initial" clause set is unsatisfiable. By property of the CNF, also the initial formula is unsatisfiable.
Thus, if the initial formula was $\varphi$, having shown that it is unsatisfiable, we conclude that $\lnot \varphi$ is a tautology.
In predicate logic, the basic concepts are the same; we say that a formula is valid instead of tautological, but the aim of the procedure is the same : to check if the initial formula is unsatisfiable.
In this case, we start with an initial formula and transform it into RPF; then produce its Skolem formula; recall that [Theorem page 57] :
Finally, convert the matrix of the Skolem formula into CNF [see page 60].
From now on, we apply the resolution procedure; in predicate logic it is more complicated, due to the "richer" semantics for f-o language.
We need the Herbrand universe and the Herbrand expansion, and unification, but the goal is the same : transform the clause set in order to find if it is unsatisfiable.
If so, "rewinding" the above process, we have that the Skolem formula is unsat, and thus the RPF is; finally, also the initial formula $\varphi$ is unsat, and thus we conclude that $\lnot \varphi$ is valid.