ASKSAGE: Sage Q&A Forum - Latest question feedhttp://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Sun, 11 Jun 2017 18:52:04 -0500Recasting Laurent polynomialshttp://ask.sagemath.org/question/37914/recasting-laurent-polynomials/Hi,
I have 2 Laurent polynomials, f and g, and I'm trying to recast them into multivariable polynomials over ZZ (I'm eventually going to take their gcd).
However, I'm not able to do so on the Sage Cloud.
So far, I've tried the following:
1. Extracting the monomials of f and g, and their coefficients, and reconstructed f by:
`sum(map(mul,zip(f.coefficients(),f.monomials())))`
However, this didn't help, because SAGE thinks the type is:
<type 'sage.rings.polynomial.multi_polynomial_libsingular.MPolynomial_libsingular'>
so I still can't take the gcd.
2. I also tried to recast into R.<x,y> = ZZ[], but this didn't work either: when I do `sage: f.change_ring(R)`, I get the following error:
`AttributeError: 'sage.rings.polynomial.laurent_polynomial.LaurentPolynomial_mpair' object has no attribute 'change_ring'`
Any suggestions would be greatly appreciated!! Thanks so much. krishnaSun, 11 Jun 2017 18:52:04 -0500http://ask.sagemath.org/question/37914/