While the other answers here are correct, I just wanted to add that you can define thenot(X)
function like so:
not(X) :- \+ X.
Then you can evaluate things like not(true)
or not(1 = 2)
or not(male(X))
just like you wanted to do in your original question.