In the propositional case we defined the resolution inference rule by
"cutting away" a pair of complementary literals in two clauses which
are resolved upon. In the first order case however this is not always
sufficient:
C
1
:
p
(
x
)
∨
q
(
x
)
C
2
:
¬
p
(
f
(
x
)
)
{\displaystyle {\begin{matrix}C_{1}:&p(x)\lor q(x)\\C_{2}:&\lnot p(f(x))\end{matrix}}}
In these two clauses there are no complementary literals, however,
after substituting the term
f
(
a
)
{\displaystyle f(a)}
for the variable
x
{\displaystyle x}
in
C
1
{\displaystyle C_{1}}
and
a
{\displaystyle a}
for
x
{\displaystyle x}
in
C
2
{\displaystyle C_{2}}
we arrive at:
C
1
′
:
p
(
f
(
a
)
)
∨
q
(
f
(
a
)
)
C
2
′
:
¬
p
(
f
(
a
)
)
{\displaystyle {\begin{matrix}C_{1}':&p(f(a))\lor q(f(a))\\C_{2}':&\lnot p(f(a))\end{matrix}}}
Now we can apply the inference rule from propositional logic and
arrive at the resolvent
q
(
f
(
a
)
)
{\displaystyle q(f(a))}
.
Another possibility is to substitute
f
(
x
′
)
{\displaystyle f(x')}
for
x
{\displaystyle x}
in
C
1
{\displaystyle C_{1}}
to get
C
1
″
:
p
(
f
(
x
′
)
)
∨
q
(
f
(
x
′
)
)
{\displaystyle C_{1}'':p(f(x'))\lor q(f(x'))}
and then we can have the resolvent
q
(
f
(
x
′
)
)
{\displaystyle q(f(x'))}
from
C
1
″
{\displaystyle C_{1}''}
and
C
2
{\displaystyle C_{2}}
, which is in a certain sense more general then the resolvent derived
previously.
A substitution
σ
{\displaystyle \sigma }
is a function, which maps variables
to terms and which is the identical mapping almost everywhere. Hence
it can be represented as
σ
=
{
x
1
/
t
1
,
⋯
,
x
n
/
t
n
}
{\displaystyle \sigma =\{x_{1}/t_{1},\cdots ,x_{n}/t_{n}\}}
If
t
1
,
⋯
,
t
n
{\displaystyle t_{1},\cdots ,t_{n}}
are groundterms, we call
σ
{\displaystyle \sigma }
a
ground substitution. The empty substitution is
notated by
ϵ
{\displaystyle \epsilon }
.
Let
θ
=
{
x
1
/
t
1
,
⋯
,
x
n
/
t
n
}
{\displaystyle \theta =\{x_{1}/t_{1},\cdots ,x_{n}/t_{n}\}}
be a substitution and
E
{\displaystyle E}
an
expression (i.e. a literal or a term), then
E
θ
{\displaystyle E\theta }
is the expression,
obtained from
E
{\displaystyle E}
by replacing simultaneously each occurrence of
X
i
,
1
≤
i
≤
n
{\displaystyle X_{i},1\leq i\leq n}
in
E
{\displaystyle E}
by the term
t
i
{\displaystyle t_{i}}
.
Example:
With
θ
=
{
x
/
a
,
y
/
f
(
b
)
,
z
/
e
}
{\displaystyle \theta =\{x/a,y/f(b),z/e\}}
and
E
=
p
(
x
,
y
,
z
)
{\displaystyle E=p(x,y,z)}
, we get
E
θ
=
p
(
a
,
f
(
b
)
,
c
)
{\displaystyle E\theta =p(a,f(b),c)}
Let
σ
=
{
x
1
/
t
1
,
⋯
,
x
n
/
t
n
}
{\displaystyle \sigma =\{x_{1}/t_{1},\cdots ,x_{n}/t_{n}\}}
and
λ
=
{
y
1
/
s
1
,
⋯
,
y
m
/
s
m
}
{\displaystyle \lambda =\{y_{1}/s_{1},\cdots ,y_{m}/s_{m}\}}
be substitutions. Then the composition of substitutions, denoted by
σ
∘
λ
{\displaystyle \sigma \circ \lambda }
,
is the substitution, which is obtained from
{
x
1
/
t
1
λ
,
⋯
,
x
n
/
t
n
λ
,
y
1
/
s
1
,
⋯
,
y
m
/
s
m
}
{\displaystyle \{x_{1}/t_{1}\lambda ,\cdots ,x_{n}/t_{n}\lambda ,y_{1}/s_{1},\cdots ,y_{m}/s_{m}\}}
by deleting any element
x
j
/
t
j
λ
{\displaystyle x_{j}/t_{j}\lambda }
for which
t
j
λ
=
x
j
{\displaystyle t_{j}\lambda =x_{j}}
and any element
y
i
/
s
i
{\displaystyle y_{i}/s_{i}}
such that
y
i
∈
{
x
1
,
⋯
,
x
n
}
{\displaystyle y_{i}\in \{x_{1},\cdots ,x_{n}\}}
.
Example:
Let
{
E
1
,
⋯
,
E
n
}
{\displaystyle \{E_{1},\cdots ,E_{n}\}}
be a set of expressions and
θ
{\displaystyle \theta }
a
substitution,
θ
{\displaystyle \theta }
is unifier for
{
E
1
,
⋯
,
E
n
}
{\displaystyle \{E_{1},\cdots ,E_{n}\}}
iff
E
1
θ
=
E
2
θ
=
⋯
E
n
θ
{\displaystyle E_{1}\theta =E_{2}\theta =\cdots E_{n}\theta }
.
A unifier
θ
{\displaystyle \theta }
is called most general unifier iff for every
unifier
σ
{\displaystyle \sigma }
there is a substitution
λ
{\displaystyle \lambda }
such that
σ
=
θ
∘
λ
{\displaystyle \sigma =\theta \circ \lambda }
.
In the following we discuss an algorithm for computing most general
unifiers. For this we assume a set of terms
{
t
1
,
⋯
,
t
n
}
{\displaystyle \{t_{1},\cdots ,t_{n}\}}
to be unified. First we transform this into a set of equations
by introducing a new variable not yet occurring in this set, say
y
{\displaystyle y}
and by defining the set of equations
N
=
{
y
=
t
1
,
⋯
,
y
=
t
n
}
{\displaystyle N=\{y=t_{1},\cdots ,y=t_{n}\}}
We will now transform this set such that its unifiers stay invariant,
where a
σ
{\displaystyle \sigma }
is a unifier of a set of
{
s
1
=
t
1
,
⋯
,
s
n
=
t
n
}
{\displaystyle \{s_{1}=t_{1},\cdots ,s_{n}=t_{n}\}}
if
{
s
1
σ
=
t
1
σ
,
⋯
,
s
n
σ
=
t
n
σ
}
{\displaystyle \{s_{1}\sigma =t_{1}\sigma ,\cdots ,s_{n}\sigma =t_{n}\sigma \}}
holds.
Unification
Given a set of expression. Transform it into a set of equations
N
{\displaystyle N}
as defined above. Apply the following transformation rules as long as
possible:
R
⊎
{
t
=
x
}
R
⊎
{
x
=
t
}
{\displaystyle {\frac {R\uplus \{t=x\}}{R\uplus \{x=t\}}}}
Orient where
x
{\displaystyle x}
is a variable and
t
{\displaystyle t}
a non-variable term
R
⊎
{
s
=
s
}
R
{\displaystyle {\frac {R\uplus \{s=s\}}{R}}}
Delete
R
⊎
{
f
(
s
1
,
…
,
s
n
)
=
f
(
t
1
,
…
,
t
n
)
}
R
⊎
{
s
1
=
t
1
,
…
,
s
n
=
t
n
}
{\displaystyle {\frac {R\uplus \{f(s_{1},\dots ,s_{n})=f(t_{1},\dots ,t_{n})\}}{R\uplus \{s_{1}=t_{1},\dots ,s_{n}=t_{n}\}}}}
Decompose (Termreduction)
R
⊎
{
x
=
t
}
R
[
x
/
t
]
⊎
{
x
=
t
}
{\displaystyle {\frac {R\uplus \{x=t\}}{R[x/t]\uplus \{x=t\}}}}
Eliminate (Elimination of variable I) if
x
{\displaystyle x}
not in
t
{\displaystyle t}
, but in
R
{\displaystyle R}
R
⊎
{
x
=
y
}
R
[
x
/
y
]
⊎
{
x
=
y
}
{\displaystyle {\frac {R\uplus \{x=y\}}{R[x/y]\uplus \{x=y\}}}}
Coalesce (Elimination of variable II) if
x
≠
y
{\displaystyle x\neq y}
in
R
{\displaystyle R}
R
⊎
{
f
(
s
1
,
…
,
s
m
)
=
g
(
t
1
,
…
,
t
n
)
}
FAIL
{\displaystyle {\frac {R\uplus \{f(s_{1},\dots ,s_{m})=g(t_{1},\dots ,t_{n})\}}{\mbox{FAIL}}}}
Conflict if
f
≠
g
{\displaystyle f\neq g}
or
m
≠
n
{\displaystyle m\neq n}
R
⊎
{
x
=
t
}
FAIL
{\displaystyle {\frac {R\uplus \{x=t\}}{\mbox{FAIL}}}}
Occur Check if
x
{\displaystyle x}
in
t
{\displaystyle t}
Let
N
{\displaystyle N}
be a set of expressions. The above unification algorithm
terminates. If it returns
F
A
I
L
{\displaystyle FAIL}
, there is no unifier for
N
{\displaystyle N}
, otherwise
N
{\displaystyle N}
is transformed into a set of equation
{
y
1
=
u
1
,
⋯
,
y
m
=
u
m
}
{\displaystyle \{y_{1}=u_{1},\cdots ,y_{m}=u_{m}\}}
, which represents the most general unifier for
N
{\displaystyle N}
.
Let two or more literals of a clause
C
{\displaystyle C}
have a unifier
σ
{\displaystyle \sigma }
, then
C
σ
{\displaystyle C\sigma }
is called a factor of
C
{\displaystyle C}
.
Example:
With
C
=
{
p
(
x
)
,
p
(
f
(
y
)
)
,
¬
q
(
x
)
}
{\displaystyle C=\{p(x),p(f(y)),\lnot q(x)\}}
and
σ
=
{
x
/
f
(
y
)
}
{\displaystyle \sigma =\{x/f(y)\}}
we
get the factor
C
σ
=
{
p
(
f
(
y
)
)
,
¬
q
(
f
(
y
)
)
}
{\displaystyle C\sigma =\{p(f(y)),\lnot q(f(y))\}}
Let
C
1
{\displaystyle C_{1}}
and
C
2
{\displaystyle C_{2}}
be two clauses with no variables in common, such
that
L
1
∈
C
1
{\displaystyle L_{1}\in C_{1}}
and
L
2
∈
C
2
{\displaystyle L_{2}\in C_{2}}
and
L
1
{\displaystyle L_{1}}
and
L
2
{\displaystyle L_{2}}
have a most
general unifier
σ
{\displaystyle \sigma }
. A binary resolvent of
C
1
{\displaystyle C_{1}}
and
C
2
{\displaystyle C_{2}}
is
(
C
1
σ
−
L
1
σ
)
∪
(
C
2
σ
−
L
2
σ
)
{\displaystyle (C_{1}\sigma -L_{1}\sigma )\cup (C_{2}\sigma -L_{2}\sigma )}
Example:
Given
C
1
=
{
p
(
x
)
,
q
(
x
)
}
{\displaystyle C_{1}=\{p(x),q(x)\}}
and
C
2
=
{
¬
p
(
a
)
,
r
(
x
)
}
{\displaystyle C_{2}=\{\lnot p(a),r(x)\}}
. After
renaming
C
2
{\displaystyle C_{2}}
into
C
2
=
{
¬
p
(
a
)
,
r
(
y
)
}
{\displaystyle C_{2}=\{\lnot p(a),r(y)\}}
we get the resolvent
{
q
(
a
)
,
r
(
y
)
}
{\displaystyle \{q(a),r(y)\}}
by using the most general unifier
{
x
/
a
}
{\displaystyle \{x/a\}}
.
We often depict resolvent graphically, e.g.
A resolvent of two clauses
C
1
{\displaystyle C_{1}}
and
C
2
{\displaystyle C_{2}}
is one of the
following binary resolvents:
a binary resolvent of
C
1
{\displaystyle C_{1}}
and
C
2
{\displaystyle C_{2}}
a binary resolvent of
C
1
{\displaystyle C_{1}}
and a factor of
C
2
{\displaystyle C_{2}}
a binary resolvent of a factor of
C
1
{\displaystyle C_{1}}
and
C
2
{\displaystyle C_{2}}
a binary resolvent of a factor of
C
1
{\displaystyle C_{1}}
and a factor of
C
2
{\displaystyle C_{2}}
Example:
Given
C
1
=
{
p
(
x
)
,
p
(
f
(
y
)
)
,
r
(
g
(
y
)
)
}
{\displaystyle C_{1}=\{p(x),p(f(y)),r(g(y))\}}
and
C
2
=
{
¬
p
(
f
(
g
(
a
)
)
)
,
q
(
b
)
}
{\displaystyle C_{2}=\{\lnot p(f(g(a))),q(b)\}}
.
A factor of
C
1
{\displaystyle C_{1}}
is
C
1
′
=
{
p
(
f
(
y
)
)
,
r
(
g
(
y
)
)
}
{\displaystyle C_{1}\prime =\{p(f(y)),r(g(y))\}}
. A binary
resolvent of
C
1
′
{\displaystyle C_{1}\prime }
and
C
2
{\displaystyle C_{2}}
and hence also of
C
1
{\displaystyle C_{1}}
and
C
2
{\displaystyle C_{2}}
is
C
3
=
{
r
(
g
(
g
(
a
)
)
)
,
q
(
b
)
}
{\displaystyle C_{3}=\{r(g(g(a))),q(b)\}}
.
The following lemma is used in the completeness proof of resolution.
If
C
1
′
{\displaystyle C'_{1}}
and
C
2
′
{\displaystyle C'_{2}}
are instances of
C
1
{\displaystyle C_{1}}
and
C
2
{\displaystyle C_{2}}
,
respectively, and
C
′
{\displaystyle C'}
is a resolvent of
C
1
′
{\displaystyle C'_{1}}
and
C
2
′
{\displaystyle C'_{2}}
,
then there is a resolvent
C
{\displaystyle C}
of
C
1
{\displaystyle C_{1}}
and
C
2
{\displaystyle C_{2}}
such that
C
′
{\displaystyle C'}
is an instance of
C
{\displaystyle C}
.
Figure 1
A set
S
{\displaystyle S}
of clauses is unsatisfiable iff the empty clause can be
derived from
S
{\displaystyle S}
by resolution.
Proof:
Assume that
S
{\displaystyle S}
is unsatisfiable. Let
A
=
{
A
1
,
A
2
,
…
}
{\displaystyle A=\{A_{1},A_{2},\ldots \}}
be
the ground atom set of
S
{\displaystyle S}
, hence the Herbrand basis. Let
T
{\displaystyle T}
be a
complete binary tree, as given in Figure 2. According to Herbrand's theorem
(version1) there exists a closed finite semantic tree
T
′
{\displaystyle T'}
. There are two cases:
If
T
′
{\displaystyle T'}
consists only of one node (hence the root), The interpretation to be collected from the empty branch in this tree falsifies only the empty clause. Hence the empty clause must be in
S
{\displaystyle S}
.
Assume
T
′
{\displaystyle T'}
consists of more than one node. Then there must be an inference node
N
{\displaystyle N}
in
T
′
{\displaystyle T'}
, hence both its descendants
N
1
{\displaystyle N_{1}}
and
N
2
{\displaystyle N_{2}}
are failure nodes. If such a node would not exist, every node would have at least one non-failure node, which would mean that there is at least an infinite path in
T
′
{\displaystyle T'}
, which would violate, that fact that it is a finite closed semantic tree. Let
N
,
N
1
,
N
2
{\displaystyle N,N_{1},N_{2}}
given as described above; and let
I
(
N
)
=
{
m
1
,
m
2
,
…
,
m
n
}
I
(
N
1
)
=
{
m
1
,
m
2
,
…
,
m
n
,
m
n
,
m
n
+
1
}
I
(
N
2
)
=
{
m
1
,
m
2
,
…
,
m
n
,
m
n
,
¬
m
n
+
1
}
{\displaystyle {\begin{matrix}I(N)&=&\{m_{1},m_{2},\ldots ,m_{n}\}I(N_{1})&=&\{m_{1},m_{2},\ldots ,m_{n},m_{n},m_{n+1}\}I(N_{2})&=&\{m_{1},m_{2},\ldots ,m_{n},m_{n},\lnot m_{n+1}\}\end{matrix}}}
Now, let
C
1
′
{\displaystyle C_{1}'}
and
C
2
′
{\displaystyle C_{2}'}
be ground instances of clauses
C
1
{\displaystyle C_{1}}
and
C
2
{\displaystyle C_{2}}
, such that
C
1
′
{\displaystyle C_{1}'}
is falsified by
I
(
N
1
)
{\displaystyle I(N_{1})}
and
C
2
′
{\displaystyle C_{2}'}
by
I
(
N
2
)
{\displaystyle I(N_{2})}
, such that both are not falsified by
I
(
N
)
{\displaystyle I(N)}
.
Hence we have
¬
m
n
+
1
∈
C
1
′
{\displaystyle \lnot m_{n+1}\in C_{1}'}
and
m
n
+
1
∈
C
2
′
{\displaystyle m_{n+1}\in C_{2}'}
and we can construct the resolvent
C
′
=
(
C
1
′
−
{
¬
m
n
+
1
}
)
∪
(
C
2
′
−
{
m
n
+
1
}
)
{\displaystyle C'=(C_{1}'-\{\lnot m_{n+1}\})\cup (C_{2}'-\{m_{n+1}\})}
C
′
{\displaystyle C'}
must be false in
I
(
N
)
{\displaystyle I(N)}
, because both
(
C
1
′
−
¬
m
n
+
1
)
{\displaystyle (C_{1}'-\lnot m_{n+1})}
and
(
C
2
′
−
m
n
+
1
)
{\displaystyle (C_{2}'-m_{n+1})}
are false in
I
(
N
)
{\displaystyle I(N)}
. According to the Lifting Lemma 5 there exists a resolvent
C
{\displaystyle C}
of
C
1
{\displaystyle C_{1}}
and
C
2
{\displaystyle C_{2}}
, such that
C
′
{\displaystyle C'}
is a ground instance of
C
{\displaystyle C}
. Let
T
″
{\displaystyle T\;''}
be the closed semantic tree for
S
∪
{
C
}
{\displaystyle S\cup \{C\}}
, obtained from
T
′
{\displaystyle T'}
by deleting all nodes below the first node which falsifies
C
′
{\displaystyle C'}
. Note, that
S
{\displaystyle S}
is unsatisfiable if and only if
S
∪
{
C
}
{\displaystyle S\cup \{C\}}
is unsatisfiable. Clearly,
T
″
{\displaystyle T\;''}
has less nodes than
T
′
{\displaystyle T'}
and we now can iterate this process until only the root of the semantic tree is remaining. This, however is only possible if the empty clause
◻
{\displaystyle \square }
is derivable.
For the opposite direction, assume that
◻
{\displaystyle \square }
is derivable by
resolution from
S
{\displaystyle S}
and let
R
1
,
…
,
R
k
{\displaystyle R_{1},\ldots ,R_{k}}
the resolvents
constructed during this process. Assume
S
{\displaystyle S}
is satisfiable and
M
{\displaystyle M}
to be a model for
S
{\displaystyle S}
. From the correctness lemma according to
the propositional case we known, that if a model satisfies two
clauses it also satisfies its resolvent. Therefore
M
{\displaystyle M}
has to satisfy
R
1
,
…
,
R
k
{\displaystyle R1,\ldots ,R_{k}}
; this, however, is impossible, because one of this
resolvents is
◻
{\displaystyle \square }
.
Figure 2
Indicate in each case a derivation of the empty clause with predicate-logical resolution!
{
{
p
(
x
,
0
,
x
)
}
,
{
p
(
x
,
s
(
y
)
,
s
(
z
)
)
,
¬
p
(
x
,
y
,
z
)
}
,
{
¬
p
(
s
(
s
(
s
(
0
)
)
)
,
s
(
s
(
0
)
)
,
u
)
}
}
{\displaystyle \{\{p(x,0,x)\},\{p(x,s(y),s(z)),\lnot p(x,y,z)\},\{\lnot p(s(s(s(0))),s(s(0)),u)\}\}}
{
{
q
(
x
)
,
q
(
s
(
x
)
)
}
,
{
¬
q
(
x
)
,
¬
q
(
s
(
s
(
x
)
)
)
}
}
{\displaystyle \{\{q(x),q(s(x))\},\{\lnot q(x),\lnot q(s(s(x)))\}\}}
(
⋆
{\displaystyle \star }
)
{
{
¬
r
(
x
,
f
(
x
)
,
y
)
,
¬
r
(
x
,
g
(
y
)
,
z
)
}
,
{
r
(
c
,
u
,
i
(
v
)
)
,
r
(
h
(
u
)
,
v
,
j
(
v
)
)
}
}
{\displaystyle \{\{\lnot r(x,f(x),y),\lnot r(x,g(y),z)\},\{r(c,u,i(v)),r(h(u),v,j(v))\}\}}
◻
{\displaystyle \Box }
Show the following Lifting lemma by means of
induction over the term- and formula construction:
Is
F
{\displaystyle F}
a predicate-logical formula, and
I
{\displaystyle {\mathcal {I}}}
a fitting interpretation for
F
{\displaystyle F}
and
F
[
x
/
t
]
{\displaystyle F[x/t]}
. Then
I
(
F
[
x
/
t
]
)
=
I
[
x
/
I
(
t
)
]
(
F
)
,
{\displaystyle {\mathcal {I}}(F[x/t])={\mathcal {I}}_{[x/{\mathcal {I}}(t)]}(F),}
is valid, if
t
{\displaystyle t}
does not contain any variable that
[
x
/
t
]
{\displaystyle [x/t]}
is laced
by the substitution in
F
{\displaystyle F}
.
◻
{\displaystyle \Box }
Compute - if possible - the most general unifier of following sets of clauses:
{
p
(
x
,
a
)
,
p
(
f
(
c
)
,
y
)
}
{\displaystyle \{p(x,a),p(f(c),y)\}}
{
p
(
f
(
x
)
,
a
,
x
)
,
p
(
y
,
z
,
z
)
}
{\displaystyle \{p(f(x),a,x),p(y,z,z)\}}
{
q
(
x
,
x
)
,
q
(
g
(
y
)
,
y
)
}
{\displaystyle \{q(x,x),q(g(y),y)\}}
{
r
(
x
,
x
)
,
r
(
a
,
h
(
y
)
)
}
{\displaystyle \{r(x,x),r(a,h(y))\}}
◻
{\displaystyle \Box }
Determine all direct resolvents of the following pairs of clauses:
{
¬
p
(
x
)
,
q
(
x
,
b
)
}
{\displaystyle \{\lnot p(x),q(x,b)\}}
and
{
p
(
a
)
,
q
(
a
,
b
)
}
{\displaystyle \{p(a),q(a,b)\}}
{
p
(
x
)
,
p
(
f
(
x
)
)
}
{\displaystyle \{p(x),p(f(x))\}}
and
{
¬
p
(
x
)
,
¬
p
(
f
(
f
(
x
)
)
)
}
{\displaystyle \{\lnot p(x),\lnot p(f(f(x)))\}}
{
¬
q
(
c
,
g
(
c
)
)
}
{\displaystyle \{\lnot q(c,g(c))\}}
and
{
¬
p
(
x
)
,
q
(
x
,
x
)
}
{\displaystyle \{\lnot p(x),q(x,x)\}}
{
¬
p
(
x
,
y
,
z
)
,
¬
p
(
y
,
u
,
v
)
,
¬
p
(
x
,
v
,
w
)
,
p
(
z
,
u
,
w
)
}
{\displaystyle \{\lnot p(x,y,z),\lnot p(y,u,v),\lnot p(x,v,w),p(z,u,w)\}}
and
{
p
(
g
(
x
,
y
)
,
x
,
y
)
}
{\displaystyle \{p(g(x,y),x,y)\}}
◻
{\displaystyle \Box }
Compute - if possible - the most general unifier of following sets of clauses:
{
o
(
x
,
x
)
,
o
(
a
,
f
(
y
)
)
}
{\displaystyle \{o(x,x),o(a,f(y))\}}
{
p
(
x
,
a
)
,
p
(
f
(
c
)
,
y
)
}
{\displaystyle \{p(x,a),p(f(c),y)\}}
{
q
(
g
(
x
)
,
a
,
x
)
,
q
(
y
,
z
,
z
)
}
{\displaystyle \{q(g(x),a,x),q(y,z,z)\}}
{
r
(
x
,
x
)
,
r
(
h
(
y
)
,
y
)
}
{\displaystyle \{r(x,x),r(h(y),y)\}}
◻
{\displaystyle \Box }
Determine all direct resolvents of the following pairs of clauses:
{
¬
p
(
x
)
,
¬
p
(
b
)
,
q
(
x
,
b
)
}
{\displaystyle \{\lnot p(x),\lnot p(b),q(x,b)\}}
and
{
p
(
a
)
,
q
(
a
,
b
)
}
{\displaystyle \{p(a),q(a,b)\}}
{
r
(
x
)
,
r
(
f
(
x
)
)
}
{\displaystyle \{r(x),r(f(x))\}}
and
{
¬
r
(
x
)
,
¬
r
(
f
(
f
(
x
)
)
)
}
{\displaystyle \{\lnot r(x),\lnot r(f(f(x)))\}}
{
¬
s
(
c
,
g
(
c
)
)
}
{\displaystyle \{\lnot s(c,g(c))\}}
and
{
s
(
x
,
x
)
,
¬
t
(
x
)
}
{\displaystyle \{s(x,x),\lnot t(x)\}}
◻
{\displaystyle \Box }
Give for the following set of clauses (a) a linear derivation,
(b) a derivation with unit resolution, (c) a further (maximally
short) derivation of the empty clause by means of
predicate-logical resolution!
{
{
¬
e
(
x
)
,
o
(
s
(
x
)
)
}
,
{
¬
e
(
x
)
,
¬
o
(
s
(
x
)
)
,
e
(
s
(
s
(
x
)
)
)
}
,
{
e
(
a
)
}
,
{
¬
o
(
s
(
s
(
s
(
s
(
s
(
a
)
)
)
)
)
)
}
}
{\displaystyle \{\{\lnot e(x),o(s(x))\},\{\lnot e(x),\lnot o(s(x)),e(s(s(x)))\},\{e(a)\},\{\lnot o(s(s(s(s(s(a))))))\}\}}
◻
{\displaystyle \Box }
Indicate in each case a derivation of the empty clause with predicate-logical resolution!
{
{
p
(
x
,
0
,
x
)
}
,
{
p
(
x
,
s
(
y
)
,
s
(
z
)
)
,
¬
p
(
x
,
y
,
z
)
}
,
{
¬
p
(
s
(
s
(
s
(
0
)
)
)
,
s
(
s
(
0
)
)
,
u
)
}
}
{\displaystyle \{\{p(x,0,x)\},\{p(x,s(y),s(z)),\lnot p(x,y,z)\},\{\lnot p(s(s(s(0))),s(s(0)),u)\}\}}
{
{
q
(
x
)
,
q
(
s
(
x
)
)
}
,
{
¬
q
(
x
)
,
¬
q
(
s
(
s
(
x
)
)
)
}
}
{\displaystyle \{\{q(x),q(s(x))\},\{\lnot q(x),\lnot q(s(s(x)))\}\}}
(
⋆
{\displaystyle \star }
)
{
{
¬
r
(
x
,
f
(
x
)
,
y
)
,
¬
r
(
x
,
g
(
y
)
,
z
)
}
,
{
r
(
c
,
u
,
i
(
v
)
)
,
r
(
h
(
u
)
,
v
,
j
(
v
)
)
}
}
{\displaystyle \{\{\lnot r(x,f(x),y),\lnot r(x,g(y),z)\},\{r(c,u,i(v)),r(h(u),v,j(v))\}\}}
◻
{\displaystyle \Box }