Re: IntervalComplement
- To: mathgroup at smc.vnet.net
- Subject: [mg70361] Re: IntervalComplement
- From: "Philpp" <piotr at bigpond.net.au>
- Date: Sat, 14 Oct 2006 03:07:07 -0400 (EDT)
- References: <egl468$53j$1@smc.vnet.net>
I thought I'd share a bit of an insight into why the
IntervalComplement was never included in Mathematica.
The reason is rather obvious; the implementation of Interval, as it
stands now, does NOT allow for a consistent definition of
IntervalComplement.
Consider,
In[1]:= a = Interval[{5, 5}];
IntervalMemberQ[a, 5]
Out[2]= True
Thus, 5 belongs to the interval a.
Let's assume that a complement of this Interval, with respect to
(say) Real number set, could be expressed using Mathematica Interval
type as,
In[3]:= c = Interval[{-Infinity, 5}, {5, Infinity}];
IntervalMemberQ[c, 5]
Out[4]= True
Thus, 5 also belongs to the interval c.
This leads to a contradiction; a number (5) cannot belong to an
interval and its complement simultaneously.
Thus, c = Interval[{-Infinity, 5}, {5, Infinity}] is not a complement
of a = Interval[{5, 5}].
Philipp
Chris Chiasson wrote:
> Has anyone implemented this function before? I need something that can do this.
>
> (IntervalComplement is to IntervalUnion as Complement is to Union)
>
> --
> http://chris.chiasson.name/