Guest User

Untitled

a guest
Feb 27th, 2020
104
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. woman(dorina).
  2. woman(maria).
  3. woman(ana).
  4. man(marius).
  5. man(mihai).
  6. man(george).
  7. man(andrei).
  8. parent(maria,ana).
  9. parent(maria,andrei).
  10. parent(george,ana).
  11. parent(george,andrei).
  12. parent(marius,maria).
  13. parent(dorina,maria).
  14. parent(mihai,george).
  15. mother(X,Y):-woman(X), parent(X,Y).
  16. father(X,Y):-man(X), parent(X,Y).
  17. sibling(X,Y):-parent(Z,X), parent(Z,Y), X\=Y.
  18. brother(X,Y):-sibling(X,Y), man(X).
  19. uncle(X,Y):-brother(X,Z), parent(Z,Y).
  20. grandmother(X,Y):-mother(X,Z), parent(Z,Y).
  21. grandfather(X,Y):-father(X,Z), parent(Z,Y).
  22. ancestor(X,Y):-parent(X,Y).
  23. ancestor(X,Y):-parent(Z,Y), ancestor(X,Z).
RAW Paste Data