Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- male(jahir).
- male(joual).
- male(joy).
- male(roni).
- male(zayan).
- female(rahela).
- female(ruma).
- female(monni).
- female(faiza).
- female(kashpia).
- female(takia).
- parent(jahir, joual).
- parent(jahir, joy).
- parent(jahir, monni).
- parent(rahela, joual).
- parent(rahela, joy).
- parent(rahela, monni).
- parent(roni, kashpia).
- parent(roni, takia).
- parent(monni, kashpia).
- parent(monni, takia).
- parent(ruma, faiza).
- parent(ruma, zayan).
- parent(joual, faiza).
- parent(joual, zayan).
- father_of(X, Y) :- parent(X, Y), male(X).
- mother_of(X, Y) :- parent(X, Y), female(X).
- brother_of(X, Y) :- father_of(A, X), father_of(A, Y), male(X), X \= Y.
- sister_of(X, Y) :- father_of(A, X), father_of(A, Y), female(X), X \= Y.
- grandfather_of(X, Y) :- parent(X, Z), parent(Z, Y), male(X).
- grandmother_of(X, Y) :- parent(X, Z), parent(Z, Y), female(X).
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement