| 1 | initial version |
I think this class is already implemented in sage:
sage: a,b
(2 * 3, 3 * 5)
sage: a*b
2 * 3^2 * 5
sage: a=factor(6); a
2 * 3
sage: b=factor(15); b
3 * 5
sage: a*b
2 * 3^2 * 5
sage: type(a*b)
<class 'sage.structure.factorization.Factorization'>
sage: type(a)
<class 'sage.structure.factorization_integer.IntegerFactorization'>
A good start would be to compare your code with what is implemented in sage already. It might give some hints.
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.