ValuesUnderConstraints/MakeCaseDiscussion - 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/MakeCaseDiscussion

ValuesUnderConstraints

  

MakeCaseDiscussion

  

return a list of valuesUnderConstraints objects whose domains are pairwise disjoint

 

Calling Sequence

Parameters

Description

Examples

References

Compatibility

Calling Sequence

MakeCaseDiscussion(lvc)

MakeCaseDiscussion(lvc, outopt)

Parameters

lvc

-

list of ValueUnderConstraints objects

outopt

-

(optional) equation, either output = piecewise or output = list

Description

• 

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.

Remarks

• 

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:

1. 

for every value-under-constraints object wd in lwd there exists at least one value-under-constraints object vc in lvc that wd refines;

2. 

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

3. 

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.

Examples

withValuesUnderConstraints:

Create a value-under-constraints object

vc1ValueUnderConstraints1,a,b,c,d,e,f,g,h,,a,b,c,d,,a,b,c,d,e,f,g,h

vc1value 1 when 0a,0b,0c1,0d1

(1)

Create another value-under-constraints object

vc2ValueUnderConstraints2,a,b,c,d,e,f,g,h,,e,f,g,h,,a,b,c,d,e,f,g,h

vc2value 2 when 0e,0f,0g1,0h1

(2)

Apply PairCompare.

PairComparevc1,vc2

value 1 when 0a,0b,0c1,0d1,0e1,value 1 when 0a,0b,0e,0c1,0d1,0f1,value 1 when 0a,0b,0e,0f,0g,0c1,0d1,value 1 when 0a,0b,0e,0f,0h,0c1,0d1,0g1,values 1,2 when 0a,0b,0e,0f,0c1,0d1,0g1,0h1,value 2 when 0e,0f,0a1,0g1,0h1,value 2 when 0a,0e,0f,0b1,0g1,0h1,value 2 when 0a,0b,0e,0f,0c,0g1,0h1,value 2 when 0a,0b,0e,0f,0d,0c1,0g1,0h1

(3)

Applying MakeCaseDiscussion on the list [vc1, vc2] provides the same result. We can use the output option to display the result.

MakeCaseDiscussionvc1,vc2

value 1 when 0a,0b,0c1,0d1,0e1,value 1 when 0a,0b,0e,0c1,0d1,0f1,value 1 when 0a,0b,0e,0f,0g,0c1,0d1,value 1 when 0a,0b,0e,0f,0h,0c1,0d1,0g1,values 1,2 when 0a,0b,0e,0f,0c1,0d1,0g1,0h1,value 2 when 0e,0f,0a1,0g1,0h1,value 2 when 0a,0e,0f,0b1,0g1,0h1,value 2 when 0a,0b,0e,0f,0c,0g1,0h1,value 2 when 0a,0b,0e,0f,0d,0c1,0g1,0h1

(4)

MakeCaseDiscussionvc1,vc2,output=piecewise

10a0b0c10d10e110a0b0e0c10d10f110a0b0e0f0g0c10d110a0b0e0f0h0c10d10g11,20a0b0e0f0c10d10g10h120e0f0a10g10h120a0e0f0b10g10h120a0b0e0f0c0g10h120a0b0e0f0d0c10g10h1

(5)

Consider now four value-under-constraints objects

vc5ValueUnderConstraints3,a,b,c,d,a,b,c,d,a,b,c,d

vc5value 3 when a=0,d0,0b,0c1

(6)

vc6ValueUnderConstraints4,a,b,c,d,b,c,d,a,a,b,c,d

vc6value 4 when b=0,a0,0c,0d1

(7)

vc7ValueUnderConstraints5,a,b,c,d,c,d,a,b,a,b,c,d

vc7value 5 when c=0,b0,0d,0a1

(8)

vc8ValueUnderConstraints6,a,b,c,d,d,a,b,c,a,b,c,d

vc8value 6 when d=0,c0,0a,0b1

(9)

Apply MakeCaseDiscussion to verify that they form a case discussion. As this produces the same four objects, the verification is successful.

MakeCaseDiscussionvc5,vc6,vc7,vc8

value 3 when a=0,d0,0b,0c1,value 4 when b=0,a0,0c,0d1,value 5 when c=0,b0,0d,0a1,value 6 when d=0,c0,0a,0b1

(10)

MakeCaseDiscussionvc5,vc6,vc7,vc8,output=piecewise

3a=0d00b0c14b=0a00c0d15c=0b00d0a16d=0c00a0b1

(11)

Consider two other value-under-constraints objects with no integer-valued indeterminates

vc14ValueUnderConstraints1,a,b,c,d,e,f,g,h,a,b,c,1b,d,

vc14value 1 when a=0&comma;d0&comma;0<c&comma;0<b+1&comma;0b

(12)

vc15ValueUnderConstraints2&comma;a&comma;b&comma;c&comma;d&comma;e&comma;f&comma;g&comma;h&comma;e&comma;f&comma;g&comma;1f&comma;h&comma;

vc15value 2 when e=0&comma;h0&comma;0<g&comma;0<1f&comma;0f

(13)

Apply MakeCaseDiscussion

MakeCaseDiscussionvc14&comma;vc15&comma;output=list

value 1 when a=0&comma;d0&comma;0<c&comma;0<b+1&comma;0b&comma;0g&comma;value 1 when a=0&comma;d0&comma;0<c&comma;0<g&comma;0<b+1&comma;0b&comma;01+f&comma;value 1 when a=0&comma;d0&comma;0<c&comma;0<g&comma;0<f&comma;0<b+1&comma;0b&comma;value 1 when a=0&comma;d0&comma;e0&comma;0<c&comma;0<g&comma;0<1f&comma;0<b+1&comma;0b&comma;0f&comma;value 1 when a=0&comma;e=0&comma;h=0&comma;d0&comma;0<c&comma;0<g&comma;0<1f&comma;0<b+1&comma;0b&comma;0f&comma;values 1&comma;2 when a=0&comma;e=0&comma;d0&comma;h0&comma;0<c&comma;0<g&comma;0<1f&comma;0<b+1&comma;0b&comma;0f&comma;value 2 when e=0&comma;h0&comma;0<g&comma;0<1f&comma;0f&comma;0c&comma;value 2 when e=0&comma;h0&comma;0<c&comma;0<g&comma;0<1f&comma;0f&comma;0b1&comma;value 2 when e=0&comma;h0&comma;0<c&comma;0<g&comma;0<b&comma;0<1f&comma;0f&comma;value 2 when e=0&comma;a0&comma;h0&comma;0<c&comma;0<g&comma;0<1f&comma;0<b+1&comma;0b&comma;0f&comma;value 2 when a=0&comma;d=0&comma;e=0&comma;h0&comma;0<c&comma;0<g&comma;0<1f&comma;0<b+1&comma;0b&comma;0f

(14)

MakeCaseDiscussionvc14&comma;vc15&comma;output=piecewise

1a=0d00<c0<b+10b0g1a=0d00<c0<g0<b+10b01+f1a=0d00<c0<g0<f0<b+10b1a=0d0e00<c0<g0<1f0<b+10b0f1a=0e=0h=0d00<c0<g0<1f0<b+10b0f1&comma;2a=0e=0d0h00<c0<g0<1f0<b+10b0f2e=0h00<g0<1f0f0c2e=0h00<c0<g0<1f0f0b12e=0h00<c0<g0<b0<1f0f2e=0a0h00<c0<g0<1f0<b+10b0f2a=0d=0e=0h00<c0<g0<1f0<b+10b0f

(15)

Modify the previous two value-under-constraints objects by making all indeterminates integer-valued

vc14ValueUnderConstraints1&comma;a&comma;b&comma;c&comma;d&comma;e&comma;f&comma;g&comma;h&comma;a&comma;b&comma;c&comma;1b&comma;d&comma;b&comma;f

vc14value 1 when a=0&comma;b=0&comma;d0&comma;0<c

(16)

vc15ValueUnderConstraints2&comma;a&comma;b&comma;c&comma;d&comma;e&comma;f&comma;g&comma;h&comma;e&comma;f&comma;g&comma;1f&comma;h&comma;b&comma;f

vc15value 2 when e=0&comma;f=0&comma;h0&comma;0<g

(17)

Apply MakeCaseDiscussion and observe the difference with the situation where no indeterminate was integer-valued.

MakeCaseDiscussionvc14&comma;vc15

value 1 when a=0&comma;b=0&comma;d0&comma;0<c&comma;0g&comma;value 1 when a=0&comma;b=0&comma;d0&comma;0<c&comma;0<g&comma;0f1&comma;value 1 when a=0&comma;b=0&comma;d0&comma;0<c&comma;0<g&comma;01+f&comma;value 1 when a=0&comma;b=0&comma;f=0&comma;d0&comma;e0&comma;0<c&comma;0<g&comma;value 1 when a=0&comma;e=0&comma;h=0&comma;b=0&comma;f=0&comma;d0&comma;0<c&comma;0<g&comma;values 1&comma;2 when a=0&comma;e=0&comma;b=0&comma;f=0&comma;d0&comma;h0&comma;0<c&comma;0<g&comma;value 2 when e=0&comma;f=0&comma;h0&comma;0<g&comma;0c&comma;value 2 when e=0&comma;f=0&comma;h0&comma;0<c&comma;0<g&comma;0b1&comma;value 2 when e=0&comma;f=0&comma;h0&comma;0<c&comma;0<g&comma;0b1&comma;value 2 when e=0&comma;b=0&comma;f=0&comma;a0&comma;h0&comma;0<c&comma;0<g&comma;value 2 when a=0&comma;d=0&comma;e=0&comma;b=0&comma;f=0&comma;h0&comma;0<c&comma;0<g

(18)

MakeCaseDiscussionvc14&comma;vc15&comma;output=piecewise

1a=0b=0d00<c0g1a=0b=0d00<c0<g0f11a=0b=0d00<c0<g01+f1a=0b=0f=0d0e00<c0<g1a=0e=0h=0b=0f=0d00<c0<g1&comma;2a=0e=0b=0f=0d0h00<c0<g2e=0f=0h00<g0c2e=0f=0h00<c0<g0b12e=0f=0h00<c0<g0b12e=0b=0f=0a0h00<c0<g2a=0d=0e=0b=0f=0h00<c0<g

(19)

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[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]