Tiny examples of problems for otter

Allikas: Kursused
Mine navigeerimisribale Mine otsikasti
set(auto).
set(prolog_style_variables).
set(print_kept).

list(usable).

father(john,pete).
brother(pete,mark).
-brother(X,Y) | brother(Y,X).
-father(X,Y) | parent(X,Y).
-mother(X,Y) | parent(X,Y).
-parent(X,Y) | -parent(Y,Z) | grandparent(X,Z).

-brother(mark,X) | $ans(X).

end_of_list.

and the same using functions and equality

set(auto).
set(prolog_style_variables).
set(print_kept).

list(usable).

father(john)=pete.   
brother(pete,mark).
-brother(X,Y) | brother(Y,X).
parent(X,father(X)).
parent(X,mother(X)).
-parent(X,Y) | -parent(Y,Z) | grandparent(X,Z).

-brother(mark,pete).

end_of_list.