Skip to main content

Lecture 8 Exercises

Laura Kovács

Problem 8.1

Let ff be unary, gg binary, a,b,ca,b,c constants, and x,y,zx,y,z variables. The weight function satisfies w(s)=1w(s) = 1 for every symbol and variable, and the precedence is gfcbag \gg f \gg c \gg b \gg a. Using KBO (extended to literals/clauses), answer:

  1. Do C1C_1 and C2C_2 make C3C_3 redundant? C1:abf(a)aC2:f(f(x))=aC3:f(f(b))bf(a)a\begin{aligned} C_1 &: a \neq b \lor f(a) \neq a\\ C_2 &: f(f(x)) = a\\ C_3 &: f(f(b)) \neq b \lor f(a) \neq a \end{aligned}
  2. Does C4C_4 make C5C_5 redundant? C4:f(g(x,a))f(y)C5:f(g(x,z))f(g(y,b))f(g(x,b))f(g(a,b))\begin{aligned} C_4 &: f\big(g(x,a)\big) \neq f(y)\\ C_5 &: f\big(g(x,z)\big) \neq f\big(g(y,b)\big) \lor f\big(g(x,b)\big) \neq f\big(g(a,b)\big) \end{aligned}
  3. Does C6C_6 make C7C_7 redundant? C6:g(x,y)f(x)C7:g(f(x),f(z))f(f(x))g(a,b)c\begin{aligned} C_6 &: g(x,y) \neq f(x)\\ C_7 &: g(f(x),f(z)) \neq f(f(x)) \lor g(a,b) \neq c \end{aligned}
Solution
  1. Yes. Clause C3C_3 is ground. Instantiating C2C_2 with {xb}\{x \mapsto b\} yields f(f(b))=af(f(b)) = a, and together with ground C1C_1 these clauses entail C3C_3. Both supporting clauses are strictly smaller than C3C_3 under KBO, so every ground instance of C3C_3 (namely C3C_3 itself) is redundant.
  2. Yes. The ground instance f(g(a,a))f(g(a,a))f(g(a,a)) \neq f(g(a,a)) of C4C_4 lies in C4C_4^*, is unsatisfiable, and is smaller than any ground instance of C5C_5. Therefore each ground instance of C5C_5 is redundant with respect to C4C_4^*.
  3. Yes. Renaming zz to yy shows g(f(x),f(z))f(f(x))g(f(x),f(z)) \neq f(f(x)) is an instance of g(x,y)f(x)g(x,y) \neq f(x). For any ground instance of C7C_7, the literal g(f(s),f(t))f(f(s))g(f(s),f(t)) \neq f(f(s)) is implied by the corresponding ground instance of C6C_6 and is strictly smaller than the full clause, so C6C_6 renders C7C_7 redundant.

Problem 8.2

Consider the inference (in SUP\mathbb{SUP}, no BR\mathbb{BR}):

x=f(c)p(x)f(h(b))=h(g(y,y))h(g(d,b))f(c)p(h(g(d,b)))f(h(b))=h(g(y,y))\frac{x = f(c) \lor p(x)\qquad f(h(b)) = h(g(y,y)) \lor h(g(d,b)) \neq f(c)}{p\big(h(g(d,b))\big) \lor f(h(b)) = h(g(y,y))}

with predicate symbol pp, function symbols f,g,hf,g,h, constants b,c,db,c,d, and variables x,yx,y.

  1. Prove the inference is sound.
  2. Is it a simplifying inference of SUP\mathbb{SUP} for some KBO? Justify.
Solution
  1. Let MM satisfy both premises. If Mf(h(b))=h(g(y,y))M \models f(h(b)) = h(g(y,y)), the conclusion is immediate. Otherwise the second premise forces Mh(g(d,b))f(c)M \models h(g(d,b)) \neq f(c), which combined with the first premise yields Mp(h(g(d,b)))M \models p\big(h(g(d,b))\big), again making the conclusion true. Hence the inference is sound.

  2. No. A simplifying inference would make at least one premise redundant given the other premise and the conclusion. However:

    • Model M1M_1 with domain {a,b}\{\mathsf a,\mathsf b\}, interpreting pp as false everywhere and all f,g,hf,g,h results as a\mathsf a, satisfies C2C_2 and the conclusion but not C1C_1.
    • Model M2M_2 with domain {b,c,d,f,g,h}\{\mathsf b,\mathsf c,\mathsf d,\mathsf f,\mathsf g,\mathsf h\}, interpreting pp as the entire domain and assigning f,g,hf,g,h as in the LaTeX solution, satisfies C1C_1 and the conclusion but not C2C_2.

    Therefore neither premise becomes redundant, so the inference is not simplifying for any KBO.

Problem 8.3

Consider the superposition inference (with lθ=ll\theta = l' and l=tl'=t selected):

l=rl=tD(rθ=t)D\frac{l = r \qquad l' = t \lor D}{(r\theta = t) \lor D}

subject to lrl \succ r, ltl' \succ t, rθtr\theta \succ t, (l=r)θD(l = r)\theta \succ D, (l=t)D(l' = t) \succ D, and a well-behaved selection function.

  1. Is (rθ=t)Dl=tD(r\theta = t) \lor D \succ l' = t \lor D always true?
  2. Does l=tDl' = t \lor D necessarily become redundant after applying the inference?
Solution
  1. No. Because \succ is a simplification ordering, lrl \succ r implies lθrθl\theta \succ r\theta. Since lθ=ll\theta = l', we obtain lrθl' \succ r\theta. Multiset extension then gives l=tDrθ=tDl' = t \lor D \succ r\theta = t \lor D, so the conclusion is strictly smaller, not larger.
  2. No. Redundancy would require that every ground instance of l=tDl' = t \lor D be entailed by smaller ground instances from the premises. When l,r,tl,r,t are ground, we have l=ll = l' and, because rθ=tr\theta = t is smaller, l=rl=tl = r \succ l' = t. Hence l=tDl' = t \lor D is not larger than l=rl = r, contradicting the ordering requirement for redundancy. Thus the premise need not become redundant.

Problem 8.4

In SUP\mathbb{SUP} (with BR\mathbb{BR}), consider

f(a,b)g(x)f(x,y)=g(a)f(y,b)=g(y)f(x,a)=g(x)f(y,y)=g(z)f(a,a)=g(a)\frac{f(a,b) \neq g(x) \lor f(x,y) = g(a) \qquad f(y,b) = g(y) \lor f(x,a) = g(x) \lor f(y,y) = g(z)}{f(a,a) = g(a)}

where f,gf,g are function symbols, x,y,zx,y,z variables, and a,ba,b constants.

  1. Prove the inference is sound.
  2. Is it simplifying for any KBO? Justify.
Solution
  1. Instantiate both premises with θ={xa,ya}\theta = \{x \mapsto a, y \mapsto a\}. Binary resolution yields f(a,a)=g(a)f(a,a)=g(a)f(a,a)=g(z)f(a,a) = g(a) \lor f(a,a) = g(a) \lor f(a,a) = g(z). Two applications of equality factoring generate f(a,a)=g(a)g(a)g(a)f(a,a) = g(a) \lor g(a) \neq g(a) and then f(a,a)=g(a)g(a)g(a)g(a)g(a)f(a,a) = g(a) \lor g(a) \neq g(a) \lor g(a) \neq g(a). Two equality-resolution steps reduce this to f(a,a)=g(a)f(a,a) = g(a). Therefore the conclusion follows by sound SUP\mathbb{SUP} rules, so the inference is sound.
  2. No. A simplifying inference would make at least one premise redundant. Consider:
    • Model I1I_1 with domain {a,b}\{a,b\}, interpreting f(x,a)=xf(x,a) = x, f(x,b)=bf(x,b) = b, and g(x)=xg(x) = x. Then I1f(a,a)=g(a)I_1 \models f(a,a) = g(a) and I1f(x,a)=g(x)I_1 \models f(x,a) = g(x), so I1I_1 satisfies the second premise and the conclusion, but I1⊭f(a,b)g(x)f(x,y)=g(a)I_1 \not\models f(a,b) \neq g(x) \lor f(x,y) = g(a) for {xb,yb}\{x \mapsto b, y \mapsto b\}; hence the first premise is not redundant.
    • Model I2I_2 with domain {a,b}\{a,b\}, interpreting f(x,y)=af(x,y) = a and g(x)=xg(x) = x. Then I2I_2 satisfies the first premise and the conclusion but falsifies the second premise for {xb,yb,zb}\{x \mapsto b, y \mapsto b, z \mapsto b\}. Therefore the second premise is not redundant either.

Thus the inference is not simplifying under any KBO.