
% http://faculty.otterbein.edu/psanderson/csc326/notes/PrologNotes.html
% wipl from command line
% Inside compiler:
% ['simple2.pl'].
% mother(kay, nancy).
% mother(kay, Who).
% mother(kay, Who). press semicolon for it to continue finding
% wife(iva , Who).
% father(dwight, Who).
% control d to exit

mother(iva, pete).
mother(iva, ed).
mother(iva, becky).
mother(kay, nancy).
mother(kay, bob).
mother(kay, diane).
mother(becky, katie).
husband(dwight, iva).
husband(robert, kay).
husband(pete, nancy).

wife(X,Y) :- husband(Y,X).
father(X,Y) :- husband(X,Z), mother(Z,Y).

