This is the autoexpansion of the 2-arg, commutative mul. factor
returns an unevaluated expression in order to keep the leading
Rational undistributed:

>> 2*(x + y)
2*x + 2*y
>> Mul(2, x + y, evaluate=False)
2*(x + y)
>> (x + y)*x*2 # by the time 2 is handled the expression has 3 args, not 2
2*x*(x + y)
>> 2*(x + y)*x # 2*(x + y) leads to autoexpansion
(2*x + 2*y)*x

It could be that factor is not watching for the extracted Rational and
thus doesn't use the unevaluated Mul option.

-- 
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.

Reply via email to