s(CASP) meets JSON

q(X,Y) is true when there is no evidence that p(X,Y) is true. But there is always evidence that p(X,X) is true, and it unifies with p(X,Y), so the not always fails.

Query ?- ? not q(X,Y). and it will answer X=Y.

You seem to be thinking “if there is only evidence that p holds for two identical things, then there is no evidence that p holds for two different things.” I’m not sure how to express that in s(CASP).

I just tested it, and the results are the same in the Ciao implementation of s(CASP), so if it’s a bug it’s in the original also.