`ptosfp', `sfptop'
------------------

ptosfp(P)
sfptop(P)
     :: Transformation to/from a small finite field

RETURN
     polynomial

P
     polynomial

   * `ptosfp()' converts coefficients of a polynomial to elements in a
     small finite field GF(P^N) set as a ground field.  If a
     coefficient is already an element of the field, no conversion is
     done. If a coefficient is a positive integer, then its residue
     modulo P^N is expanded as P-adic integer, then P is substituted by
     X, finally the polynomial is converted to its correspoding
     logarithmic representation with respect to the primitive element.
     For example, GF(3^5) is represented as F(3)[X]/(X^5+2*X+1), and
     each element of the field is represented as @_K by its exponent K
     with respect to the primitive element X.  23 = 2*3^2+3+2 is
     represented as 2*X^2+X+2 and it is equivalent to X^17 modulo
     X^5+2*X+1.  Therefore an integer 23 is conterted to @_17.

   * `sfptop()' is the inverse of `ptosfp()'.

     [196] setmod_ff(3,5);
     [3,x^5+2*x+1,x]
     [197] A = ptosfp(23);
     @_17
     [198] 9*2+3+2;
     23
     [199] x^17-(2*x^2+x+2);
     x^17-2*x^2-x-2
     [200] sremm(@,x^5+2*x+1,3);
     0
     [201] sfptop(A);
     23

References
     *Note `setmod_ff': setmod_ff, *Note `simp_ff': simp_ff

