9
Exercise 2 We can use the rules for every woman and rewrite the rules for John in the same fashion: i.e. as a generalized quantifier: –qnp(M) --> q(M), n(P), {predicate1(M,P)}. –q((findall(_X,_P1,L1),findall(_Y,_P2,L2),subset(L1,L2))) --> [every]. –n(woman(_)) --> [woman]. For example, we can write something like: –namenp((findall(X,P,L1),findall(_Y,_P2,L2),subset(L1,L2))) --> name(P), {saturate1(P,X)}. –name(john(_)) --> [john]. Then use this in the grammar: –s(M) --> namenp(M), vp(P), {predicate2(M,P)}. Query: –?- s(M,[john,likes,ice,cream],[]). –M = findall(_A,john(_A),_B),findall(_C,likes(_C,ice_cream),_D),subset(_B,_D)

11
Exercise 2 One tool: –predicate1((findall(X,P,_),_),P) :- saturate1(P,X). can be used to extract the first predicate You also have: –predicate2((_,(findall(X,P,_),_)),P) :- saturate1(P,X). You could easily write a predicate3 rule –note: 3rd predicate is not a findall... Then you could write a NP conjunction rule like –conjnp(((P1a,P1b,union(L1a,L1b,L1)),P2,P3)) --> qnp(M1), [and], namenp(M2), {... prolog code to pick out and instantiate P1a etc... from M1 and M2}

12
Exercise 3 Other quantifiers can also be expressed using set relations between two predicates: Example: no: {X: P 1 (X)} ∩ {Y: P 2 (Y)} = ∅ ∩ = set intersection ∅ = empty set no man smokes {X: man(X)} ∩ {Y: smokes(Y)} = ∅ should evaluate to true for all possible worlds where there is no overlap between men and smokers men smokers