Introduction to
Logic Programming
What
versus
How
 

Exercise 6.3 - Query Subsumption


For each of the following pairs of queries, say whether the first query subsumes the second, i.e. whether the set of all answers to the first query contains all of the answers to the second query.

(a) goal(X) :- p(X,Y)
 
  goal(X) :- p(X,a) & p(X,b)
 
(b) goal(X) :- p(X,a)
 
goal(X) :- p(X,Y)
 
(c) goal(X) :- p(X,Y) & p(X,Z)
 
goal(X) :- p(X,b) & q(b)