Hi, On 16 June 2011 13:22, Aaron Meurer <[email protected]> wrote:
> On Thu, Jun 16, 2011 at 10:47 AM, Ronan Lamy <[email protected]> wrote: > > Le jeudi 16 juin 2011 à 17:09 +0100, Tom Bachmann a écrit : > >> Let me jump ship here: is there an existing solution in sympy to > >> simplify various conditions, involving inequalities etc? An easy example > >> would be > >> > >> re(-a) + 2 < 2 ∧ 0 < re(a) > >> > >> which is just equivalent to re(a) > 0, but much more complicated things > >> can happen. > > > > No, I don't think this exists. It would be very useful though. Some of > > the infrastructure for this exists already (refine(), simplify(), ...) > > and I think that your example could be made to work relatively easily, > > but a full solution for this might be quite hard. > > Also, how do you define "simpler"? Which is the most simple, x**2 > 1 > or |x| > 1 or x > 1 | x < 1 (assume x is real)? Or is your main > interest simply to remove redundant terms from an And? > It depends on the context, but most likely the last version is the simplest (it's most useful when it comes to using in later computations). > > Aaron Meurer > > > > >> On 16.06.2011 16:32, Matthew Rocklin wrote: > >> > Hi everyone, I have a question about turning inequalities on symbols > >> > into Intervals. > >> > > >> > I am currently able to do (and get much use out of) this > >> > >>> reduce_poly_inequalities([[x>=0]], x, relational=False) > >> > which returns the correct interval: > >> > [0, ∞) > >> > > >> > I would like to be able to do this: > >> > >>> reduce_poly_inequalities([[x>=y]], x, relational=False) > >> > and get this > >> > [y, ∞) > >> > but instead I get this > >> > NotImplementedError: inequality solving is not supported over ZZ[y] > >> > > >> > which is an error I think to preempt an error being caused in the > >> > sympy.polys.rootoftools.RootOf class although at this point I'm in > over > >> > my head. > >> > > >> > Should I: > >> > 1) investigate this more and see if I can fix things? > >> > 2) make an issue? > >> > 3) look for another way to solve my problem because this will be > >> > difficult to fix? > >> > > >> > Best, > >> > -Matt > >> > > >> > -- > >> > 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. > > > > > > -- > 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. > > Mateusz -- 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.
