ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Fri, 25 Feb 2022 17:28:49 +0100recognize a rational function is a polynomialhttps://ask.sagemath.org/question/61279/recognize-a-rational-function-is-a-polynomial/Is it possible to make sage recognize that a certain rational function
is a Laurent polynomial, and treat it as such?
A simple example:
sage: R = LaurentPolynomialRing(ZZ, ['q1'])
sage: R.inject_variables(verbose=False)
sage: f = (1/(1-q1) + 1/(1-q1^-1))
sage: parent(f)
Fraction Field of Univariate Polynomial Ring in q1 over Integer Ring
Here, `f` lives correctly in the fraction field. However,
it is in particular a polynomial, to which I'd like to apply
the polynomial methods, e.g. get its monomial list.
Is this possible to achieve?rue82Fri, 25 Feb 2022 17:28:49 +0100https://ask.sagemath.org/question/61279/