son(S,P) :- parent(P,S), male(S). daughter(D,P) :- parent(P,D), female(D).
Of course the variable names don't matter as long as they're consistent.