=================================================================== RCS file: /home/cvs/OpenXM/src/asir-doc/parts/type.texi,v retrieving revision 1.9 retrieving revision 1.12 diff -u -p -r1.9 -r1.12 --- OpenXM/src/asir-doc/parts/type.texi 2002/09/03 01:50:58 1.9 +++ OpenXM/src/asir-doc/parts/type.texi 2003/04/20 08:01:27 1.12 @@ -1,4 +1,4 @@ -@comment $OpenXM: OpenXM/src/asir-doc/parts/type.texi,v 1.8 2001/03/12 05:01:18 noro Exp $ +@comment $OpenXM: OpenXM/src/asir-doc/parts/type.texi,v 1.11 2003/04/19 15:44:57 noro Exp $ \BJP @node $B7?(B,,, Top @chapter $B7?(B @@ -207,7 +207,8 @@ on the whole value of that vector. [1] for (I=0;I<3;I++)A3[I] = newvect(3); [2] for (I=0;I<3;I++)for(J=0;J<3;J++)A3[I][J]=newvect(3); [3] A3; -[ [ [ 0 0 0 ] [ 0 0 0 ] [ 0 0 0 ] ] [ [ 0 0 0 ] [ 0 0 0 ] [ 0 0 0 ] ] +[ [ [ 0 0 0 ] [ 0 0 0 ] [ 0 0 0 ] ] +[ [ 0 0 0 ] [ 0 0 0 ] [ 0 0 0 ] ] [ [ 0 0 0 ] [ 0 0 0 ] [ 0 0 0 ] ] ] [4] A3[0]; [ [ 0 0 0 ] [ 0 0 0 ] [ 0 0 0 ] ] @@ -355,7 +356,7 @@ This is used for basis conversion in finite fields of \JP quantifier elimination $B$GMQ$$$i$l$k0l3,=R8lO@M}<0(B. \EG This expresses a first order formula used in quantifier elimination. -@item 15 @b{matrix over GF(p)} +@item 15 @b{matrix over GF(@var{p})} @* \JP $B>.I8?tM-8BBN>e$N9TNs(B. \EG A matrix over a small finite field. @@ -476,7 +477,7 @@ The default precision is about 9 digits, which can be [2] setprec(100); 9 [3] eval(2^(1/2)); -1.41421356237309504880168872420969807856967187537694807317654396116148 +1.41421356237309504880168872420969807856967187537694807317... @end example \BJP @@ -563,11 +564,11 @@ g mod f $B$O(B, g, f $B$r$"$i$o$9(B 2 $B$D$N%S%C \E \BEG This type expresses an element of a finite field of characteristic 2. -Let @var{F} be a finite field of characteristic 2. If @var{[F:GF(2)]} -is equal to @var{n}, then @var{F} is expressed as @var{F=GF(2)[t]/(f(t))}, -where @var{f(t)} is an irreducible polynomial over @var{GF(2)} +Let @var{F} be a finite field of characteristic 2. If [F:GF(2)] +is equal to @var{n}, then @var{F} is expressed as F=GF(2)[t]/(f(t)), +where f(t) is an irreducible polynomial over GF(2) of degree @var{n}. -As an element @var{g} of @var{GF(2)[t]} can be expressed by a bit string, +As an element @var{g} of GF(2)[t] can be expressed by a bit string, An element @var{g mod f} in @var{F} can be expressed by two bit strings representing @var{g} and @var{f} respectively. \E @@ -585,7 +586,7 @@ representing @var{g} and @var{f} respectively. $B$h$C$F(B, @@ $B$NB?9`<0$H$7$F(B F $B$N85$rF~NO$G$-$k(B. (@@^10+@@+1 $B$J$I(B) \E \BEG -@code{@@} represents @var{t mod f} in @var{F=GF(2)[t](f(t))}. +@code{@@} represents @var{t mod f} in F=GF(2)[t](f(t)). By using @code{@@} one can input an element of @var{F}. For example @code{@@^10+@@+1} represents an element of @var{F}. \E @@ -625,22 +626,73 @@ coefficients of a polynomial. \E @end itemize + + +@item 8 +\JP @b{$B0L?t(B @var{p^n} $B$NM-8BBN$N85(B} +\EG @b{element of a finite field of characteristic @var{p^n}} + +\BJP +$B0L?t$,(B @var{p^n} (@var{p} $B$OG$0U$NAG?t(B, @var{n} $B$O@5@0?t(B) $B$O(B, +$BI8?t(B @var{p} $B$*$h$S(B GF(@var{p}) $B>e4{Ls$J(B @var{n} $Be$NB?9`<0$H$7$F(B +$BI=8=$5$l$k(B. +\E +\BEG +A finite field of order @var{p^n}, where @var{p} is an arbitrary prime +and @var{n} is a positive integer, is set by @code{setmod_ff} +by specifying its characteristic @var{p} and an irreducible polynomial +of degree @var{n} over GF(@var{p}). An element of this field +is represented by a polynomial over GF(@var{p}) modulo m(x). +\E + +@item 9 +\JP @b{$B0L?t(B @var{p^n} $B$NM-8BBN$N85(B ($B>.0L?t(B)} +\EG @b{element of a finite field of characteristic @var{p^n} (small order)} + +\BJP +$B0L?t$,(B @var{p^n} $B$NM-8BBN(B (@var{p^n} $B$,(B @var{2^29} $B0J2<(B, @var{p} $B$,(B @var{2^14} $B0J>e(B +$B$J$i(B @var{n} $B$O(B 1) $B$O(B, +$BI8?t(B @var{p} $B$*$h$S3HBgl9g(B, +GF(@var{p^n}) $B$N>hK!72$N@8@.85$r8GDj$9$k$3$H(B +$B$K$h$j(B, $B$3$N85$N$Y$-$H$7$FI=$5$l$k(B. $B$3$l$K$h$j(B, $B$3$NBN$N(B 0 $B$G$J$$85(B +$B$O(B, $B$3$N$Y$-;X?t$H$7$FI=8=$5$l$k(B. @var{p} $B$,(B @var{2^14} $B0J>e(B +$B$N>l9g$ODL>o$N>jM>$K$h$kI=8=$H$J$k$,(B, $B6&DL$N%W%m%0%i%`$G(B +$BAPJ}$N>l9g$r07$($k$h$&$K$3$N$h$&$J;EMM$H$J$C$F$$$k(B. + +\E +\BEG +A finite field of order @var{p^n}, where @var{p^n} must be less than +@var{2^29} and @var{n} must be equal to 1 if @var{p} is greater or +equal to @var{2^14}@, +is set by @code{setmod_ff} +by specifying its characteristic @var{p} the extension degree +@var{n}. If @var{p} is less than @var{2^14}, each non-zero element +of this field +is a power of a fixed element, which is a generator of the multiplicative +group of the field, and it is represented by its exponent. +Otherwise, each element is represented by the redue modulo @var{p}. +This specification is useful for treating both cases in a single +program. +\E + @end table \BJP -$BBgI8?tAGBN$NI8?t(B, $BI8?t(B 2 $B$NM-8BBN$NDj5AB?9`<0$O(B, @code{setmod_ff} -$B$G@_Dj$9$k(B. -$BM-8BBN$N85$I$&$7$N1i;;$G$O(B, @code{setmod_ff} $B$K$h$j@_Dj$5$l$F$$$k(B -modulus $B$G(B, $BB0$9$kBN$,J,$+$j(B, $B$=$NCf$G1i;;$,9T$o$l$k(B. +$B>.I8?tM-8BAGBN0J30$NM-8BBN$O(B @code{setmod_ff} $B$G@_Dj$9$k(B. +$BM-8BBN$N85$I$&$7$N1i;;$G$O(B, $B0lJ}$,M-M}?t$N>l9g$K$O(B, $B$=$NM-M}?t$O<+F0E*$K8=:_@_Dj$5$l$F$$$k(B $BM-8BBN$N85$KJQ49$5$l(B, $B1i;;$,9T$o$l$k(B. \E \BEG -The characteristic of a large finite prime field and the defining -polynomial of a finite field of characteristic 2 are set by @code{setmod_ff}. +Finite fields other than small finite prime fields are +set by @code{setmod_ff}. Elements of finite fields do not have informations about the modulus. -Upon an arithmetic operation, the modulus set by @code{setmod_ff} is -used. If one of the operands is a rational number, it is automatically +Upon an arithmetic operation, i +f one of the operands is a rational number, it is automatically converted into an element of the finite field currently set and the operation is done in the finite field. \E @@ -757,13 +809,13 @@ sin(x) \EG @b{functor} @* \BJP -$BH!?t8F$S=P$7$O(B, @var{fname(args)} $B$H$$$&7A$G9T$J$o$l$k$,(B, @var{fname} $B$N(B +$BH!?t8F$S=P$7$O(B, @var{fname}(@var{args}) $B$H$$$&7A$G9T$J$o$l$k$,(B, @var{fname} $B$N(B $BItJ,$rH!?t;R$H8F$V(B. $BH!?t;R$K$O(B, $BH!?t$N