How to index all elements of a finite field?
I would like to assign an integer corresponding to element of a finite field GF(pm), where pm∈[132,35,131,137,139,251]
MWE:
F.<x> = GF(3^5, impl='givaro')
THe elements of GF(3^5) are 0,1,2,x,x^2 etc, we would like to indexing each element such as 0−−>0,1−−>1,2−−>2,x−−>3,x2−−4 etc. Not only that, if I call any element for example if I call x^2 it should rerun 4 and conversely.
This process should work for the field order prime pm,m=1 also. How can I do this?
What is the logic behind this indexing? The more usual way is to associate f(x) to f(p)∈N, so x2 corresponds to 9 and x+1 corresponds to 4.