Ask Your Question

Revision history [back]

f is indeed a rational function, since it was defined as a fraction:

sage: f.parent()
Fraction Field of Univariate Polynomial Ring in x over Finite Field in e of size 2^4

You can convert it into a polynomial as follows:

sage: ff = R(f)
sage: ff
(e^3 + e^2 + e + 1)*x + e^3 + e
sage: ff.parent()
Univariate Polynomial Ring in x over Finite Field in e of size 2^4
sage: ff.list()
[e^3 + e, e^3 + e^2 + e + 1]

f is indeed a rational function, since it was defined as a fraction:

sage: f.parent()
Fraction Field of Univariate Polynomial Ring in x over Finite Field in e of size 2^4

You can convert it into a polynomial as follows:

sage: ff = R(f)
sage: ff
(e^3 + e^2 + e + 1)*x + e^3 + e
sage: ff.parent()
Univariate Polynomial Ring in x over Finite Field in e of size 2^4
sage: ff.list()
[e^3 + e, e^3 + e^2 + e + 1]

For your second question you can get the exponents you want using the rank method. However, i am not sure you can change the default representation easily.

sage: [c.rank() for c in ff.list()]
[9, 12]