Interval functions: comment on conceptual problem

*To*: mathgroup at smc.vnet.net*Subject*: [mg33723] Interval functions: comment on conceptual problem*From*: "DIAMOND Mark R." <dot at dot.dot>*Date*: Wed, 10 Apr 2002 00:49:03 -0400 (EDT)*Organization*: The University of Western Australia*Sender*: owner-wri-mathgroup at wolfram.com

There seems to me to be, not so much a bug, as a conceptual error in the implementation of the Interval functions. For instance, if we define A and B as A=Interval[{99,100}]; B=Interval[{100,101}]; and ask if 100 is contained in each of the intervals, the answers are IntervalMemberQ[A, 100] is True IntervalMemberQ[B, 100] is True indicating that, in general, Intervals are closed on both the left and the right. But if we ask about intersection, we get IntervalIntersection[A,B], we get Interval[] suggesting that there were no shared points between A and B, and hence that the intervals are open on left and right ... in contradiction of the previous result. Now I realize that a purist might argue that the answer Interval[] simple indicates that there was not shared "Interval" rather than shared single-point, but it seems to me to lead to an inconsistent set of functions and definitions. Better, I think, would be for IntervalIntersection[A,B] to return Interval[{100,100}] No example appears in the documentation of an interval with equal left and right end-points, but it operates just fine with the other functions, and makes for consistentency in that Interval[{x,y}] can now be considered to be a closed interval. It might also be desirable to have a way of indicating open intervals, either at one or both ends. Cheers, Mark -- Mark R. Diamond No spam email ROT13: znexq at cfl.hjn.rqh.nh No crawler web page ROT13 uggc://jjj.cfl.hjn.rqh.nh/hfre/znexq