MathGroup Archive 2012

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

Search the Archive

Relational operators on intervals: bug?

Hi there,
I would like to know if someone understands the behavior of relational operators on intervals reported below. I, personally, consider items 1 and 2 below bugs, and 3, a conceptual flaw.

1. Comparision of any Interval[___] to the empty interval Interval[]:

>From the Interval-documentation (Version 8):
"Relational operators such as Equal and Less yield explicit True or False results whenever they are given disjoint intervals."

This implies that the operator Less should always yield True if the empty interval, Interval[], is compared to any other Interval[___].
However, Interval[] < Interval[] does not evaluate to either True or False.
 Same for Interval[] < Interval[0].

2. Behavior of Equal on Interval[___]:

What they also mean to imply by the above quote from the documentation is, I think, that
     interval1  R  interval2,
where R is any relational operator (Less,LessEqual,Equal,...), should NOT yield explicit True or False results if there exist x1, x3 in interval1 and x2, x4 in interval2 such that
    (x1 R x2 and Not[x3 R x4]).

Indeed, Interval[{0, 2}] <= Interval[{0, 2}] comes back unevaluated, which is fine, but Interval[{0, 2}] == Interval[{0, 2}] evaluates to True, which is not.
In fact, the documentation for Equal contradicts what is said in the above quote from the documentation of Interval.

3. IntervalIntersection[]:

IntervalIntersection[] evaluates to Interval[], which represents the empty set. This might be considered a legal definition, but is in fact nonsensical, for the same reason for which Min[ Interval[] ] should evaluate to Infinity, and not -Infinity (which is in fact what Mathematica's Min does).

Thank you for your comments.

  • Prev by Date: Re: Implicit Times
  • Next by Date: Astronomical Data, property "position"
  • Previous by thread: Re: ImageCapture::caminuse: Camera is already in use by
  • Next by thread: Re: Relational operators on intervals: bug?