Hello. Please help solve the problem:
In the Prolog database there are facts like:
родитель(Марья, Петр). родитель(Марья, Иван). и т.д. Запрос к базе данных имеет вид ?-q(X, Y). The value of the 1st argument is one of the chains of the form:
[Кто, брат, Ивана, '?'] [Чей, брат, Пётр, '?'] [Иван, брат, Петра, '?'] At the output you need to get: Y = Пётр, Y = Иван, Y = yes