Recent work on sets provides mechanisms to handle this problem

In [2]: from sympy.sets.setexpr import SetExpr

In [3]: epsilon = SetExpr(Interval(0, oo))

In [4]: beta = SetExpr(Interval(0, oo))

In [5]: exp(epsilon * beta) - 1
Out[5]: [0, ∞)

This is from my setexpr development branch
https://github.com/sympy/sympy/pull/2721 .  It is not yet in master

Harsh has also done some work on this issue.  In particular
https://github.com/sympy/sympy/pull/2682


On Fri, Feb 7, 2014 at 7:50 PM, Harsh Gupta <[email protected]> wrote:

> Thanks for posting this on the mailing list.
>
>
> There's also a bug in the new `solve_univariate_inequalities`
>
> ```
>
> In [2]: x = Symbol('x', positive=True)
>
>
> In [3]: y = Symbol('y')
>
>
> In [4]: solve_univariate_inequality(exp(x) > 1, x)
>
> Out[4]: False
>
>
> In [5]: solve_univariate_inequality(exp(y) > 1, y)
>
> Out[5]: y > 0
> ```
>
> This was caused by me by not taking care of the assumptions on the
> variables. I'll fix it asap.
>
> On 8 February 2014 07:28, Aaron Meurer <[email protected]> wrote:
> > No, unfortunately, non-trivial relational assumptions like this are
> > largely not implemented. As you may or may not know, the assumptions
> > system in SymPy is currently in a bit of a mess. There are two
> > assumptions systems, the "old" one, which is the one you used, and the
> > "new" one, which uses ask() and Q.
> >
> > Neither can handle this, or really any kind of non-trivial
> > Add.is_positive type assumption. It's not even clear to me at the
> > moment how one would go about implementing such things.
> >
> > Aaron Meurer
> >
> > On Fri, Feb 7, 2014 at 11:47 AM, Patrick O'Neill <[email protected]> wrote:
> >> Howdy folks,
> >>
> >> I'm a very new to sympy, and am stumped by the following error.
>  Considering
> >> the following code snippet:
> >>
> >> from sympy import *
> >> print sympy.__version__
> >> #'0.7.4.1-git'
> >> epsilon,beta = var("epsilon,beta",positive=True)
> >> (exp(epsilon*beta) - 1).is_positive # is None
> >>
> >> Sympy knows that beta and epsilon are positive, but seems not to know
> that
> >> the exponential function takes positive quantities to quantities greater
> >> than one.  Is there a workaround for this issue, or is there something
> >> fundamental to sympy's internals that makes this sort of deduction
> >> impossible?
> >>
> >> I checked the mailing list, stack overflow and the issue tracker, and
> didn't
> >> see anything pertaining to this question, but I admit I might not know
> what
> >> I'm looking for.
> >>
> >> Thanks in advance!
> >>
> >> Cheers,
> >> Pat.
> >>
> >>
> >> On Fri, Feb 7, 2014 at 12:45 PM, Patrick O'Neill <[email protected]> wrote:
> >>>
> >>> Howdy folks,
> >>>
> >>> I'm a very new to sympy, and am stumped by the following error.
> >>> Considering the following code snippet:
> >>>
> >>> from sympy import *
> >>> print sympy.__version__
> >>> #'0.7.4.1-git'
> >>> epsilon,beta = var("epsilon,beta",positive=True)
> >>> (exp(epsilon*beta) - 1).is_positive # is None
> >>>
> >>> Sympy knows that beta and epsilon are positive, but seems not to know
> that
> >>> the exponential function takes positive quantities to quantities
> greater
> >>> than one.  Is there a workaround for this issue, or is there something
> >>> fundamental to sympy's internals that makes this sort of deduction
> >>> impossible?
> >>>
> >>> I checked the mailing list, stack overflow and the issue tracker, and
> >>> didn't see anything pertaining to this question, but I admit I might
> not
> >>> know what I'm looking for.
> >>>
> >>> Thanks in advance!
> >>>
> >>> Cheers,
> >>> Pat.
> >>
> >>
> >> --
> >> You received this message because you are subscribed to the Google
> Groups
> >> "sympy" group.
> >> To unsubscribe from this group and stop receiving emails from it, send
> an
> >> email to [email protected].
> >> To post to this group, send email to [email protected].
> >> Visit this group at http://groups.google.com/group/sympy.
> >> For more options, visit https://groups.google.com/groups/opt_out.
> >
> > --
> > You received this message because you are subscribed to the Google
> Groups "sympy" group.
> > To unsubscribe from this group and stop receiving emails from it, send
> an email to [email protected].
> > To post to this group, send email to [email protected].
> > Visit this group at http://groups.google.com/group/sympy.
> > For more options, visit https://groups.google.com/groups/opt_out.
>
>
>
> --
> Harsh
>
> --
> You received this message because you are subscribed to the Google Groups
> "sympy" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/sympy.
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sympy.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to