Skip to content

Instantly share code, notes, and snippets.

@jorarmarfin
Last active June 27, 2024 02:44
Show Gist options
  • Save jorarmarfin/e9ef527dc32c7fe0d7ff2ea3651f6a98 to your computer and use it in GitHub Desktop.
Save jorarmarfin/e9ef527dc32c7fe0d7ff2ea3651f6a98 to your computer and use it in GitHub Desktop.
esPadre('LORD THISTLEWICK','LADY NEDEBEL').
esPadre('LORD THISTLEWICK','NEDMOND').
esPadre('LORD THISTLEWICK','SIR NEDERICK').
esPadre('LORD THISTLEWICK','LADY NEDDERLY').
esPadre('NEDMOND','NEDGAR').
esPadre('NEDMOND','JEHOSHAPHAT').
esPadre('SIR NEDERICK','NEDUCHADNEZZAR').
esPadre('SIR NEDERICK','COMMANDER').
esPadre('NEDGAR','NEDWARD').
esPadre('NEDUCHADNEZZAR','NEDSEL').
esPadre('COMMANDER','NEDNA').
esPadre('NEDSEL','NED').
esPadre('NEDSEL','NEDIANA').
esPadre('NED','ROD').
esPadre('NED','TODD').
esMadre('LADY NEDWINA','LADY NEDEBEL').
esMadre('LADY NEDWINA','NEDMOND').
esMadre('LADY NEDWINA','SIR NEDERICK').
esMadre('LADY NEDWINA','LADY NEDDERLY').
esMadre('WILHELMINA','NEDGAR').
esMadre('WILHELMINA','JEHOSHAPHAT').
esMadre('AUGUSTA','NEDUCHADNEZZAR').
esMadre('AUGUSTA','COMMANDER').
esMadre('SOME TRAMP','NEDWARD').
esMadre('WINFRED','NEDSEL').
esMadre('CHARLOTTE','NEDNA').
esMadre('AGNES','NED').
esMadre('AGNES','NEDIANA').
esMadre('MAUDE','ROD').
esMadre('MAUDE','TODD').
esHijo(A,B):- esPadre(B,A).
esHijo(A,B):- esMadre(B,A).
esHermano(A,B):-esHijo(A,C),esHijo(B,C),A\=B.
esTio(A,B):- esHijo(B,C),esHermano(A,C).
esPrimo(A,B):-esPadre(C,A),esPadre(D,B),esHermano(C,D).
esAbuelo(A,B):-esPadre(C,B),esPadre(A,C).
esNieto(A,B):-esAbuelo(B,A).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment