Evaluating expressions

An expression is built from variables, constants and operators (+, -, *, /, %, …).

Once its variables have values it denotes a value; by itself it is neither true nor false.

In even(N) :- num(N), N % 2 = 0, the expression N % 2:

NN % 2
40
51
60
Only inside a comparison, N % 2 = 0, does an expression take part in a true/false test.