# Simplifying integer inequalities to equality

I try (in Mathematica 10)

FullSimplify[l >= l1 + l2, {l <= l1 + l2, Element[l | l1 | l2, Integers]}]


But that gives back

l >= l1 + l2


Whereas I expected

l == l1 + l2


However, (as stated in the comments)

FullSimplify[l >= l1 + l2 && l <= l1 + l2]


yields

l == l1 + l2


Superficially these two variants (inequality as assumption, or as equation) look equivalent. What is the technical difference between the two?

To counter the claim that my question is easily answered with the documentation or that it is a simple mistake, the documentation for FullSimplify reads

Assumptions can consist of equations, inequalities, domain specifications such as x[Element]Integers, and logical combinations of these.

which led me to believe my initial attempt should be equivalent to the solution given in the comments.

• FullSimplify[l >= l1 + l2 && l <= l1 + l2]
– ciao
Jun 23, 2016 at 9:16
• Not even full...Simplify[l>=l1+l2&&l<=l1+l2] Jun 23, 2016 at 9:18
• Or Reduce[{l >= l1 + l2, l <= l1 + l2}, l]...
– ciao
Jun 23, 2016 at 9:23
• The technical difference is that l == l1 + l2 is simpler than l >= l1 + l2 && l <= l1 + l2 but not simpler than l >= l1 + l2 (as measured by SimplifySimplifyCount[expr]). Note: a SimplifyCount function is given in the docs for ComplexityFunction. See also (26172). Jun 27, 2016 at 14:25
• Another reason is that there does not seem to be a transformation in the default TransformationFunctions that will transform l >= l1 + l2. under the assumption l <= l1 + l2. (AFAIR, I couldn't find one a couple of days ago. I should have though ciao's first comment would be tried internally. Maybe it is, but a custom ComplexityFunction that prefers == to >= didn't work.) Jun 27, 2016 at 14:39

Reduce[l >= l1 + l2 && l <= l1 + l2 &&
`