✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.
Consider the following Prolog program:
parent_of(john,mary).parent_of(john,peter).parent_of(susan,mary).ancestor_of(X,Y) :- parent_of(X,Y).ancestor_of(X,Y) :- parent_of(X,Z), ancestor_of(Z,Y). The query below produces exactly two answers.
?- ancestor_of(john,Y).