ValuesUnderConstraints/HasInconsistentConstraints - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : ValuesUnderConstraints/HasInconsistentConstraints

ValuesUnderConstraints

  

HasInconsistentConstraints

  

check whether the conjunction of the constraints of a value-under-constraints object is inconsistent

 

Calling Sequence

Parameters

Description

Examples

References

Compatibility

Calling Sequence

HasInconsistentConstraints(vc)

Parameters

vc

-

ValueUnderConstraints

Description

• 

The command HasInconsistentConstraints(vc) checks whether the conjunction of the constraints of vc yields a contradiction, that is, whether or not, the system formed by the constraints of vc is inconsistent. See details below.

Detection of inconsistencies

• 

When a value-under-constraints object is created, a number of simplifications are applied in order to detect whether the conjunction of its constraints yields a contradiction, that is, whether or not this conjunction of constraints is satisfiable.

• 

If a such a contradiction is discovered then printing vc displays the word (inconsistent).

• 

If such a contradiction is not discovered, then calling HasInconsistentConstraints(vc) runs additional checks;

– 

if these prove that the conjunction of constraints is not satisfiable. then true is returned;

– 

if these prove that the conjunction of constraints is satisfiable, then false is returned;

– 

if these additional checks fail to decide whether the conjunction of constraints is satisfiable, then FAIL is returned.

Limitations

• 

If IntegerSymbols(vc) is not empty and different from Symbols(vc), or if IntegerSymbols(vc) is not empty and non-linear constraints are present, then consistency detection is only heuristical and HasInconsistentConstraints(vc) may return FAIL.

Details of consistency detection

• 

If IntegerSymbols(vc) is empty and all constraints are linear, then Fourier-Motzkin elimination is used in order to decide whether the conjunction of the constraints is satisfiable over the real numbers.

• 

If IntegerSymbols(vc) is empty and some constraints are not linear then RegularChains:-RealTriangularize, is used in order to decide whether the conjunction of the constraints is satisfiable over the real numbers.

• 

If a is an integer-valued polynomial of degree 1, then the so-called GCD test is applied. That is, for this polynomial to vanish at an integer point, the GCD of the coefficients of its non-constant terms must divide its constant term.

• 

If IntegerSymbols(vc) is not empty and equal to Symbols(vc), and all constraints are linear, then the command PolyhedralSets:-ZPolyhedralSet:-IsEmpty is used in order to decide whether the conjunction of the constraints is satisfiable over the integer numbers.

• 

If IntegerSymbols(vc) is not empty and different from Symbols(vc), then Fourier-Motzkin elimination is applied to the linear constraints in conjunction to the transformations described for the command ValuesUnderConstraints:-Constraints. If the result shows that the conjunction of the constraints is not satisfiable over the real numbers, then the conjunction of the constraints is clearly inconsistent. However, if the result shows that the conjunction of the linear constraints is satisfiable over the rational numbers, then HasInconsistentConstraints(vc) may return FAIL.

Examples

withValuesUnderConstraints:

Create a value-under-constraints object

vc1ValueUnderConstraintsN24,N,,,N4,5N,,

vc1value N24 when 0<5N&comma;0<N4

(1)

check whether vc1 is inconsistent

HasInconsistentConstraintsvc1

false

(2)

Create another value-under-constraints object which differs from vc1 by the fact that N is declared as integer-valued. Note that vc4 is detected to be inconsistent thanks heuristical methods.

vc2ValueUnderConstraintsN24&comma;N&comma;&comma;&comma;N4&comma;5N&comma;&comma;N

vc2value N24 (inconsistent)

(3)

check whether vc2 is inconsistent, although the answer is known

HasInconsistentConstraintsvc2

true

(4)

Create another value-under-constraints object

vc3ValueUnderConstraints1&comma;a&comma;b&comma;c&comma;&comma;ab&comma;ab&comma;b+c&comma;bc&comma;&comma;

vc3value 1 (inconsistent)

(5)

check whether vc3 is inconsistent

HasInconsistentConstraintsvc3

true

(6)

Create another value-under-constraints object. Note that vc4 is detected to be inconsistent thanks heuristical methods.

vc4ValueUnderConstraints1&comma;a&comma;b&comma;c&comma;&comma;&comma;ab+1&comma;ab&comma;b+c&comma;bc&comma;&comma;a&comma;b&comma;c

vc4value 1 (inconsistent)

(7)

check whether vc4 is inconsistent, although the answer is known

HasInconsistentConstraintsvc4

true

(8)

Create another value-under-constraints object.

vc5ValueUnderConstraintsx&comma;y&comma;x+2y34&comma;x+y78&comma;111x+2411y&comma;

vc5values x&comma;y when 011740y&comma;016y37&comma;07+8x8y&comma;0123x2y&comma;011yx24

(9)

check whether vc5 is inconsistent

HasInconsistentConstraintsvc5

false

(10)

Create another value-under-constraints object which differs from vc5 by the fact that x and y are declared integer-valued.

vc6ValueUnderConstraintsx&comma;y&comma;x+2y34&comma;x+y78&comma;111x+2411y&comma;x&comma;y

vc6values x&comma;y when 011740y&comma;016y37&comma;07+8x8y&comma;0123x2y&comma;011yx24

(11)

check whether vc6 is inconsistent and note that the heuristical methods are not able to discover that the constraints of vc6 are not satisfiable at the time vc6 is created. Only the command HasInconsistentConstraints(vc6) succeeds to accomplish that task.

HasInconsistentConstraintsvc6

true

(12)

References

  

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.

Compatibility

• 

The ValuesUnderConstraints[HasInconsistentConstraints] 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]