at(Ag,Pos) <= sitting_at(Ag,Pos).
adjacent(P_1,P_2) <=
between(Door,P_1,P_2) &
unlocked(Door).
between(door1,o103,lab2) <= true.
primitive(unlocked(D)).
primitive(sitting_at(A,P)).
primitive(carrying(A,O)).
Write a meta-interpreter reduce_prove(L0,L1) that, given a list
L0 of atoms, reduces them to a list L1 of primitive
atoms that, given the knowledge base, implies the elements of L0.
For example, the query
returns with one answer with L=[carrying(rob,parcel),unlocked(door1),sittingat(rob,o103)]. Note that this operation was assumed in the regression planner.ask reduce_prove([at(rob,P),adjacent(P,lab2),carrying(rob,parcel)],L).