On Dec 3, 2008, at 4:50 AM, Simon King wrote:
Dear Tim, On Dec 3, 7:15 am, Tim Lahey <[EMAIL PROTECTED]> wrote: <snip>No, because I want instead of something like [(x-2,2),(x-3,3)] I'd like [(x-2)^2,(x-3)^3]You may do this: Start with a factorization of something: sage: f=factor(16200) sage: f 2^3 * 3^4 * 5^2 "for X in f" means that X runs over the pairs (2,3), (3,4), (5,2). And out of such pairs you can construct a factorization for each prime power, i.e.: sage: [Factorization([X]) for X in f] [2^3, 3^4, 5^2] Is this what you wanted?
Yes, and it's what someone else told me earlier in this thread. However, in the case of polynomials one has to be careful that it isn't expanded when raising to the power. Thanks, Tim. --- Tim Lahey PhD Candidate, Systems Design Engineering University of Waterloo http://www.linkedin.com/in/timlahey
smime.p7s
Description: S/MIME cryptographic signature