Le lundi 03 mai 2010 à 14:12 -0600, Aaron S. Meurer a écrit : > On May 3, 2010, at 2:11 PM, Sebastian wrote: > > There will be a fallback matching function that will be called if two > > expressions are of the same type. They match only if all it's args are > > matching. Of course And, Or, Xor are special in that sense that they are > > symmetric functions. They can be handled like Sum. Maybe there should be > > an attribute is_symmetric or something similar so that this can handled > > more general? > > There already is, it's called commutativity :) > > In [9]: And(x, y).is_commutative > Out[9]: True
No, that's not at all what this means. It means actually that Mul(And(x, y), z) == Mul(z, And(x, y)), assuming z.is_commutative == True. Whether is makes any sense is a different debate... -- You received this message because you are subscribed to the Google Groups "sympy" group. To post to this group, send email to sy...@googlegroups.com. To unsubscribe from this group, send email to sympy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sympy?hl=en.