# s(CASP) meets JSON

**URL:** <https://swi-prolog.discourse.group/t/s-casp-meets-json/4600>\
**Category:** Discussion\
**Created:** [October 27, 2021, 8:31am UTC](https://swi-prolog.discourse.group/t/s-casp-meets-json/4600 "2021-10-27T08:31:04Z")\
**Posts on this page:** 2\
**Page:** 2

<div class="post-metadata">

**Author:** ![JasonMorris](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/jasonmorris/32/3824_2.png) [@JasonMorris](https://swi-prolog.discourse.group/u/JasonMorris)\
**Post date:** [November 23, 2021, 5:32pm UTC](https://swi-prolog.discourse.group/t/s-casp-meets-json/4600/35 "2021-11-23T17:32:38Z")

</div>

`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).

---

<div class="post-metadata">

**Author:** ![JasonMorris](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/jasonmorris/32/3824_2.png) [@JasonMorris](https://swi-prolog.discourse.group/u/JasonMorris)\
**Post date:** [November 24, 2021, 11:43pm UTC](https://swi-prolog.discourse.group/t/s-casp-meets-json/4600/37 "2021-11-24T23:43:26Z")

</div>

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.

[Previous page](https://swi-prolog.discourse.group/t/s-casp-meets-json/4600.md?page=1)
