# Properties related to cardinality and exact solutions

These properties are part of the native_props library.

## Documentation on exports

Usage:cardinality(Goal,Lower,Upper)

Goal has a number of solutions between Lower and Upper.

• The following properties should hold globally:
cardinality(Goal,Lower,Upper) is not checked during run-time checking.
Meta-predicate with arguments: cardinality(goal,?,?).

Usage 1:num_solutions(X,N)

Calls of the form X have N solutions, i.e., N is the cardinality of the solution set of X.

• If the following properties should hold at call time:
X is a term which represents a goal, i.e., an atom or a structure.
N is an integer.

Usage 2:num_solutions(Goal,Check)

For a call to Goal, Check(X) succeeds, where X is the number of solutions.

• If the following properties should hold at call time:
Goal is a term which represents a goal, i.e., an atom or a structure.
Check is a term which represents a goal, i.e., an atom or a structure.

PROPERTYrelations/2
relations(X,N)

Calls of the form X produce N solutions, i.e., N is the cardinality of the solution set of X.

Usage:relations(X,N)

Goal X produces N solutions.

• If the following properties should hold at call time:
X is a term which represents a goal, i.e., an atom or a structure.
N is an integer.
then the following properties should hold globally:
The runtime check of this property is unimplemented.
Meta-predicate with arguments: relations(goal,?).

finite_solutions(X)

Calls of the form X produce a finite number of solutions [DLGH97].

Usage:finite_solutions(X)

All the calls of the form X have a finite number of solutions.

• The following properties should hold globally:
finite_solutions(X) is not checked during run-time checking.
Meta-predicate with arguments: finite_solutions(goal).

PROPERTYsolutions/2

Usage:solutions(Goal,Sols)

Goal Goal produces the solutions listed in Sols.

• If the following properties should hold at call time:
Goal is a term which represents a goal, i.e., an atom or a structure.
Sols is a list.

## Documentation on imports

This module has the following direct dependencies: