-
Notifications
You must be signed in to change notification settings - Fork 0
/
ex10.in
28 lines (18 loc) · 782 Bytes
/
ex10.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
27
28
formulas(sos).
% 1. every child loves every candy.
(all x (child(x) -> (all y (candy(y) -> love(x,y))))).
% 2. anyone who loves some candy is not a nutrition fanatic.
(all x ((exists y (candy(y) & love(x,y))) -> -fanatic(x))).
% 3. anyone who eats any pumpkin is a nutrition fanatic.
(all x ((exists y (pumpkin(y) & eat(x,y))) -> fanatic(x))).
% 4. anyone who buys any pumpkin either carves it or eats it.
(all x (all y ((pumpkin(y) & buy(x,y)) -> (carve(x,y) | eat(x,y))))).
% 5. john buys a pumpkin.
(exists x (pumpkin(x) & buy(john, x))).
% 6. lifesavers is a candy.
candy(lifesavers).
end_of_list.
formulas(goals).
% 7. if john is a child, then john carves some pumpkin.
child(john) -> (exists x (pumpkin(x) & carve(john,x))).
end_of_list.