-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgodfamily.pl
47 lines (41 loc) · 894 Bytes
/
godfamily.pl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
male(zeus).
female(mnemosyne).
female(clio).
female(euterpe).
female(thalia).
female(melpomeni).
female(terpsichore).
female(erato).
female(polymnia).
female(ourania).
female(calliope).
parent(zeus, clio).
parent(zeus, euterpe).
parent(zeus, thalia).
parent(zeus, melpomeni).
parent(zeus, terpsichore).
parent(zeus, erato).
parent(zeus, polymnia).
parent(zeus, ourania).
parent(zeus, calliope).
parent(mnemosyne, clio).
parent(mnemosyne, euterpe).
parent(mnemosyne, thalia).
parent(mnemosyne, melpomeni).
parent(mnemosyne, terpsichore).
parent(mnemosyne, erato).
parent(mnemosyne, polymnia).
parent(mnemosyne, ourania).
parent(mnemosyne, calliope).
father(P, C) :-
parent(P,C),
male(P).
mother(P, C) :-
parent(P, C),
female(P).
is_sibling(C1, C2) :-
mother(X, C1), mother(X, C2), C1\=C2
;
father(X, C1), father(X, C2), C1\=C2.
child(C, P) :-
parent(P, C).