The way exists_not is defined leads to counterintuitive results, unfortunately.
for instance, suppose we have
neg(rrr(a)).
rrr(c).
ddd(b).
ddd(a).
Then (I am using Terry's Prolog program for exists_not):
| ?- exists_not([],rrr(c)).
no
| ?- exists_not([],rrr(b)).
yes
| ?- exists_not([],rrr(a)).
yes
But:
| ?- exists_not([X],rrr(X)).
X = a;
X = _h165 undefined;
Two things are wrong here:
| ?- exists_not([X],rrr(X)), ddd(X).
X = a;
X = b undefined;
X = a undefined;
Here b is unexpected, but worst of all is that we get X=a twice with different truth values.
I am sure these problems are going to show up in the ATCO theories once we test them on examples with vars in them. In fact, they already showed up in a smaller way, which was the subject of my last week's email to Terry and I later mentioned it to Benjamin.
Anonymous