Beware: you probably mean and/3instead and/2. And it is a triple predicate that defines the relationship between truth values 3 , not 2. Of course, instead of reifying (= making things explicit), you can use the built-in Prolog mechanism, where the truth value is implicit. But for starters, I would start with a triple relationship, since this makes all the truth values ββclear and also allows you to ask, for example: "What truth values ββgive falsefor this operation?" To get started, one entry in the truth table and/3, where I use the atom trueto denote the logical value true:
and(true, true, true).
, , , , SICStus Prolog GNU Prolog .
library(clpb) SICStus Prolog:
| ?- sat(X*Y =:= T), X = 0.
X = 0,
T = 0 ?
, , . , , , CLP (B) SICStus Prolog, , , taut/2
| ?- taut(A*B =:= B*A, T).
T = 1 ?
, library(clpb):
| ?- sat(a*b =:= b*a).
yes
, .