Extra Control

!
"!/0 (P) Cut (discard) all choice points made since the parent goal started execution. (The scope of cut in different contexts is discussed in Section [*]).

not P
not/1 (P) If the goal P has a solution, fail, otherwise succeed. It is defined as if by
not(P) :- P, !, fail.
not(_).

P$\tt ->$ Q$\bf ;$
-> /2 (P) Analogous to if P then Q else R, i.e. defined as if by
P -> Q ; R :- P, !, Q.
P -> Q ; R :- R.

P$\tt ->$Q
-> /2 (P) When occurring other than as one of the alternatives of a disjunction, is equivalent to
P -> Q ; fail.

repeat
repeat/0 (L) Generates an infinite sequence of backtracking choices. It is defined by the clauses:
repeat.
repeat :- repeat.

fail
fail/0 (I) Always fails.