Symbolic calculations in finite field extension
Hello,
Please consider the following code snippet:
P_GF2.<X> = PolynomialRing(GF(2))
GF23.<x> = P_GF2.quotient_ring(X^3+X+1)
def f(val):
return val**3
This works as expected, when val
is something like 1+x+x2. What I wanted to do is to calculate the value of f, but using a generic element of GF(23), e.g. a2x2+a1x+a0. The idea is to have the result expressed in terms of the ai. Is this possible in Sagemath?
I have tried to do it using symbolic variables, but they always belong to the Symbolic Ring, which (as far as I can tell) does not mix with other rings. Because this example is small, I was able to do the computations by hand; the value of having SAGE doing it is of course, to apply it to cases that are infeasible to do without a computer.
Thank you very much in advance.