View source with raw comments or as raw
    1% { ancestor(bob,sam), ancestor(jill,sam), ... }
    2%-parent(bob,Y) :- not father(bob,Y), not mother(bob,Y), not new(bob).
    3%-parent(ted,Z).
    4test(X) :- not test2(X, Y).
    5test(X).
    6test2(X, Y) :- (Y \= 1, not test3(X)).
    7test2(X, 1) :- not test3(X).
    8test3(X) :- not test(X).
    9
   10male(bob).
   11male(bo).
   12male(ben).
   13male(jeff).
   14male(ron).
   15male(tim).
   16male(ray).
   17
   18female(may).
   19female(joy).
   20female(jill).
   21female(kathy).
   22female(ali).
   23female(sam).
   24female(beth).
   25
   26father(bob,jill).
   27father(bob,bo).
   28%father(bob,kathy).
   29%father(bo,ron).
   30father(bo,ali).
   31father(ben,sam).
   32%father(jeff,beth).
   33%father(jeff,tim).
   34%father(jeff,ray).
   35
   36mother(may,jill).
   37mother(may,bo).
   38%mother(may,kathy).
   39%mother(joy,ron).
   40mother(joy,ali).
   41mother(jill,sam).
   42%mother(kathy,beth).
   43%mother(kathy,tim).
   44%mother(kathy,ray).
   45
   46
   47parent(X,Y) :- father(X,Y).
   48parent(X,Y) :- mother(X,Y).
   49
   50grandparent(X,Y):-parent(X,Z),parent(Z,Y).
   51
   52ancestor(X,Y) :- parent(X,Y).
   53ancestor(X,Y) :- parent(X,Z),ancestor(Z,Y).
   54
   55sibling(X,Y):-X\=Y,parent(Z,X),parent(Z,Y).
   56
   57sister(X,Y):-sibling(X,Y),female(X).
   58
   59brother(X,Y):-sibling(X,Y),male(X).
   60
   61cousin(X,Y):-parent(P1,X),parent(P2,Y),P1\=P2.%sibling(P1,P2).
   62
   63hardmath(X) :- X is A+(B*C-(D/E-F)*G)*H.
   64
   65#