✅ Перевірена відповідь на це питання доступна нижче. Наші рішення, перевірені спільнотою, допомагають краще зрозуміти матеріал.
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).