Re: Relational operators on intervals: bug?
- To: mathgroup at smc.vnet.net
- Subject: [mg128663] Re: Relational operators on intervals: bug?
- From: Murray Eisenberg <murray at math.umass.edu>
- Date: Thu, 15 Nov 2012 03:56:55 -0500 (EST)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
- Delivered-to: l-mathgroup@wolfram.com
- Delivered-to: mathgroup-newout@smc.vnet.net
- Delivered-to: mathgroup-newsend@smc.vnet.net
- References: <k7p3j3$ca3$1@smc.vnet.net> <20121112080708.39931690E@smc.vnet.net> <k7skt2$ku3$1@smc.vnet.net> <20121114062826.C02FC69AC@smc.vnet.net>
On Nov 14, 2012, at 1:28 AM, Richard Fateman <fateman at cs.berkeley.edu> wrote: > On 11/12/2012 9:13 PM, Murray Eisenberg wrote: > >> >> Here is the empty interval in Mathematica: >> >> Interval[{1, 0}] >> >> Indeed: >> >> Resolve[Exists[x, IntervalMemberQ[Interval[{1, 0}], x]]] >> False >> > Apparently this doesn't mean what you think it does. It gives the same > answer for Interval[{0,1}]. > > Note that > > IntervalMemberQ[ Interval[{1, 0}], 1/2] is TRUE. > > IntervalIntersection[Interval[{0, 1}], Interval[{1, 0}]] > > is Interval[{0,1}]. > > That is, the endpoints, in Mathematica, are re-ordered. This is, in > my opinion, a bug. > > Using your reasoning, there are an infinite number of ways of writing > an Interval with no "insides" -- why choose {1,0}? A rather complete > calculus of interval including EXTERIOR intervals has been defined, > one in which {1,0} is the equivalent of the union of the (open) > intervals {-Infinity,0} and {1,Infinity}. A canonical representative > for an empty set would be useful in such a scheme. The result True from IntervalMemberQ[ Interval[{1, 0}], 1/2] is, if not a bug, then a result of the underlying bug/feature that, apparently, Interval[{b, a}] gives Interval[{a, b}] when b > a. Of course the documentation for Interval describes the usage as Interval[{min, max}], which could reasonably be interpreted as requiring min <= max. And then it's the user's own fault -- mine there -- if he violates that condition. On the other hand, there's nothing wrong whatsoever in having an infinite number of ways of writing the empty interval. Just as there are an infinite number of ways of describing the empty set. --- Murray Eisenberg murray at math.umass.edu Mathematics & Statistics Dept. Lederle Graduate Research Tower phone 413 549-1020 (H) University of Massachusetts 413 545-2838 (W) 710 North Pleasant Street fax 413 545-1801 Amherst, MA 01003-9305
- References:
- Re: Relational operators on intervals: bug?
- From: Richard Fateman <fateman@cs.berkeley.edu>
- Re: Relational operators on intervals: bug?
- From: Richard Fateman <fateman@cs.berkeley.edu>
- Re: Relational operators on intervals: bug?