Arithmetic rules can be used to enforce modeling constraints. Many different types of constraints can be modeled, this page show a few of the common types.
For these examples, let
Foo be the binary predicate that we wish to put constraints on.
(Constraints are not limited to only binary predicates.)
A Functional constraint enforces the condition that for each possible constant
the values of all groundings of
Foo(A, c) sum to exactly 1.
Foo(A, +c) = 1 .
Note that the rule is unweighted (as indicated by the period at the end).
Summing the first argument instead of the second one is often called Inverse Functional. There are no semantic differences between functional and inverse functional constraints.
Foo(+c, A) = 1 .
A Partial Functional constraint is like a functional one, except the value of all groundings of
Foo(A, c) sum to 1 or less.
Foo(A, +c) <= 1 .
Partial Inverse Functional
Foo(+c, A) <= 1 .