-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathex20.in
22 lines (14 loc) · 965 Bytes
/
ex20.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
formulas(sos).
% 1. anyone who is on sixth street and is not a police officer has some costume.
(all x ((sixthstreet(x) & -police(x)) -> (exists y (costume(y) & have(x, y))))).
% 2. no cs student is a police officer.
-(exists x (cs(x) & police(x))).
% 3. every costume that is good is a robot costume.
(all x ((costume(x) & good(x)) -> robot(x))).
% 4. for anyone, if they are on sixth street and are happy, then every costume they have is good or they are drunk.
(all x ((sixthstreet(x) & happy(x)) -> ((all y ((costume(y) & have(x,y)) -> good(y))) | drunk(x)))).
end_of_list.
formulas(goals).
% 5. if no cs student is drunk and every cs student on sixth street is happy, then every cs student on sixth street has some costume that is a robot costume.
(-(exists x (cs(x) & drunk(x))) & (all y ((cs(y) & sixthstreet(y)) -> happy(y)))) -> (all z ((cs(z) & sixthstreet(z)) -> (exists u (costume(u) & robot(u) & have(z,u))))).
end_of_list.