Skip to main content

Lecture 7 Exercises

Laura Kovács

Problem 7.1

Consider the clause set

(1)  ¬p(z,a)¬p(z,x)¬p(x,z)(2)  p(y,a)p(y,f(y))(3)  p(w,a)p(f(w),w)\begin{aligned} (1)\;& \neg p(z,a) \lor \neg p(z,x) \lor \neg p(x,z)\\ (2)\;& p(y,a) \lor p(y,f(y))\\ (3)\;& p(w,a) \lor p(f(w),w) \end{aligned}

where pp is a predicate symbol, ff is a function symbol, x,y,z,wx,y,z,w are variables, and aa is a constant. Give a refutation in the non-ground binary-resolution system BR\mathbb{BR}. For each derived clause, state the premises, the inference rule, and the mgu used.

Solution
  1. Negative factoring on (1) with {xa}\{x \mapsto a\}: (4)  ¬p(z,a)¬p(a,z).(4)\; \neg p(z,a) \lor \neg p(a,z).
  2. Negative factoring on (4) with {za}\{z \mapsto a\}: (5)  ¬p(a,a).(5)\; \neg p(a,a).
  3. Resolve (5) with (2) using {ya}\{y \mapsto a\}: (6)  p(a,f(a)).(6)\; p(a,f(a)).
  4. Resolve (4) with (6) using {zf(a)}\{z \mapsto f(a)\}: (7)  ¬p(f(a),a).(7)\; \neg p\big(f(a),a\big).
  5. Resolve (3) with (7) using {wa}\{w \mapsto a\}: (8)  p(a,a).(8)\; p(a,a).
  6. Resolve (5) with (8) to obtain \square.

Since a contradiction is derived, the original set is unsatisfiable.

Problem 7.2

Let pp be a unary predicate symbol, ff a unary function symbol, x,yx,y variables, and cc a constant. Consider the clauses C1=p(x)p(y)C_1 = p(x) \lor p(y), C2=p(x)C_2 = p(x), and D=p(f(c))D = p(f(c)).

  1. Does C1C_1 subsume DD?
  2. Does C2C_2 subsume DD?

Justify both answers.

Solution
  1. No. Any instance of C1C_1 contains two literals, whereas DD has only one. Therefore no substitution can make C1C_1 a sub-multiset of DD.
  2. Yes. The substitution {xf(c)}\{x \mapsto f(c)\} turns C2C_2 into p(f(c))p(f(c)), which is exactly DD, so C2C_2 subsumes DD.

Problem 7.3

Let xx be a variable, a,b,ca,b,c constants, and ff a unary function symbol. Give a superposition refutation of

{x=f(c),  ab},\{\,x = f(c),\; a \neq b\,\},

using only SUP\mathbb{SUP} inferences (no BR\mathbb{BR}) and ensuring that no inference mixes the symbols {f,c}\{f,c\} with {a,b}\{a,b\} in the same clause. Name every derived clause, cite premises, and record the mgu.

Solution

Treat repeated occurrences of x=f(c)x = f(c) as variants with distinct variables. The derivation:

  1. (1)(1)f(c)=xf(c) = x (axiom)
  2. (2)(2)aba \neq b (axiom)
  3. (3)(3)x=yx = y via superposition of (1) with itself (σ=\sigma = \emptyset)
  4. (4)(4)axa \neq x via superposition of (2) with (3) using {yb}\{y \mapsto b\}
  5. (5)(5)\square via equality resolution on (4) with {xa}\{x \mapsto a\}

As \square is derived, the clause set is unsatisfiable.