test :- a, fail. test :- ( a -> writeln('a is true') ; writeln('a is false') ), ( b -> writeln('b is true') ; writeln('b is false') ), ( f -> writeln('f is true') ; writeln('f is false') ). %------------------------------ :- table a/0, b/0, f/0. a :- f. a. b :- tnot(f). f :- a, fail.