-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBR.txt
22 lines (22 loc) · 1.04 KB
/
BR.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
pere(?X,?Y) :- parent(?X,?Y);homme(?X)
mere(?X,?Y) :- parent(?X,?Y);femme(?X)
fils(?X,?Y) :- enfant(?X,?Y);homme(?X)
fille(?X,?Y) :- enfant(?X,?Y);femme(?X)
grand_pere(?X,?Y) :- grand_parent(?X,?Y);homme(?X)
petit_enfant(?X,?Y) :- grand_parent(?Y,?X)
petit_fils(?X,?Y) :- petit_enfant(?X,?Y);homme(?X)
petite_fille(?X,?Y) :- petit_enfant(?X,?Y);femme(?X)
frere_ou_soeur(?X,?Y) :- pere(?P,?X);pere(?P,?Y);mere(?M,?X);mere(?M,?Y);?X\==?Y
frere(?X,?Y) :- frere_ou_soeur(?X,?Y);homme(?X)
soeur(?X,?Y) :- frere_ou_soeur(?X,?Y);femme(?X)
oncle_ou_tante(?X,?Y) :- parent(?Z,?Y);frere_ou_soeur(?X,?Z)
oncle(?X,?Y) :- oncle_ou_tante(?X,?Y);homme(?X)
tante(?X,?Y) :- oncle_ou_tante(?X,?Y);femme(?X)
cousin_ou_cousine(?X,?Y) :- oncle_ou_tante(?Z,?X);enfant(?Y,?Z)
cousin(?X,?Y) :- cousin_ou_cousine(?X,?Y);homme(?X)
cousine(?X,?Y) :- cousin_ou_cousine(?X,?Y);femme(?X)
ancetre(?X,?Y) :- parent(?X,?Y)
ancetre(?X,?Y) :- parent(?X,?Z);ancetre(?Z,?Y)
parent(?Y,?X) :- enfant(?X,?Y)
grand_parent(?X,?Y) :- parent(?X,?Z);parent(?Z,?Y)
grand_mere(?X,?Y) :- grand_parent(?X,?Y);femme(?X)