ValuesUnderConstraints
MakeCaseDiscussion
return a list of valuesUnderConstraints objects whose domains are pairwise disjoint
Calling Sequence
Parameters
Description
Examples
References
Compatibility
MakeCaseDiscussion(lvc)
MakeCaseDiscussion(lvc, outopt)
lvc
-
list of ValueUnderConstraints objects
outopt
(optional) equation, either output = piecewise or output = list
The command MakeCaseDiscussion(lvc) returns a list lwd of value-under-constraints objects so that lwd is a case discussion and lwd refines lvc.
By including the option output = piecewise, you instruct the command to return the result as a piecewise expression instead. You can explicitly select the default list output by passing the option output = list.
Remarks
In broad terms, the goal of MakeCaseDiscussion(lvc) is to refine lvc into an equivalent list of value-under-constraints objects whose domains are non-empty and pairwise disjoint.
By equivalent, we mean that the union of the binary relations encoded by lvc is equal to the union of the binary relations encoded by MakeCaseDiscussion(lvc)
For the interpretation of value-under-constraints object as binary relation, see the terminology section below.
More details about constraints are described in the help page of the command Constraints. In particular, the constraints of a value-under-constraints object are interpreted as a conjunction of predicates, where each predicate is a binary relation applied to polynomial expressions.
Moreover, when a value-under-constraints object vc is created, a number of simplification rules are applied to its constraints. These rules are described in the help page of the command Constraints.
One objective of the application of these rules is to check whether the conjunction of the constraints of vc is satisfiable or not, that is, whether they form a consistent system.
More details about consistency checks are described in the help page of the command HasInconsistentConstraints.
Terminology
Mathematically, a value-under-constraints object vc is an ordered pair (v,c) where v is a finite set, called the value of vc, and c is a set of Boolean functions defined on some set A, and called the constraints of vc. The set c is regarded as the conjunction of these constraints.
We write the domain of vc for the subset of A on which all constraints of vc are true.
If the domain of vc is not empty, then We say that vc is consistent, otherwise we say that it is inconsistent.
We say that a finite number of value-under-constraints objects is a case discussion whenever their domains form a partition of some set A, that is, whenever their domains are non-empty and pairwise disjoint.
Let wd be a second value-under-constraints object with value w and constraints d. We say that wd refines vc whenever the domain of wd is contained in the domain of vc and the value of wd contains the value of vc.
Let lvc and lwd be two lists of value-under-constraints objects. We say that lwd refines lvc whenever the following conditions hold:
for every value-under-constraints object wd in lwd there exists at least one value-under-constraints object vc in lvc that wd refines;
for every value-under-constraints object vc of lvc there exists a number of value-under-constraints objects in lwd refining vc and such that the union of their domains is equal to the domain of vc
the value of every value-under-constraints object wd in lwd is the union of the values of the value-under-constraints objects in lvc that wd refines
Assume from now on that the value v of the value-under-constraints object vc consists of functions which (1) are defined on A, the set on which constraints of vc are defined, and (2) take value in a set B. Then, the value-under-constraints object vc naturally defines a binary relation from A to B as the set of all pairs (x,y) where x belongs to the domain of vc and y is the image of x by one of the functions of v.
This interpretation in terms of binary relation helps understanding the concept of a value-under-constraints object. In particular, it helps understanding why the value of such an object is a set.
with⁡ValuesUnderConstraints:
Create a value-under-constraints object
vc1≔ValueUnderConstraints⁡1,a,b,c,d,e,f,g,h,,a,b,c,d,,a,b,c,d,e,f,g,h
vc1≔value 1 when 0≤a,0≤b,0≤c−1,0≤d−1
Create another value-under-constraints object
vc2≔ValueUnderConstraints⁡2,a,b,c,d,e,f,g,h,,e,f,g,h,,a,b,c,d,e,f,g,h
vc2≔value 2 when 0≤e,0≤f,0≤g−1,0≤h−1
Apply PairCompare.
PairCompare⁡vc1,vc2
value 1 when 0≤a,0≤b,0≤c−1,0≤d−1,0≤−e−1,value 1 when 0≤a,0≤b,0≤e,0≤c−1,0≤d−1,0≤−f−1,value 1 when 0≤a,0≤b,0≤e,0≤f,0≤−g,0≤c−1,0≤d−1,value 1 when 0≤a,0≤b,0≤e,0≤f,0≤−h,0≤c−1,0≤d−1,0≤g−1,values 1,2 when 0≤a,0≤b,0≤e,0≤f,0≤c−1,0≤d−1,0≤g−1,0≤h−1,value 2 when 0≤e,0≤f,0≤−a−1,0≤g−1,0≤h−1,value 2 when 0≤a,0≤e,0≤f,0≤−b−1,0≤g−1,0≤h−1,value 2 when 0≤a,0≤b,0≤e,0≤f,0≤−c,0≤g−1,0≤h−1,value 2 when 0≤a,0≤b,0≤e,0≤f,0≤−d,0≤c−1,0≤g−1,0≤h−1
Applying MakeCaseDiscussion on the list [vc1, vc2] provides the same result. We can use the output option to display the result.
MakeCaseDiscussion⁡vc1,vc2
MakeCaseDiscussion⁡vc1,vc2,output=piecewise
10≤a∧0≤b∧0≤c−1∧0≤d−1∧0≤−e−110≤a∧0≤b∧0≤e∧0≤c−1∧0≤d−1∧0≤−f−110≤a∧0≤b∧0≤e∧0≤f∧0≤−g∧0≤c−1∧0≤d−110≤a∧0≤b∧0≤e∧0≤f∧0≤−h∧0≤c−1∧0≤d−1∧0≤g−11,20≤a∧0≤b∧0≤e∧0≤f∧0≤c−1∧0≤d−1∧0≤g−1∧0≤h−120≤e∧0≤f∧0≤−a−1∧0≤g−1∧0≤h−120≤a∧0≤e∧0≤f∧0≤−b−1∧0≤g−1∧0≤h−120≤a∧0≤b∧0≤e∧0≤f∧0≤−c∧0≤g−1∧0≤h−120≤a∧0≤b∧0≤e∧0≤f∧0≤−d∧0≤c−1∧0≤g−1∧0≤h−1
Consider now four value-under-constraints objects
vc5≔ValueUnderConstraints⁡3,a,b,c,d,a,b,c,d,a,b,c,d
vc5≔value 3 when a=0,d≠0,0≤b,0≤c−1
vc6≔ValueUnderConstraints⁡4,a,b,c,d,b,c,d,a,a,b,c,d
vc6≔value 4 when b=0,a≠0,0≤c,0≤d−1
vc7≔ValueUnderConstraints⁡5,a,b,c,d,c,d,a,b,a,b,c,d
vc7≔value 5 when c=0,b≠0,0≤d,0≤a−1
vc8≔ValueUnderConstraints⁡6,a,b,c,d,d,a,b,c,a,b,c,d
vc8≔value 6 when d=0,c≠0,0≤a,0≤b−1
Apply MakeCaseDiscussion to verify that they form a case discussion. As this produces the same four objects, the verification is successful.
MakeCaseDiscussion⁡vc5,vc6,vc7,vc8
value 3 when a=0,d≠0,0≤b,0≤c−1,value 4 when b=0,a≠0,0≤c,0≤d−1,value 5 when c=0,b≠0,0≤d,0≤a−1,value 6 when d=0,c≠0,0≤a,0≤b−1
MakeCaseDiscussion⁡vc5,vc6,vc7,vc8,output=piecewise
3a=0∧d≠0∧0≤b∧0≤c−14b=0∧a≠0∧0≤c∧0≤d−15c=0∧b≠0∧0≤d∧0≤a−16d=0∧c≠0∧0≤a∧0≤b−1
Consider two other value-under-constraints objects with no integer-valued indeterminates
vc14≔ValueUnderConstraints⁡1,a,b,c,d,e,f,g,h,a,b,c,1−b,d,∅
vc14≔value 1 when a=0,d≠0,0<c,0<−b+1,0≤b
vc15≔ValueUnderConstraints⁡2,a,b,c,d,e,f,g,h,e,f,g,1−f,h,∅
vc15≔value 2 when e=0,h≠0,0<g,0<1−f,0≤f
Apply MakeCaseDiscussion
MakeCaseDiscussion⁡vc14,vc15,output=list
value 1 when a=0,d≠0,0<c,0<−b+1,0≤b,0≤−g,value 1 when a=0,d≠0,0<c,0<g,0<−b+1,0≤b,0≤−1+f,value 1 when a=0,d≠0,0<c,0<g,0<−f,0<−b+1,0≤b,value 1 when a=0,d≠0,e≠0,0<c,0<g,0<1−f,0<−b+1,0≤b,0≤f,value 1 when a=0,e=0,h=0,d≠0,0<c,0<g,0<1−f,0<−b+1,0≤b,0≤f,values 1,2 when a=0,e=0,d≠0,h≠0,0<c,0<g,0<1−f,0<−b+1,0≤b,0≤f,value 2 when e=0,h≠0,0<g,0<1−f,0≤f,0≤−c,value 2 when e=0,h≠0,0<c,0<g,0<1−f,0≤f,0≤b−1,value 2 when e=0,h≠0,0<c,0<g,0<−b,0<1−f,0≤f,value 2 when e=0,a≠0,h≠0,0<c,0<g,0<1−f,0<−b+1,0≤b,0≤f,value 2 when a=0,d=0,e=0,h≠0,0<c,0<g,0<1−f,0<−b+1,0≤b,0≤f
MakeCaseDiscussion⁡vc14,vc15,output=piecewise
1a=0∧d≠0∧0<c∧0<−b+1∧0≤b∧0≤−g1a=0∧d≠0∧0<c∧0<g∧0<−b+1∧0≤b∧0≤−1+f1a=0∧d≠0∧0<c∧0<g∧0<−f∧0<−b+1∧0≤b1a=0∧d≠0∧e≠0∧0<c∧0<g∧0<1−f∧0<−b+1∧0≤b∧0≤f1a=0∧e=0∧h=0∧d≠0∧0<c∧0<g∧0<1−f∧0<−b+1∧0≤b∧0≤f1,2a=0∧e=0∧d≠0∧h≠0∧0<c∧0<g∧0<1−f∧0<−b+1∧0≤b∧0≤f2e=0∧h≠0∧0<g∧0<1−f∧0≤f∧0≤−c2e=0∧h≠0∧0<c∧0<g∧0<1−f∧0≤f∧0≤b−12e=0∧h≠0∧0<c∧0<g∧0<−b∧0<1−f∧0≤f2e=0∧a≠0∧h≠0∧0<c∧0<g∧0<1−f∧0<−b+1∧0≤b∧0≤f2a=0∧d=0∧e=0∧h≠0∧0<c∧0<g∧0<1−f∧0<−b+1∧0≤b∧0≤f
Modify the previous two value-under-constraints objects by making all indeterminates integer-valued
vc14≔ValueUnderConstraints⁡1,a,b,c,d,e,f,g,h,a,b,c,1−b,d,b,f
vc14≔value 1 when a=0,b=0,d≠0,0<c
vc15≔ValueUnderConstraints⁡2,a,b,c,d,e,f,g,h,e,f,g,1−f,h,b,f
vc15≔value 2 when e=0,f=0,h≠0,0<g
Apply MakeCaseDiscussion and observe the difference with the situation where no indeterminate was integer-valued.
MakeCaseDiscussion⁡vc14,vc15
value 1 when a=0,b=0,d≠0,0<c,0≤−g,value 1 when a=0,b=0,d≠0,0<c,0<g,0≤−f−1,value 1 when a=0,b=0,d≠0,0<c,0<g,0≤−1+f,value 1 when a=0,b=0,f=0,d≠0,e≠0,0<c,0<g,value 1 when a=0,e=0,h=0,b=0,f=0,d≠0,0<c,0<g,values 1,2 when a=0,e=0,b=0,f=0,d≠0,h≠0,0<c,0<g,value 2 when e=0,f=0,h≠0,0<g,0≤−c,value 2 when e=0,f=0,h≠0,0<c,0<g,0≤−b−1,value 2 when e=0,f=0,h≠0,0<c,0<g,0≤b−1,value 2 when e=0,b=0,f=0,a≠0,h≠0,0<c,0<g,value 2 when a=0,d=0,e=0,b=0,f=0,h≠0,0<c,0<g
1a=0∧b=0∧d≠0∧0<c∧0≤−g1a=0∧b=0∧d≠0∧0<c∧0<g∧0≤−f−11a=0∧b=0∧d≠0∧0<c∧0<g∧0≤−1+f1a=0∧b=0∧f=0∧d≠0∧e≠0∧0<c∧0<g1a=0∧e=0∧h=0∧b=0∧f=0∧d≠0∧0<c∧0<g1,2a=0∧e=0∧b=0∧f=0∧d≠0∧h≠0∧0<c∧0<g2e=0∧f=0∧h≠0∧0<g∧0≤−c2e=0∧f=0∧h≠0∧0<c∧0<g∧0≤−b−12e=0∧f=0∧h≠0∧0<c∧0<g∧0≤b−12e=0∧b=0∧f=0∧a≠0∧h≠0∧0<c∧0<g2a=0∧d=0∧e=0∧b=0∧f=0∧h≠0∧0<c∧0<g
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[MakeCaseDiscussion] command was introduced in Maple 2025.
For more information on Maple 2025 changes, see Updates in Maple 2025.
See Also
ValuesUnderConstraints[Constraints]
ValuesUnderConstraints[MergeTwoCaseDiscussions]
ValuesUnderConstraints[PairCompare]
ValuesUnderConstraints[RefineCaseDiscussion]
ValuesUnderConstraints[Value]
ValuesUnderConstraints[ValueUnderConstraints]
Download Help Document