/* CS 1621 Fall 2005 Simple example of a Prolog program. Note the "propositional" nature of the language. The assertion succeeds or fails based on the data (atoms) stored. */ cousin(X,Y) :- X \== Y, parent(P1,X), parent(P2,Y), sibling(P1,P2). parent(X,Y) :- mother(X,Y). parent(X,Y) :- father(X,Y). sibling(X,Y) :- X \== Y, parent(P,X), parent(P,Y). mother(mary, irving). mother(mary, martha). mother(martha, fred). mother(martha, jethro). father(herb, irving). father(herb, ingmar). father(irving, mitch). father(irving, amy). father(ingmar, slim).