# Is there a global parameter that limits the number of variables handled by Simplify?

It seems that Simplify is unable to handle (at least some) expressions involving 22 or more variables. Consider the code snippet below:

X = {x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12};
Y = {y1, y2, y3, y4, y5, y6, y7, y8, y9, y10, y11, y12};
\$Assumptions =
Element[X, PositiveIntegers] && Element[Y, PositiveIntegers] &&
And @@ Table[X[[i]] > Y[[i]], {i, 1, 12}];


Several simplifications all return True as expected:

In:= Simplify[x1 > y1]
Out= True

In:= Simplify[x1 + x2 > y1 + y2]
Out= True

In:= Simplify[Total[X[[1 ;; 10]]] > Total[Y[[1 ;; 10]]]]
Out= True

In:= Simplify[Total[X] > Total[Y[[1 ;; 9]]]] (*21 variables*)
Out= True


However, if I try to simplify an expression involving 22 or more variables, Simplify is unable to handle it:

In:= Simplify[Total[X[[1 ;; 11]]] > Total[Y[[1 ;; 11]]]]
Out= x1 + x10 + x11 + x2 + x3 + x4 + x5 + x6 + x7 + x8 + x9 >
y1 + y10 + y11 + y2 + y3 + y4 + y5 + y6 + y7 + y8 + y9
(*True expected*)

In:= Simplify[Total[X] > Total[Y]]
Out= x1 + x10 + x11 + x12 + x2 + x3 + x4 + x5 + x6 + x7 + x8 + x9 >
y1 + y10 + y11 + y12 + y2 + y3 + y4 + y5 + y6 + y7 + y8 + y9
(*True expected*)


I couldn't find any global option in the documentation that limits how many variables Simplify will handle. Is there such a parameter that can be increased to deal with more variables? Or is there some other way to handle this many variables? (I also tried using Refine and FullSimplify with the same result).

"Is there a global parameter that limits the number of variables handled by Simplify?"

Yes... System option "SimplificationOptions" gives a list of suboptions and their default settings.:

SystemOptions["Simplif*"]
{"SimplificationOptions" -> {"AssumptionsMaxExponent" -> 25,
"AssumptionsMaxNonlinearVariables" -> 4,
"AssumptionsMaxVariables" -> 21, "AutosimplifyTrigs" -> True,
"AutosimplifyTwoArgumentLog" -> True,
"ConvertTrigsToRadicals" -> False, "FiniteSumMaxTerms" -> 30,
"FunctionExpandMaxSteps" -> 15, "ListableFirst" -> True,
"RestartELProver" -> False, "SimplifyMaxExponents" -> 100,
"SimplifyToPiecewise" -> True}}


Your examples hit the limit given by "AssumptionsMaxVariables" -> 21.

You can increase the limits using, for example,

SetSystemOptions["SimplificationOptions" -> "AssumptionsMaxVariables" -> 50]


Note: In version 11.3, using FullSimplify (instead of Simplify) gives True for the last two examples without having to change the system options. Simplify does not return True even if we set a large value for the system option "AssumptionsMaxVariables".