Monomial with power modulo n
I need to implement the following formal structure axγ,γ∈Z/nZ,a∈R and x is a formal variable.
I tried
ZZ6 = Integers(6)
x = var('x')
x^ZZ6(9) + x^ZZ6(11)
And get value x^8
, whereas I need x^ZZ6(8)
.
How can I do this in sage?