refine with Q.is_true(...) works ok for refining away Piecewise from a solution (although it's a bit picky, e.g. Eq(k**3,0) was needed instead of Eq(k, 0) for example) It fails to refine to the default though (see last row).
I looked for Q.is_false without luck, I also looked for an Inequality class but found nothing. I know work on new assumptions is still in the pipeline, my example is with latest sympy in conda (0.7.5), is there away in 0.7.5 or in master to do what I am looking for?
Btw. I have a hackish solution to get out only the defaults of Piecewise here is someone is interested.
Best regards, /Björn
Aaron Meurer
unread,
Oct 24, 2014, 5:32:53 PM10/24/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
Wouldn't that just be ~Q.is_true? It seems to work for me. The !=
class is called Unequality (to distinguish it from > "inequalities").
Aaron Meurer
> I know work on new assumptions is still in the pipeline, my example is with
> latest sympy in conda (0.7.5), is there away in 0.7.5 or in master to do
> what I am looking for?
>
> Btw. I have a hackish solution to get out only the defaults of Piecewise
> here is someone is interested.
>
> Best regards,
> /Björn
>
>
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to sy...@googlegroups.com
> I looked for Q.is_false without luck, I also looked for an Inequality class
> but found nothing.
Wouldn't that just be ~Q.is_true? It seems to work for me. The !=
class is called Unequality (to distinguish it from > "inequalities").
Yes, you are absolutely right - I always thought ~ was short for "not" (which didn't work), now I know about __invert__, thanks!
Aaron Meurer
unread,
Oct 25, 2014, 1:28:12 PM10/25/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to sy...@googlegroups.com
Python doesn't allow "not" to return a symbolic object, so we have to
use ~ (which normally means bitwise not).
Aaron Meurer
> --
> 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 sympy+un...@googlegroups.com.
> To post to this group, send email to sy...@googlegroups.com.
> Visit this group at http://groups.google.com/group/sympy.
> To view this discussion on the web visit