10.5.1 `setmod_ff'
------------------

setmod_ff([P|DEFPOLY2])
setmod_ff([DEFPOLYP,P])
setmod_ff([P,N])
     :: Sets/Gets the current base fields.

RETURN
     number or polynomial

P
     prime

DEFPOLY2
     univariate polynomial irreducible over GF(2)

DEFPOLYP
     univariate polynomial irreducible over GF(P)

N
     the extension degree

   * If the argument is a non-negative integer P, GF(P) is set as the
     current base field.

   * If the argument is a polynomial DEFPOLY2, GF(2^deg(DEFPOLY2 mod
     2)) = GF(2)[t]/(DEFPOLY2(t) mod2) is set as the current base field.

   * If the arguments are a polynomial DEFPOLYP and a prime P,
     GF(P^deg(DEFPOLYP)) = GF(P)[t]/(DEFPOLYP(t)) is set as the current
     base field.

   * If the arguments are a prime P and an extension degree N, GF(P^N)
     is set as the current base field. P^N must be less than 2^29 and
     if P is greater than or equal to 2^14, then N must be equal to 1.

   * If no argument is specified, the modulus indicating the current
     base field is returned. If the current base field is GF(P), P is
     returned. If it is GF(2^N), the defining polynomial is returned.
     If it is GF(P^N) defined by `setmod_ff(DEFPOLY,P)', [DEFPOLYP,P]
     is returned.  If it is GF(P^N) defined by `setmod_ff(P,N)',
     [P,DEFPOLY,PRIM_ELEM] is returned. Here, DEFPOLY is the defining
     polynomial of the N-th extension, and PRIM_ELEM is the generator
     of the multiplicative group of GF(P^N).

   * Any irreducible univariate polynomial over GF(2) is available to
     set GF(2^N). However the use of `defpoly_mod2()' is recommended
     for efficiency.

     [174] defpoly_mod2(100);
     x^100+x^15+1
     [175] setmod_ff(@@);
     x^100+x^15+1
     [176] setmod_ff();
     x^100+x^15+1
     [177] setmod_ff(x^4+x+1,547);
     [1*x^4+1*x+1,547]
     [178] setmod_ff(2,5);
     [2,x^5+x^2+1,x]

References
     *Note `defpoly_mod2': defpoly_mod2.

