ValuesUnderConstraints
Simplify
return the result of applying the simplifier of a value-under-constraints object to its value
Calling Sequence
Parameters
Description
Examples
References
Compatibility
Simplify(vc)
vc
-
ValueUnderConstraints
The command Simplify(vc) uses the equations of vc in order to simplify the value of vc.
Assumptions
When Simplify(vc) executes, it is assumed that solving the equations of vc will yield one and only one solution. If this assumption holds, then this solution is used to simplify the value of vc by means of the simplifier of vc, otherwise an error is raised.
Remarks
This simplifier can be supplied by the user when vc is created.
If no simplifier is supplied by the user, then the following default procedure is used: proc(v, eqs::list(`=`)) return eval(v, eqs); end proc. See the help page of the command ValueUnderConstraints
Note also that the object vc is modified when executing Simplify(vc)
with⁡ValuesUnderConstraints:
Define a simplifier
mysimplifier := proc(v, eqs::list(`=`)) return :-Eval(v, eqs) mod 2; end proc;
mysimplifier ≔ procv,eqs::list⁡`=`return:-Eval⁡v,eqsmod2end proc
Create a value-under-constraints object using the above simplifier
vc≔ValueUnderConstraints⁡a+b,a+b=100,a−b=2,∅,mysimplifier
vc≔value a+b when a−51=0,b−49=0
Apply Simplify
Simplify⁡vc
value 0 when a−51=0,b−49=0
Get the simplifier
p≔Simplifier⁡vc;eval⁡p
p ≔ procv,eqs::list⁡`=`return:-Eval⁡v,eqsmod2end proc
procv,eqs::list⁡`=`return:-Eval⁡v,eqsmod2end proc
Create another value-under-constraints object using the default simplifier
vc≔ValueUnderConstraints⁡a+b,a+b=100,a−b=2
value 100 when a−51=0,b−49=0
p ≔ procv,eqs::list⁡`=`returneval⁡subsindets⁡v,PolyhedralSets:-QuasiPolynomials:-QuasiPolynomial,qp→function:-Eval⁡qp,eqs,eqsend proc
procv,eqs::list⁡`=`returneval⁡subsindets⁡v,PolyhedralSets:-QuasiPolynomials:-QuasiPolynomial,qp→function:-Eval⁡qp,eqs,eqsend proc
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[Simplify] 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[Eval]
ValuesUnderConstraints[HasInconsistentConstraints]
ValuesUnderConstraints[Inequations]
ValuesUnderConstraints[NonNegativeInequalities]
ValuesUnderConstraints[PositiveInequalities]
ValuesUnderConstraints[RefineCaseDiscussion]
ValuesUnderConstraints[Simplifier]
ValuesUnderConstraints[Simplify]
ValuesUnderConstraints[Symbols]
ValuesUnderConstraints[Value]
ValuesUnderConstraints[ValueUnderConstraints]
Download Help Document