parent_of(bill, jim).
parent_of(jane, jim).
parent_of(jim, john).
parent_of(john, fred).

male(bill). male(jim). male(john). male(fred).
female(jane).

father_of(F, C):- parent_of(F, C), male(F).
mother_of(M, C):- parent_of(M, C), female(M).

parents([], []).
parents([P | Ps], [C | Cs]):-
	parent_of(P, C), parents(Ps, Cs).

rel(R, [], []).
rel(R, [X | Xs], [Y | Ys]):-
	Goal =.. [R, X, Y],
	Goal,
	rel(R, Xs, Ys).

prove(Goal):- \+(Goal=true), 
\+(Goal=','(_,_)),
clause(Goal, Body), prove(Body).

prove((Goal1, Goal2)):-
  prove(Goal1), prove(Goal2).
prove(true).

