% This buffer is for notes you don't want to save.
% If you want to create a file, visit that file with C-x C-f,
% then enter the text in that file's own buffer.

rodic(alfons,vera).
rodic(ema,vera).
rodic(alfons,emil).
rodic(ema,emil).
rodic(jiri,ivana).
rodic(jitka,ivana).
rodic(emil,cyril).
rodic(ivana,cyril).
rodic(bohumil,lenka).
rodic(cyril,zuzana).
rodic(lenka,zuzana).
rodic(cyril,otakar).
rodic(lenka,otakar).

zena(ema).
zena(jitka).
zena(vera).
zena(ivana).
muz(alfons).
muz(jiri).
muz(emil).
muz(bohumil).
muz(cyril).
muz(otakar).

prarodic(Prarodic,Vnouce) :- rodic(Prarodic,Rodic), rodic(Rodic,Vnouce).
vnouce(Vnouce,Prarodic) :- prarodic(Prarodic,Vnouce).
pravnouce(Pravnouce,Praprarodic) :- vnouce(Pravnouce,Prarodic),
    rodic(Praprarodic,Pravnouce).
sourozenec(X,Y) :- rodic(Rodic,X), rodic(Rodic,Y), X \= Y.
bratr(Bratr,Y) :- sourozenec(Bratr,Y), muz(Bratr).
teta(Teta,Y) :- rodic(Rodic,Y), sourozenec(Teta,Rodic), zena(Teta).


