[BACK]Return to ff.texi CVS log [TXT][DIR] Up to [local] / OpenXM / src / asir-doc / parts

Diff for /OpenXM/src/asir-doc/parts/ff.texi between version 1.5 and 1.8

version 1.5, 2003/04/19 15:44:56 version 1.8, 2005/09/08 07:40:49
Line 1 
Line 1 
 @comment $OpenXM: OpenXM/src/asir-doc/parts/ff.texi,v 1.4 2003/04/19 10:36:30 noro Exp $  @comment $OpenXM: OpenXM/src/asir-doc/parts/ff.texi,v 1.7 2003/04/21 03:07:32 noro Exp $
 \BJP  \BJP
 @node $BM-8BBN$K4X$9$k1i;;(B,,, Top  @node $BM-8BBN$K4X$9$k1i;;(B,,, Top
 @chapter $BM-8BBN$K4X$9$k1i;;(B  @chapter $BM-8BBN$K4X$9$k1i;;(B
Line 332  one to obtain the affine coordinate.
Line 332  one to obtain the affine coordinate.
 * gf2ntop::  * gf2ntop::
 * ptosfp sfptop::  * ptosfp sfptop::
 * defpoly_mod2::  * defpoly_mod2::
   * sffctr::
 * fctr_ff::  * fctr_ff::
 * irredcheck_ff::  * irredcheck_ff::
 * randpoly_ff::  * randpoly_ff::
Line 345  one to obtain the affine coordinate.
Line 346  one to obtain the affine coordinate.
 @findex setmod_ff  @findex setmod_ff
   
 @table @t  @table @t
 @item setmod_ff([@var{prime}|@var{poly}])  @item setmod_ff([@var{p}|@var{defpoly2}])
 @itemx setmod_ff(@var{prime},@var{n}])  @itemx setmod_ff([@var{defpolyp},@var{p}])
   @itemx setmod_ff([@var{p},@var{n}])
 \JP :: $BM-8BBN$N@_Dj(B, $B@_Dj$5$l$F$$$kM-8BBN$NK!(B, $BDj5AB?9`<0$NI=<((B  \JP :: $BM-8BBN$N@_Dj(B, $B@_Dj$5$l$F$$$kM-8BBN$NK!(B, $BDj5AB?9`<0$NI=<((B
 \EG :: Sets/Gets the current base fields.  \EG :: Sets/Gets the current base fields.
 @end table  @end table
Line 355  one to obtain the affine coordinate.
Line 357  one to obtain the affine coordinate.
 @item return  @item return
 \JP $B?t$^$?$OB?9`<0(B  \JP $B?t$^$?$OB?9`<0(B
 \EG number or polynomial  \EG number or polynomial
 @item prime  @item p
 \JP $BAG?t(B  \JP $BAG?t(B
 \EG prime  \EG prime
 @item poly  @item defpoly2
 \JP GF(2) $B>e4{Ls$J(B 1 $BJQ?tB?9`<0(B  \JP GF(2) $B>e4{Ls$J(B 1 $BJQ?tB?9`<0(B
 \EG univariate polynomial irreducible over GF(2)  \EG univariate polynomial irreducible over GF(2)
   @item defpolyp
   \JP GF(@var{p}) $B>e4{Ls$J(B 1 $BJQ?tB?9`<0(B
   \EG univariate polynomial irreducible over GF(@var{p})
 @item n  @item n
 \JP $B3HBg<!?t(B  \JP $B3HBg<!?t(B
 \EG the extension degree  \EG the extension degree
Line 369  one to obtain the affine coordinate.
Line 374  one to obtain the affine coordinate.
 @itemize @bullet  @itemize @bullet
 \BJP  \BJP
 @item  @item
 $B0z?t$,@5@0?t(B @var{prime} $B$N;~(B, GF(@var{prime}) $B$r4pACBN$H$7$F@_Dj$9$k(B.  $B0z?t$,@5@0?t(B @var{p} $B$N;~(B, GF(@var{p}) $B$r4pACBN$H$7$F@_Dj$9$k(B.
 @item  @item
 $B0z?t$,B?9`<0(B @var{poly} $B$N;~(B,  $B0z?t$,B?9`<0(B @var{defpoly2} $B$N;~(B,
 GF(2^deg(@var{poly} mod 2)) = GF(2)[t]/(@var{poly}(t) mod 2)  GF(2^deg(@var{defpoly2} mod 2)) = GF(2)[t]/(@var{defpoly2}(t) mod 2)
 $B$r4pACBN$H$7$F@_Dj$9$k(B.  $B$r4pACBN$H$7$F@_Dj$9$k(B.
 @item  @item
   $B0z?t$,(B @var{defpolyp} $B$H(B @var{p} $B$N;~(B,
   GF(@var{p^deg(defpolyp)}) $B$r4pACBN$H$7$F@_Dj$9$k(B.
   @item
 $B0z?t$,(B @var{p} $B$H(B @var{n} $B$N;~(B,  $B0z?t$,(B @var{p} $B$H(B @var{n} $B$N;~(B,
 GF(@var{p^n}) $B$r4pACBN$H$7$F@_Dj$9$k(B. @var{p^n} $B$O(B @var{2^29} $BL$K~$G(B  GF(@var{p^n}) $B$r4pACBN$H$7$F@_Dj$9$k(B. @var{p^n} $B$O(B @var{2^29} $BL$K~$G(B
 $B$J$1$l$P$J$i$J$$(B. $B$^$?(B, @var{p} $B$,(B @var{2^14} $B0J>e$N$H$-(B,  $B$J$1$l$P$J$i$J$$(B. $B$^$?(B, @var{p} $B$,(B @var{2^14} $B0J>e$N$H$-(B,
 @var{n} $B$O(B 1 $B$G$J$1$l$P$J$i$J$$(B.  @var{n} $B$O(B 1 $B$G$J$1$l$P$J$i$J$$(B.
 @item  @item
 $BL50z?t$N;~(B, $B@_Dj$5$l$F$$$k4pACBN$,(B GF(@var{prime})$B$N>l9g(B @var{prime},  $BL50z?t$N;~(B, $B@_Dj$5$l$F$$$k4pACBN$,(B GF(@var{p})$B$N>l9g(B @var{p},
 GF(2^@var{n}) $B$N>l9gDj5AB?9`<0$rJV$9(B.  GF(2^@var{n}) $B$N>l9gDj5AB?9`<0$rJV$9(B.
 $B4pACBN$,(B GF(p^@var{n})  $B4pACBN$,(B @code{setmod_ff(@var{defpoly},@var{p})} $B$GDj5A$5$l$?(B
 (@var{p^n} $B$,(B @var{2^14} $BL$K~(B) $B$N>l9g(B,  GF(@var{p}^@var{n}) $B$N>l9g(B, [@var{defpoly},@var{p}] $B$rJV$9(B.
   $B4pACBN$,(B @code{setmod_ff(@var{p},@var{n})} $B$GDj5A$5$l$?(B
   GF(p^@var{n}) $B$N>l9g(B,
 [@var{p},@var{defpoly},@var{prim_elem}] $B$rJV$9(B. $B$3$3$G(B, @var{defpoly}  [@var{p},@var{defpoly},@var{prim_elem}] $B$rJV$9(B. $B$3$3$G(B, @var{defpoly}
 $B$O(B, @var{n} $B<!3HBg$NDj5AB?9`<0(B, @var{prim_elem} $B$O(B, GF(@var{p^n})  $B$O(B, @var{n} $B<!3HBg$NDj5AB?9`<0(B, @var{prim_elem} $B$O(B, GF(@var{p^n})$B$N(B
 $B>hK!72$N@8@.85$r0UL#$9$k(B.  $B>hK!72$N@8@.85$r0UL#$9$k(B.
 @item  @item
 GF(2^@var{n}) $B$NDj5AB?9`<0$O(B, GF(2) $B>e(B n $B<!4{Ls$J$i$J$s$G$bNI$$$,(B, $B8zN($K(B  GF(2^@var{n}) $B$NDj5AB?9`<0$O(B, GF(2) $B>e(B n $B<!4{Ls$J$i$J$s$G$bNI$$$,(B, $B8zN($K(B
Line 393  GF(2^@var{n}) $B$NDj5AB?9`<0$O(B, GF(2) $B>e(B n 
Line 403  GF(2^@var{n}) $B$NDj5AB?9`<0$O(B, GF(2) $B>e(B n 
 \E  \E
 \BEG  \BEG
 @item  @item
 If the argument is a non-negative integer @var{prime}, GF(@var{prime})  If the argument is a non-negative integer @var{p}, GF(@var{p})
 is set as the current base field.  is set as the current base field.
 @item  @item
 If the argument is a polynomial @var{poly},  If the argument is a polynomial @var{defpoly2},
 GF(2^deg(@var{poly} mod 2)) = GF(2)[t]/(@var{poly}(t) mod2)  GF(2^deg(@var{defpoly2} mod 2)) = GF(2)[t]/(@var{defpoly2}(t) mod2)
 is set as the current base field.  is set as the current base field.
 @item  @item
   If the arguments are a polynomial @var{defpolyp} and a prime @var{p},
   GF(@var{p}^deg(@var{defpolyp})) = GF(@var{p})[t]/(@var{defpolyp}(t))
   is set as the current base field.
   @item
 If the arguments are a prime @var{p} and an extension degree @var{n},  If the arguments are a prime @var{p} and an extension degree @var{n},
 GF(@var{p^n}) is set as the current base field. @var{p^n} must be  GF(@var{p^n}) is set as the current base field. @var{p^n} must be
 less than @var{2^29} and if @var{p} is greater than or equal to @var{2^14},  less than @var{2^29} and if @var{p} is greater than or equal to @var{2^14},
 then @var{n} must be equal to 1.  then @var{n} must be equal to 1.
 @item  @item
 If no argument is specified, the modulus indicating the current base field  If no argument is specified, the modulus indicating the current base field
 is returned. If the current base field is GF(@var{prime}), @var{prime} is  is returned. If the current base field is GF(@var{p}), @var{p} is
 returned. If it is GF(2^@var{n}), the defining polynomial is returned.  returned. If it is GF(2^@var{n}), the defining polynomial is returned.
 If it is GF(@var{p^n}), where @var{p^n} is less than @var{2^14},  If it is GF(@var{p^n}) defined by @code{setmod_ff(@var{defpoly},@var{p})},
   [@var{defpolyp},@var{p}] is returned.
   If it is GF(@var{p^n}) defined by @code{setmod_ff(@var{p},@var{n})},
 [@var{p},@var{defpoly},@var{prim_elem}] is returned. Here, @var{defpoly}  [@var{p},@var{defpoly},@var{prim_elem}] is returned. Here, @var{defpoly}
 is the defining polynomial of the @var{n}-th extension,  is the defining polynomial of the @var{n}-th extension,
 and @var{prim_elem} is the generator of the multiplicative group  and @var{prim_elem} is the generator of the multiplicative group
Line 427  x^100+x^15+1
Line 443  x^100+x^15+1
 x^100+x^15+1  x^100+x^15+1
 [176] setmod_ff();  [176] setmod_ff();
 x^100+x^15+1  x^100+x^15+1
 [177] setmod_ff(2,5);  [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]  [2,x^5+x^2+1,x]
 @end example  @end example
   
Line 828  whose value is @var{r}.
Line 846  whose value is @var{r}.
 [2] setmod_ff(547);  [2] setmod_ff(547);
 547  547
 [3] F=simp_ff((x-1)^10);  [3] F=simp_ff((x-1)^10);
 1*x^10+537*x^9+45*x^8+427*x^7+210*x^6+295*x^5+210*x^4+427*x^3+45*x^2+537*x+1  1*x^10+537*x^9+45*x^8+427*x^7+210*x^6+295*x^5+210*x^4+427*x^3
   +45*x^2+537*x+1
 [4] lmptop(F);  [4] lmptop(F);
 x^10+537*x^9+45*x^8+427*x^7+210*x^6+295*x^5+210*x^4+427*x^3+45*x^2+537*x+1  x^10+537*x^9+45*x^8+427*x^7+210*x^6+295*x^5+210*x^4+427*x^3
   +45*x^2+537*x+1
 [5] lmptop(coef(F,1));  [5] lmptop(coef(F,1));
 537  537
 [6] ntype(@@@@);  [6] ntype(@@@@);
Line 878  x^10+537*x^9+45*x^8+427*x^7+210*x^6+295*x^5+210*x^4+42
Line 898  x^10+537*x^9+45*x^8+427*x^7+210*x^6+295*x^5+210*x^4+42
 Let @var{m} be a non-negative integer.  Let @var{m} be a non-negative integer.
 @var{m} has the binary representation  @var{m} has the binary representation
 @var{m}=@var{m0}+@var{m1}*2+...+@var{mk}*2^k.  @var{m}=@var{m0}+@var{m1}*2+...+@var{mk}*2^k.
 This function returns an element of  GF(2^@var{n})=GF(2)[t]/(g(t)),  This function returns an element of  GF(2^@var{n}) = GF(2)[t]/(g(t)),
 @var{m0}+@var{m1}*t+...+@var{mk}*t^k mod g(t).  @var{m0}+@var{m1}*t+...+@var{mk}*t^k mod g(t).
 @item  @item
 Apply @code{simp_ff()} to reduce the result.  Apply @code{simp_ff()} to reduce the result.
Line 1186  Then fix @var{m3} as small as possible.
Line 1206  Then fix @var{m3} as small as possible.
 \JP @item $B;2>H(B  \JP @item $B;2>H(B
 \EG @item References  \EG @item References
 @fref{setmod_ff}  @fref{setmod_ff}
   @end table
   
   \JP @node sffctr,,, $BM-8BBN$K4X$9$kH!?t$N$^$H$a(B
   \EG @node sffctr,,, Functions for Finite fields
   @subsection @code{sffctr}
   @findex sffctr
   
   @table @t
   @item sffctr(@var{poly})
   \JP :: $BB?9`<0$N>.I8?tM-8BBN>e$G$N4{LsJ,2r(B
   \EG :: Irreducible factorization over a small finite field.
   @end table
   
   @table @var
   @item return
   \JP $B%j%9%H(B
   \EG list
   @item poly
   \JP $BM-8BBN>e$N(B $BB?9`<0(B
   \EG polynomial over a finite field
   @end table
   
   @itemize @bullet
   \BJP
   @item
   $BB?9`<0$r(B, $B8=:_@_Dj$5$l$F$$$k>.I8?tM-8BBN>e$G4{LsJ,2r$9$k(B.
   @item
   $B7k2L$O(B, [[@var{f1},@var{m1}],[@var{f2},@var{m2}],...] $B$J$k(B
   $B%j%9%H$G$"$k(B. $B$3$3$G(B, @var{fi} $B$O(B monic $B$J4{Ls0x;R(B, @var{mi} $B$O$=$N(B
   $B=EJ#EY$G$"$k(B.
   \E
   \BEG
   @item
   Factorize @var{poly} into irreducible factors over
   a small finite field currently set.
   @item
   The result is a list [[@var{f1},@var{m1}],[@var{f2},@var{m2}],...],
   where @var{fi} is a monic irreducible factor and @var{mi} is its
   multiplicity.
   \E
   @end itemize
   
   @example
   [0] setmod_ff(2,10);
   [2,x^10+x^3+1,x]
   [1] sffctr((z*y^3+z*y)*x^3+(y^5+y^3+z*y^2+z)*x^2+z^11*y*x+z^10*y^3+z^11);
   [[@@_0,1],[@@_0*z*y*x+@@_0*y^3+@@_0*z,1],[(@@_0*y+@@_0)*x+@@_0*z^5,2]]
   @end example
   
   @table @t
   \JP @item $B;2>H(B
   \EG @item References
   @fref{setmod_ff},
   @fref{modfctr}
 @end table  @end table
   
 \JP @node fctr_ff,,, $BM-8BBN$K4X$9$kH!?t$N$^$H$a(B  \JP @node fctr_ff,,, $BM-8BBN$K4X$9$kH!?t$N$^$H$a(B

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.8

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>