How to write "a implies b or c" in Prolog
How can I write the following in Prolog?
a -> b V c In English, it will be a implies that b or c (or both)
I'm not quite sure what you want to do with this implies a statement. But I would have thought that it would be enough (remember that this is SICStus not swi, but at this low level I think it is all the same).
predicate(a, b). predicate(a, c). ?- predicate(a, Then). Then = b ; Then = c ; no ?- predicate(x, Then). no You can do more complex checks to make sure that it is never an unrelated value (to prevent predicate(If, b) . True), but if you are not building a huge application, I am sure that good documentation will be enough.
Logically, "b or c" is the same as "b or c (or both)"
Here you can read about the logical operators in Prolog: http://rigaux.org/language-study/syntax-across-languages-per-language/Prolog.html
Can you explain a little more what you are trying to do with βimpliesβ?