Prolog Language Monotonicity Examples of monotonic predicates


Example

Examples of monotonic predicates are:

  • unification with (=)/2 or unify_with_occurs_check/2
  • dif/2, expressing disequality of terms
  • CLP(FD) constraints like (#=)/2 and (#>)/2, using a monotonic execution mode.

Prolog predicates that only use monotonic goals are themselves monotonic.

Monotonic predicates allow for declarative reasoning:

  1. Adding a constraint (i.e., a goal) to a query can at most reduce, never extend, the set of solutions.
  2. Removing a goal of such predicates can at most extend, never reduce, the set of solutions.