My hopes are that the new assumptions will be able to handle interval
arithmetic, or actually any kind of set arithmetic.  Trying to get the
old assumptions to do it would be unfruitful and a waste of time,
since the design doesn't really allow for it at all.

My vision is that we should be able to replace things like
ask(Q.positive(x)) with any boolean, like ask(x > 0).    For sets, we
will need some kind of In() or Contains() object, so we can say
ask(In(x, Interval(0, 1))).  And the same for assume().  We can then
have standard sets like QQ (rationals), ZZ (integers), etc., which we
could use anywhere in set arithmetic.  We should also allow to build
sets using set builder notation.

As far as I know, no one's really gotten anywhere with it beyond
what's already implemented.  It would make a great GSoC project,
though.

Aaron Meurer

On Sat, Feb 18, 2012 at 11:03 AM, Matthew Rocklin <[email protected]> wrote:
> Interval arithmetic seems to be more powerful than either of the current
> assumptions systems in the case of real variables. I've heard people mention
> this topic on the listhost before. Is there any past attempt/knowledge on
> this subject?
>
>
> On Sat, Feb 18, 2012 at 9:51 AM, [email protected]
> <[email protected]> wrote:
>>
>> It seems to me that the assumption system is a better place to put all
>> this. I may be wrong but I was left with the impression that it is
>> meant to replace all the is_something stuff.
>>
>> On 18 February 2012 07:37, Nathan Alison <[email protected]>
>> wrote:
>> > It would be nice if we could have variables take an interval as an input
>> > argument, to replace or augment the current system of "is_something"
>> > flags.
>> >
>> > Say,
>> >
>> >>>> x = Symbol('x', domain=Interval(0, oo))
>> >>>> x.is_positive
>> > True
>> >>>> x.is_real
>> > True
>> >>>> x.is_bounded
>> > False
>> >
>> > The variable x would carry around its interval, and we could use
>> > interval
>> > arithmetic on functions of variables to find the interval of an
>> > expression:
>> >
>> >>>> x = Symbol('x', domain=Interval(-1, 1))
>> >>>> y = Symbol('y', domain=Interval(0, 2))
>> >>>> (x+y).domain
>> > Interval(-1, 3)
>> >
>> > Currently (I think), there's no way to specify a range that a symbol can
>> > take to this extent. Hopefully, notation like this would simplify things
>> > like solving equations within a bounded domain, perhaps.
>> >
>> > If we want to be really ambitious, since an Interval is simply a type of
>> > set, we can extend this notation to support arbitrary sets, though
>> > specifying a symbol to be in the set of Reals would not add any extra
>> > functionality...
>> >
>> > --
>> > You received this message because you are subscribed to the Google
>> > Groups
>> > "sympy" group.
>> > To view this discussion on the web visit
>> > https://groups.google.com/d/msg/sympy/-/peRtdNF7OioJ.
>> > 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.

-- 
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