-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathex08.in
26 lines (17 loc) · 862 Bytes
/
ex08.in
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
formulas(sos).
% 1. every child loves anyone who gives the child any present.
(all x (child(x) -> (all y (givepresent(y, x) -> love(x,y))))).
% 2. every child will be given some present by santa if santa can travel on christmas eve.
(all x (child(x) -> (travel(santa, xmas) -> givepresent(santa, x)))).
% 3. it is foggy on christmas eve.
foggy(xmas).
% 4. anytime it is foggy, anyone can travel if he has some source of light.
(all x (foggy(x) -> (all y (haslight(y) -> travel(y, x))))).
% 5. any reindeer with a red nose is a source of light.
% (anyone who has a reindeer with a red nose has a source of light)
(all x (hasdeer(x) -> haslight(x))).
end_of_list.
formulas(goals).
% 6. if santa has some reindeer with a red nose, then every child loves santa.
hasdeer(santa) -> (all x (child(x) -> love(x, santa))).
end_of_list.