/* simpsons.pl */ parent(P,C) :- child(C,P). % parent is the inverse of child husband(H,W) :- spouse(H,W), male(H). % a husband is a male spouse mother(M,C) :- parent(M,C), female(M). % a mother is a female parent /* some facts about the Simspons */ male(homer). spouse(homer,marge). child(bart, homer). child(maggie,homer). child(lisa, homer). child(lisa, marge). female(marge).