Subject: Meaning of Expop/Expon for degree-1 factors
From: Stavros Macrakis
Date: Tue, 15 Jul 2003 00:49:50 -0400
In looking at Expand/expop/expon for the non-commutative case (see bug
771061), I've tried to understand the commutative case so I can be
consistent with it.
Consider e: (a+b)^2*(c+d)^3 and look at expand(e,p,n). As expected, the
(a+b) term is distributed when p>=2, and both terms are distributed when
p>=3.
But now look at e: (a+b)*(c+d)^2. We'd expect that the (a+b) term is
distributed when p>=1, and both terms when p>=2. That does happen. But
the (a+b) term is *also* distributed when p = 0 and n > 0, that is
expand(e,1,0) = expand(e,0,1), and even = expand(e,0,-1). This also
happens for degree-1 terms in the denominator when p > 0 and n = 0:
expand(1/((a+b)*(c+d)^2),1,0) does expand, though
expand(1/((a+b)^2*(c+d)^2),2,1) does not.
That is, if either expop or expon is non-zero, degree-one terms (in the
numerator or the denominator) are expanded. That doesn't seem
consistent, and seems to gratuitously give up some of the potential
functionality of expop/expon.
Does everyone agree that p should be >=1 to expand degree-1 terms in the
numerator, and that n should be >=1 to expand degree-1 terms in the
denominator? I suspect that no one cares, but just in case....
-s