Examples of monotonic predicates are:
(=)/2
or unify_with_occurs_check/2
dif/2
, expressing disequality of terms(#=)/2
and (#>)/2
, using a monotonic execution mode.Prolog predicates that only use monotonic goals are themselves monotonic.
Monotonic predicates allow for declarative reasoning: