Talk:Racer

Regarding Negation
I notice that it's been a while since last update on this page, but thought you could add this little tidbit anyway.

Unsolved task: How can we retrieve "all places not located in de"?

The first solution that came to mind was this: (retrieve (?X) (and (neg (?X de located)) (?X place))) (((?X fr))     ((?X de))      ((?X bremen))      ((?X paris))      ((?X berlin))      ((?X iub))) But this gives us lots of unwanted positives. Bremen is in fact located in de, so why does it show?

I think the reason for this can be seen if we ask what I believe to be an equivalent query: (retrieve (?X ?Y) (and (neg (and (?X ?Y located) (= ?Y de))) (?X place))) > (((?X fr) (?Y beate))           ....      ((?X bremen) (?Y beate))       ((?X bremen) (?Y paris))            ....      ((?X fr) (?Y hans))      ((?X fr) (?Y bremen))            ....      ((?X de) (?Y berlin))      ((?X de) (?Y hans))            ....

Bremen shows because it's not not located in Paris or Beate. In our original query we thought we asked for the negation of a set, but in reality we asked for the negation of a set of ordered pairs (?X ?Y) such that ?Y=de. (bremen,beate) is not in this set. The reason we don't see the pairs to begin with is because ?X is the only value we asked for.

To get the desired result, we have to "ask for ?X" before we do the negation. Like this: (retrieve (?X) (and (neg (project-to (?X) (?X de located))) (?X place))) --Seymore 16:53, 28 November 2007 (CET)