tags:

views:

72

answers:

2

I've seen some answers here that use it and I don't know what it means or how to use it. I's also hard to look for it via a search engine :)

+3  A: 

It's the 'not provable' operator. It succeeds if its argument is not provable (and fails if its argument is provable).

Carl Norum
so \+(cat(X)) is the same as not(cat(X)) ?
Juanjo Conti
Yes, it's just a detail of your implementation. This link mentions some examples: http://www.csupomona.edu/~jrfisher/www/prolog_tutorial/2_5.html
Carl Norum
SWI also uses 'not'. I think it's a clearer syntax.
Juanjo Conti
+2  A: 

It's do with negation. \+ Goal will succeed if Goal cannot be proven.

Trevor Tippins
Looks like your backslash got eaten. I stuck it back in there.
Carl Norum
so \+(cat(X)) is the same as not(cat(X)) ?
Juanjo Conti
Yes, it's as Carl says.
Trevor Tippins