MathGroup Archive 2001

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Truth in inequalities

  • To: mathgroup at
  • Subject: [mg29364] Re: [mg29347] Truth in inequalities
  • From: Andrzej Kozlowski <andrzej at>
  • Date: Fri, 15 Jun 2001 02:23:35 -0400 (EDT)
  • Sender: owner-wri-mathgroup at

Obviously the only person that can give you an authoritative answer is the
person who designed this behaviour. But in my personal opinion this is quite
reasonable and, as is common with many apparent "quirks" in Mathematica, the
explanation should be sought in programming convenience rather than in
logic. I seems to me  the expression x<Infinity is likely to appear as a
condition (as in your example) where you would not like it to evaluate
automatically to -Infinity. On the other hand expressions like a-Infinity
are likely to be encountered in other situations, e.g.:

Limit[a - x, x -> Infinity]


I think this is the behaviour that most users would expect. Mathematica
often makes tacit assumptions on the basis of the  situation in which a
certain expression (particularly an ambiguous one) is most likely to be
encountered. One should always remember that a mathematical computer program
can't  behave the way a mathematical paper or book does. In the latter case
everything is clearly defined at the start (usually anyway). Thus a symbol
like x will in general have a different meaning in a book on group theory
and in one on complex analysis. But this is impossible in a multi-context
program like Mathematica. Thus when you enter a symbol like x in Mathematica
it is immediately ambiguous. It can represent an indeterminate, an element
of some algebraic structure or a "complex variable", and in fact lots of
"other things" (consider possible values of x like Infinity, -Infinity,
ComplexInfinity and so on). Mathematica often has to make certain tacit
decisions about the meaning of such expressions (for example, x/x reduces to
1, which is appropriate for an "indeterminate" but not really for the
"complex variable" x), and it may decide that the appropriate meaning is
different in a  different context.
 Anyway, my answer is, that the two expressions that you are comparing are
most likely to appear in different context. But of course as many such
issues it is ultimately a matter of design, and whatever design is chosen
someone is likely not to like it.

Andrzej Kozlowski
Toyama International University

on 01.6.14 3:27 PM, Jack Goldberg at jackgold at wrote:

> Hi group,
> Can someone explain the logic of the following:
> x < Infinity           returns     x < Infinity
> while
> x - Infinity < 0      returns      True
> I should mention that I am aware of the fact that x - Infinity simplifies
> automatically to -Infinity which is then compared to 0 and found wanting.
> The issue I'm raising is why should a CAS that has  x-Infinity < 0 return
> True not also return True for the  x < Infinity?  One awkwardness of
> having this difference of behavior can be seen in the example,
> MyFunction[x_,y_]/;(x<y) :=  blah
> and 
> MyFunction[x_,y_]/;(x-y<0)  := blah
> do not do the same thing when, say, y=Infinity.
> Just curious :-)
> Jack

  • Prev by Date: Re: pattern matching quirks
  • Next by Date: Re: pattern matching quirks
  • Previous by thread: Re: Truth in inequalities
  • Next by thread: Re: Truth in inequalities