An interval can be *viewed* as a 1-d version of any one of many
things: a 1-d box, a 1-d ball, a 1-d convex hull of two points, etc.
But the *definition* of an interval is

[a, b] = {x \in R | a <= x and x <= b}

By this set theory definition, if b < a, then the set has to be empty,
because there are no elements x in R such that the two inequalities
hold.  This is the whole reason that we have the empty set in
mathematics, so that we don't have to special case everything like
this.

Also, from a programming point of view, sorting the arguments sounds
like a bad idea that would create more bugs than it would fix.

Aaron Meurer

On Wed, Nov 30, 2011 at 2:32 PM, Christophe BAL <[email protected]> wrote:
> Hello,
> I don't think that's so great to make [5, 4] the empty set because one
> interval can also be seen like one convex hull : [a;b] = {k a + (1 - k)b | 0
> <= k <= 1} .
>
> Best regards.
> Christophe.
>
> --
> You received this message because you are subscribed to the Google Groups
> "sympy" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/sympy?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sympy?hl=en.

Reply via email to