![]() | 1 | initial version |
One approach is to do this:
R.<x> = QQ[x]
I = R.ideal(cyclotomic_polynomial(27)(x))
R27.<a> = R.quotient(I)
S.<y> = R27[]
At this point, S
is the polynomial ring with coefficients in R27
, variable y
. Then you can do
f = (1-y)-(1-y)^2/2+(1-y)^3/3 # note: don't use f(y) on the left-hand side
# you're defining a polynomial f into which ring elements can be substituted for y:
f(a)*f(a^2)*f(a^4)*f(a^5)