% File not.pl

% my_not(A) holds if the evaluation of A finitely fails
% This is the way the system connective "not" is defined
% (here we use the name "my_not" to avoid the warning of 
% "redefining a system preedicate")

my_not(A) :- A, !, fail.
my_not(_).

% Sample session

/*
?- consult('not.pl').
not.pl compiled, 0.00 sec, 0 bytes.

Yes
?- my_not(append([],[],[a])).

Yes
?- my_not(5=6). 

Yes
?- my_not(X=6).

No          % the failure here is because X unifies with 6
?- 
*/ 
