Hello
I'm playing with SympyLive and it seems to me that the commutative=False
assumption is not honored by some functions, resulting in wrong results.
Example: When A and b are non-commuting symbols
factor(A**2+B**2+2*A*B) gives (A+B)**2 but it should do nothing i.e.
A**2+B**2+2*A*B
and itermonomials should give also the B*A monomial. Or at list they should
refuse to answer when some variables are not commuting.
Hope this helps
ric
#############################
Python console for SymPy 1.0 (Python 2.7.12)
These commands were executed:
>>> from __future__ import division
>>> from sympy import *
>>> x, y, z, t = symbols('x y z t')
>>> k, m, n = symbols('k m n', integer=True)
>>> f, g, h = symbols('f g h', cls=Function)
>>> from sympy.polys.orderings import *
>>> from sympy.polys.monomials import *
>>> A, B = symbols('A,B',commutative=False)
>>> A.is_commutative
False
>>> A*B-B*A ## does nothing: OK
A*B - B*A
>>> factor(A**2+B**2+2*A*B) ## wrong result
(A + B)**2
>>> itermonomials([A,B], 2)) ## wrong result
set([1, A, A**2, B, B**2, A*B])
--
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 https://groups.google.com/group/sympy.
To view this discussion on the web visit
https://groups.google.com/d/msgid/sympy/4048726.csjHr054QD%40ipht-ia-004976.
For more options, visit https://groups.google.com/d/optout.