What does `{x,y}<0` mean?

From the documentation:

Less gives True or False when its arguments are real numbers.

Regardless of what x or y are, it is clear that {x,y} is not a real number, so Less doesn't do anything with it (for the most part, some simplifications may still be performed). Note that other functions may also treat {x,y}<0 specifically, and that you can specifically define patterns that take advantage of this form. By itself though, Less is not listable, and does not expand in any way into the list. This is not a bug, just the nature of its definition.

As noted by Bob Hanlon in the comments, Thread can be used to turn {x,y}<0 into {x<0,y<0} which is well-defined as a list of inequalities.


Generally, this is an invalid use of <. Both the left and the right-hand side should be expressions representing real numbers.

However, there are a few special cases where Mathematica will accept a list with <, ==, >, such as

Solve[{x, y} < 2 && y == x^2]
(* {{y -> ConditionalExpression[x^2, -Sqrt[2] < x < Sqrt[2]]}} *)

This may have given you the impression that it is generally okay to use < this way. This is not the case though.


Writing something like Simplify[x<0,x<0] returns True because the second argument to Simplify is interpreted as an Assumption that is considered to be true.

Had the second argument been eg x==1, evaluating the preceding code segment would produce False; that result is not unexpected, since assuming that the value of x is equal to 1 (a positive number), the truth-value of x<0 is expected to be False.

Now, when Mathematica evaluates {x,y}<0, it returns the same expression (provided that there are no other rules related to symbols x and y). This should not be surprising; it happens because Less[List[x,y],0] (which is the FullForm equivalent expression of {x,y}<0) is a valid Wolfram Language expression like eg x>0; evaluating x>0 also returns x>0 (again assuming no rules are attached to symbol x beforehand).

An expression like {x,y}<0 might anticipate an evaluation result like {x<0,y<0}, but such an expectation is not warranted. The function (or 'operator') Less does not thread over its arguments (as has already been pointed out by other answers) much as some numeric functions like eg Exp or Log do. Evaluating Attributes[Exp] or Attributes[Log] should return a list of the attributes attached to each symbol; in the case of eg Log it returns {Listable, NumericFunction, Protected}; the presence of Listable in the Attributes list of Log 'allows' the user to expect that eg Log[{0,1}] will evaluate to {-Infinity, 0}.

The evaluation of {x,y}<0 does not return what's anticipated, because Less is not Listable.

What this means for the question at hand, is that when Simplify is presented with an Assumption that does not evaluate to a relevant relation (it simply reads Less[List[x,y],0]) for the expression it is expected to simplify-x<0 in this case-it returns the best result it can deliver ie x<0, which-in this case-is the same expression it was presented with, in the first place.

This result is equivalent to eg Simplify[x<0,y<0]; again, in this case, too, the Assumption does not assist in simplifying the expression passed as a first argument to Simplify.

Tags:

Inequalities