Definitions

# Constraint inference

In constraint satisfaction, constraint inference is a relationship between constraints are their consequences. A set of constraints $D$ entails a constraint $C$ if every solution to $D$ is also a solution to $C$. In other words, if $V$ is a valuation of the variables in the scopes of the constraints in $D$ and all constraints in $D$ are satisfied by $V$, then $V$ also satifies the constraint $C$.

Some operations on constraints produce a new constraint that is a consequence of them. Constraint composition operates on a pair of binary constraints $\left(\left(x,y\right),R\right)$ and $\left(\left(y,z\right),S\right)$ with a common variable. The composition of such two constraints is the constraint $\left(\left(x,z\right),Q\right)$ that is satisfied by every evaluation of the two non-shared variables for which there exists a value of the shared variable $y$ such that the evaluation of these three variables satisfies the two original constraints $\left(\left(x,y\right),R\right)$ and $\left(\left(y,z\right),S\right)$.

Constraint projection restricts the effects of a constraint to some of its variables. Given a constraint $\left(t,R\right)$ its projection to a subset $t\text{'}$ of its variables is the constraint $\left(t\text{'},R\text{'}\right)$ that is satisfied by an evaluation if this evaluation can be extended to the other variables in such a way the original constraint $\left(t,R\right)$ is satisfied.

Extended composition is similar in principle to composition, but allows for an arbitrary number of possibly non-binary constraints; the generated constraint is on an arbitrary subset of the variables of the original constraints. Given constraints $C_1,ldots,C_m$ and a list $A$ of their variables, the extended composition of them is the constraint $\left(A,R\right)$ where an evaluation of $A$ satisfies this constraint if it can be extended to the other variables so that $C_1,ldots,C_m$ are all satisfied.