ValuesUnderConstraints
Constraints
return the constraints of a value-under-constraints object
Calling Sequence
Parameters
Description
Examples
References
Compatibility
Constraints(vc)
vc
-
ValueUnderConstraints
The command Constraints(vc) returns as a list the constraints of vc
Assumptions
The constraints of a value-under-constraints object are interpreted as the conjunction of predicates, where each predicate is a binary relation over the ring of polynomials with variables in Symbols(vc) and with rational number coefficients.
The binary relations currently supported are of the form a = b, a <> b, a > b and a >= b, where a and b are polynomials with variables in Symbols(vc) and with rational number coefficients.
Normalization of constraints
The constraints a = b, a <> b, a > b and a >= b are automatically simplified so that b is always zero. As a consequence a is called the defining polynomial of the constraint. Moreover, inequalities of the form a > 0 and a >= 0 are called positive and non-negative, respectively.
We list below some of the transformations that are applied to the constraints of a value-under-constraints object, when this object is created.
If the variables of a defining polynomial a all belong to IntegerSymbols(vc) then we say that a is integer-valued; if this the case and if the inequality a > 0 is a constraint of the value-under-constraints object vc, then this inequality is automatically replaced by an equivalent non-negative inequality.
If a <> 0 and a >= 0 are constraints of vc, then they are automatically replaced by a > 0. Similarly, if a <> 0 and -a >= 0 are constraints of vc, then they automatically replaced by -a > 0.
If a is an integer-valued polynomial, then a = 0 is replaced by the conjunction of a >= 0 and -a >= 0. If a >= 0 and -a >= 0 are constraints of vc, and a is not an integer-valued polynomial, then these constraints are replaced by a = 0.
If a is an integer-valued polynomial, and both a > 0 and 1 -a >= 0 appear both in vc when it is defined, then these two constraints are replaced by a - 1 = 0, that is, a = 1.
If a is an integer-valued polynomial, and both a > 0 and 2 -a > 0 appear both in vc when it is defined, then these two constraints are replaced by a - 1 = 0, that is, a = 1.
An important consequence of these transformations is that, if every defining polynomial is integer-valued, then every constraint is either a non-negative inequality or an inequation.
with⁡ValuesUnderConstraints:
Create a value-under-constraints objects with no integer-valued symbol
vc1≔ValueUnderConstraints⁡1,a,b,c,d,a,b,c,d,∅
vc1≔value 1 when a=0,d≠0,0<c,0≤b
Print its value, its constraints, its symbols and its integer-valued symbols
Value⁡vc1;Constraints⁡vc1;Symbols⁡vc1;IntegerSymbols⁡vc1
1
a=0,d≠0,0<c,0≤b
a,b,c,d
∅
Create another value-under-constraints objects where all symbols are integer-valued
vc2≔ValueUnderConstraints⁡2,a,b,c,d,a,b,c,d,a,b,c,d
vc2≔value 2 when a=0,d≠0,0≤b,0≤c−1
Value⁡vc2;Constraints⁡vc2;Symbols⁡vc2;IntegerSymbols⁡vc2
2
a=0,d≠0,0≤b,0≤c−1
Rui-Juan Jing, Yuzhuo Lei, Christopher F. S. Maligec, Marc Moreno Maza: "Counting the Integer Points of Parametric Polytopes: A Maple Implementation." Proceedings of Computer Algebra in Scientific Computing - 26th International Workshop (CASC) 2024: 140-160, Lecture Notes in Computer Science, vol. 14938, Springer.
The ValuesUnderConstraints[Constraints] command was introduced in Maple 2025.
For more information on Maple 2025 changes, see Updates in Maple 2025.
See Also
ValuesUnderConstraints[Constraints]
ValuesUnderConstraints[Equations]
ValuesUnderConstraints[HasInconsistentConstraints]
ValuesUnderConstraints[Inequations]
ValuesUnderConstraints[IntegerSymbols]
ValuesUnderConstraints[NonNegativeInequalities]
ValuesUnderConstraints[PositiveInequalities]
ValuesUnderConstraints[Symbols]
ValuesUnderConstraints[Value]
ValuesUnderConstraints[ValueUnderConstraints]
Download Help Document