Dear all,
I am using sagemath to get the trace polynomial from a given reciprocal polynomial of even degree. The process is described nicely on the documentation. I am not allowed to post a link. See below for a concrete example.
However, the algorithm returns a triple $(Q, R, q)$. For further calculations, I need to take out just the polynomial $Q$. Here is an example
pol.<x> = PolynomialRing(Rationals()) sage: u = x^6 +1; u.trace_polynomial()
The algorithm returns $u=(x^3 - 3*x, 1, 1)$ (in my examples, I know that $R=q=1$ always). How can I get the first component of $u$? I tried $u[0]$ but that does not work; hence u is not a Python list.
How can we resolve this problem? I am sorry if my question is too trivial. Thank you very much!
Best wishes, Tung