4
$\begingroup$

I'm having getting Mathematica to use my inequality assumptions. Here's a simple example:

$Assumptions = (v-w*x+y*z)>0
FullSimplify[Sign[(v-w*x+y*z)]]

Output: Sign[v-wx+yz] (Meaning that the assumption had no effect)

However, if I put in the pieces separately, it gives me the expected results.

$Assumptions = (v-w*x)>0
FullSimplify[Sign[(v-w*x)]]

Output: 1

$Assumptions = (y*z)>0
FullSimplify[Sign[(y*z)]]

Output: 1

$\endgroup$
5
$\begingroup$

The number of variables in the nonlinear expression in your first example (5) exceeds the limit set by the system sub-option "AssumptionsMaxNonlinearVariables" (which is 4).

SystemOptions["SimplificationOptions"]

{"SimplificationOptions" -> {"AssumptionsMaxNonlinearVariables" -> 4, "AssumptionsMaxVariables" -> 21, "AutosimplifyTrigs" -> True, "AutosimplifyTwoArgumentLog" -> True, "FiniteSumMaxTerms" -> 30, "FunctionExpandMaxSteps" -> 15, "ListableFirst" -> True, "RestartELProver" -> False, "SimplifyMaxExponents" -> 100, "SimplifyToPiecewise" -> True}}

Set the value of "AssumptionsMaxNonlinearVariables" to a larger number (say, 5) to make FullSimplify handle a larger number of nonlinear variables:

SetSystemOptions["SimplificationOptions" -> {"AssumptionsMaxNonlinearVariables" -> 5}];

$Assumptions = (v - w*x + y*z) > 0;
FullSimplify[Sign[(v - w*x + y*z)]]

1

Reset the value to its default using

SetSystemOptions["SimplificationOptions" -> {"AssumptionsMaxNonlinearVariables" -> 4}];

See also: Simplifying expressions with head Max

$\endgroup$
  • $\begingroup$ Thanks a bunch! $\endgroup$ – Jeff Ack Aug 18 '17 at 19:06
  • $\begingroup$ One last question: is there any documentation of what all of the SimplificationOptions mean? I'm having a hard time finding anything. $\endgroup$ – Jeff Ack Aug 18 '17 at 20:16
  • $\begingroup$ @JeffAck, thank you for the accept. Unfortunately, I am not aware of any detailed information on SystemOptions beyond what is available on the documentation pages SystemOptions and SetSystemOptions. $\endgroup$ – kglr Aug 18 '17 at 22:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.