domains name=symbol. predicates mother(name,name). father(name,name). grandfather(name,name). grandmother(name,name). sister(name,name). aunt(name,name). goal grandmother(a,X),write("X=",X),nl, father(b,Y),write("Y=",Y),nl, sister(d,Z),write("Z=",Z),nl, aunt(d,T),write("T=",T). clauses mother(a,c). mother(a,d). mother(c,g). mother(c,f). father(b,c). father(b,d). father(e,g). father(e,f). grandfather(X,Z):-father(X,Z),father(Y,Z). grandmother(X,Z):-mother(X,Y),mother(Y,Z). sister(X,Y):-mother(Z,X),mother(Z,Y). aunt(X,Y):-mother(Z,Y),sister(Z,X).