=================================================================== RCS file: /home/cvs/OpenXM/src/asir-doc/parts/ff.texi,v retrieving revision 1.5 retrieving revision 1.8 diff -u -p -r1.5 -r1.8 --- OpenXM/src/asir-doc/parts/ff.texi 2003/04/19 15:44:56 1.5 +++ OpenXM/src/asir-doc/parts/ff.texi 2005/09/08 07:40:49 1.8 @@ -1,4 +1,4 @@ -@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 @node 有限体に関する演算,,, Top @chapter 有限体に関する演算 @@ -332,6 +332,7 @@ one to obtain the affine coordinate. * gf2ntop:: * ptosfp sfptop:: * defpoly_mod2:: +* sffctr:: * fctr_ff:: * irredcheck_ff:: * randpoly_ff:: @@ -345,8 +346,9 @@ one to obtain the affine coordinate. @findex setmod_ff @table @t -@item setmod_ff([@var{prime}|@var{poly}]) -@itemx setmod_ff(@var{prime},@var{n}]) +@item setmod_ff([@var{p}|@var{defpoly2}]) +@itemx setmod_ff([@var{defpolyp},@var{p}]) +@itemx setmod_ff([@var{p},@var{n}]) \JP :: 有限体の設定, 設定されている有限体の法, 定義多項式の表示 \EG :: Sets/Gets the current base fields. @end table @@ -355,12 +357,15 @@ one to obtain the affine coordinate. @item return \JP 数または多項式 \EG number or polynomial -@item prime +@item p \JP 素数 \EG prime -@item poly +@item defpoly2 \JP GF(2) 上既約な 1 変数多項式 \EG univariate polynomial irreducible over GF(2) +@item defpolyp +\JP GF(@var{p}) 上既約な 1 変数多項式 +\EG univariate polynomial irreducible over GF(@var{p}) @item n \JP 拡大次数 \EG the extension degree @@ -369,23 +374,28 @@ one to obtain the affine coordinate. @itemize @bullet \BJP @item -引数が正整数 @var{prime} の時, GF(@var{prime}) を基礎体として設定する. +引数が正整数 @var{p} の時, GF(@var{p}) を基礎体として設定する. @item -引数が多項式 @var{poly} の時, -GF(2^deg(@var{poly} mod 2)) = GF(2)[t]/(@var{poly}(t) mod 2) +引数が多項式 @var{defpoly2} の時, +GF(2^deg(@var{defpoly2} mod 2)) = GF(2)[t]/(@var{defpoly2}(t) mod 2) を基礎体として設定する. @item +引数が @var{defpolyp} と @var{p} の時, +GF(@var{p^deg(defpolyp)}) を基礎体として設定する. +@item 引数が @var{p} と @var{n} の時, GF(@var{p^n}) を基礎体として設定する. @var{p^n} は @var{2^29} 未満で なければならない. また, @var{p} が @var{2^14} 以上のとき, @var{n} は 1 でなければならない. @item -無引数の時, 設定されている基礎体が GF(@var{prime})の場合 @var{prime}, +無引数の時, 設定されている基礎体が GF(@var{p})の場合 @var{p}, GF(2^@var{n}) の場合定義多項式を返す. -基礎体が GF(p^@var{n}) -(@var{p^n} が @var{2^14} 未満) の場合, +基礎体が @code{setmod_ff(@var{defpoly},@var{p})} で定義された +GF(@var{p}^@var{n}) の場合, [@var{defpoly},@var{p}] を返す. +基礎体が @code{setmod_ff(@var{p},@var{n})} で定義された +GF(p^@var{n}) の場合, [@var{p},@var{defpoly},@var{prim_elem}] を返す. ここで, @var{defpoly} -は, @var{n} 次拡大の定義多項式, @var{prim_elem} は, GF(@var{p^n}) +は, @var{n} 次拡大の定義多項式, @var{prim_elem} は, GF(@var{p^n})の 乗法群の生成元を意味する. @item GF(2^@var{n}) の定義多項式は, GF(2) 上 n 次既約ならなんでも良いが, 効率に @@ -393,22 +403,28 @@ GF(2^@var{n}) の定義多項式は, GF(2) 上 n  \E \BEG @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. @item -If the argument is a polynomial @var{poly}, -GF(2^deg(@var{poly} mod 2)) = GF(2)[t]/(@var{poly}(t) mod2) +If the argument is a polynomial @var{defpoly2}, +GF(2^deg(@var{defpoly2} mod 2)) = GF(2)[t]/(@var{defpoly2}(t) mod2) is set as the current base field. @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}, 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}, then @var{n} must be equal to 1. @item 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. -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} is the defining polynomial of the @var{n}-th extension, and @var{prim_elem} is the generator of the multiplicative group @@ -427,7 +443,9 @@ x^100+x^15+1 x^100+x^15+1 [176] setmod_ff(); 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] @end example @@ -828,9 +846,11 @@ whose value is @var{r}. [2] setmod_ff(547); 547 [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); -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)); 537 [6] ntype(@@@@); @@ -878,7 +898,7 @@ 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. @var{m} has the binary representation @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). @item Apply @code{simp_ff()} to reduce the result. @@ -1186,6 +1206,60 @@ Then fix @var{m3} as small as possible. \JP @item 参照 \EG @item References @fref{setmod_ff} +@end table + +\JP @node sffctr,,, 有限体に関する函数のまとめ +\EG @node sffctr,,, Functions for Finite fields +@subsection @code{sffctr} +@findex sffctr + +@table @t +@item sffctr(@var{poly}) +\JP :: 多項式の小標数有限体上での既約分解 +\EG :: Irreducible factorization over a small finite field. +@end table + +@table @var +@item return +\JP リスト +\EG list +@item poly +\JP 有限体上の 多項式 +\EG polynomial over a finite field +@end table + +@itemize @bullet +\BJP +@item +多項式を, 現在設定されている小標数有限体上で既約分解する. +@item +結果は, [[@var{f1},@var{m1}],[@var{f2},@var{m2}],...] なる +リストである. ここで, @var{fi} は monic な既約因子, @var{mi} はその +重複度である. +\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 参照 +\EG @item References +@fref{setmod_ff}, +@fref{modfctr} @end table \JP @node fctr_ff,,, 有限体に関する函数のまとめ