I'm writing a SAT Solver in Prolog. Here's what I've been able to come up so far:
cst(true).
cst(false).
is_true(cst(true)).
is_false(cst(false)).
and(A,B) :-
is_true(A),
is_true(B).
or(A,B) :-
is_true(A),
is_false(B).
or(A,B) :-
is_false(A),
is_true(B).
or(A,B) :-
and(A,B).
% not(A) :-
I'm stuck on the not/1. Can anyone give me a clue?
Note that I'm not using Prolog's negation for the interpretation of the logical negation. So I implemented a second predicate is_false(+F) instead, which is true if the formula F is false.
Edit: I meant not/1 in the title, not not/2!