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

Annotation of OpenXM/src/asir-doc/exp/exp-ja.texi, Revision 1.52

1.52    ! nakayama    1: %% $OpenXM: OpenXM/src/asir-doc/exp/exp-ja.texi,v 1.51 2016/05/14 07:55:16 nakayama Exp $
1.1       takayama    2: \input texinfo
                      3: @iftex
                      4: @catcode`@#=6
                      5: @def@fref#1{@xrefX[#1,,@code{#1},,,]}
                      6: @def@b#1{{@bf@gt #1}}
                      7: @catcode`@#=@other
                      8: @end iftex
                      9: @overfullrule=0pt
                     10: @c -*-texinfo-*-
                     11: @comment %**start of header
                     12: @comment --- $B$*$^$8$J$$=*$j(B ---
                     13:
                     14: @comment --- GNU info $B%U%!%$%k$NL>A0(B ---
                     15: @setfilename xyzman
                     16:
                     17: @comment --- $B%?%$%H%k(B ---
                     18: @settitle $B<B83E*;EMM$N4X?t(B
                     19:
                     20: @comment %**end of header
                     21: @comment %@setchapternewpage odd
                     22:
                     23: @comment --- $B$*$^$8$J$$(B ---
                     24: @ifinfo
                     25: @macro fref{name}
                     26: @ref{\name\,,@code{\name\}}
                     27: @end macro
                     28: @end ifinfo
                     29:
                     30: @iftex
                     31: @comment @finalout
                     32: @end iftex
                     33:
                     34: @titlepage
                     35: @comment --- $B$*$^$8$J$$=*$j(B ---
                     36:
                     37: @comment --- $B%?%$%H%k(B, $B%P!<%8%g%s(B, $BCx<TL>(B, $BCx:n8"I=<((B ---
                     38: @title $B<B83E*;EMM$N4X?t(B
                     39: @subtitle Risa/Asir $B<B83E*;EMM4X?t@bL@=q(B
                     40: @subtitle 1.0 $BHG(B
1.49      takayama   41: @subtitle 2014 $BG/(B 12 $B7n(B
1.1       takayama   42:
1.16      ohara      43: @author  by Risa/Asir committers
1.1       takayama   44: @page
                     45: @vskip 0pt plus 1filll
                     46: Copyright @copyright{} Risa/Asir committers
1.37      takayama   47: 2004--2010. All rights reserved.
1.1       takayama   48: @end titlepage
                     49:
                     50: @comment --- $B$*$^$8$J$$(B ---
                     51: @synindex vr fn
                     52: @comment --- $B$*$^$8$J$$=*$j(B ---
                     53:
                     54: @comment --- @node $B$O(B GNU info, HTML $BMQ(B ---
1.34      ohara      55: @comment --- @node  $B$N0z?t$O(B node-name,  next,  previous,  up ---
1.1       takayama   56: @node Top,, (dir), (dir)
                     57:
                     58: @comment --- @menu $B$O(B GNU info, HTML $BMQ(B ---
                     59: @comment --- chapter $BL>$r@53N$KJB$Y$k(B ---
                     60: @comment --- $B$3$NJ8=q$G$O(B chapter XYZ, Chapter Index $B$,$"$k(B.
                     61: @comment ---  Chapter XYZ $B$K$O(B section XYZ$B$K$D$$$F(B, section XYZ$B$K4X$9$k4X?t$,$"$k(B.
                     62: @menu
1.34      ohara      63: * $B<B83E*;EMM$N4X?t@bL@=q$K$D$$$F(B::
                     64: * $B<B83E*;EMM$N4X?t(B::
1.1       takayama   65: * Index::
                     66: @end menu
                     67:
                     68: @comment --- chapter $B$N3+;O(B ---
                     69: @comment --- $B?F(B chapter $BL>$r@53N$K(B. $B?F$,$J$$>l9g$O(B Top ---
1.34      ohara      70: @node $B<B83E*;EMM$N4X?t@bL@=q$K$D$$$F(B,,, Top
                     71: @chapter $B<B83E*;EMM$N4X?t@bL@=q$K$D$$$F(B
1.1       takayama   72:
                     73: $B$3$N@bL@=q$G$O(B
                     74: @b{Asir} $B$KF3F~$5$l$?<B83E*;EMM$N4X?t$K$D$$$F@bL@$9$k(B.
                     75: $B@5<0$J4X?t$H$7$FF3F~$5$l$?$b$N$N5-=R$O(B Risa/Asir $B%^%K%e%"%k(B
                     76: $B$K0\F0$5$l$k(B.
                     77: ChangeLog $B$N9`L\$O(B www.openxm.org $B$N(B cvsweb $B$G(B
                     78: $B%=!<%9%3!<%I$rFI$`;~$N=u$1$K$J$k>pJs$,=q$+$l$F$$$k(B.
                     79:
1.34      ohara      80: @node $B<B83E*;EMM$N4X?t(B,,, Top
                     81: @chapter $B<B83E*;EMM$N4X?t(B
1.1       takayama   82:
1.34      ohara      83: @comment --- section ``$B<B83E*4X?t(B'' $B$N(B subsection xyz_abc
1.1       takayama   84: @comment --- subsection xyz_pqr xyz_stu $B$,$"$k(B.
                     85: @menu
1.2       takayama   86: * quotetotex::
                     87: * quotetotex_env::
                     88: * objtoquote::
1.3       takayama   89: * copyright::
1.2       takayama   90: * string_to_tb::
                     91: * tb_to_string::
                     92: * write_to_tb::
1.3       takayama   93: * dp_gr_main::
1.4       takayama   94: * asir-port.sh::
                     95: * asir-install.sh::
                     96: * get_struct_name::
                     97: * get_element_names::
                     98: * get_element_at::
                     99: * put_element_at::
1.6       takayama  100: * dp_initial_term::
                    101: * dp_order::
                    102: * dp_weyl_gr_main::
1.8       takayama  103: * list::
                    104: * mapat::
1.9       takayama  105: * set_print_function::
1.12      takayama  106: * small_jacobi::
1.13      takayama  107: * flatten_quote::
1.27      ohara     108: * printf::
1.28      ohara     109: * fprintf::
1.15      takayama  110: * sprintf::
                    111: * quote_to_funargs::
                    112: * funargs_to_quote::
1.19      takayama  113: * get_function_name::
1.15      takayama  114: * remove_paren::
1.17      takayama  115: * set_secure_mode::
                    116: * set_secure_flag::
1.22      takayama  117: * initialize_static_variable::
1.23      takayama  118: * eval_quote::
                    119: * nqt_match::
                    120: * nqt_match_rewrite::
                    121: * qt_normalize::
                    122: * qt_set_coef::
                    123: * qt_set_ord::
                    124: * qt_set_weight::
                    125: * nqt_comp::
                    126: * qt_is_var::
                    127: * qt_is_ceof::
1.34      ohara     128: * qt_rewrite::
1.24      takayama  129: * asirgui.hnd::
1.25      takayama  130: * noro_matrix.rr:
1.26      takayama  131: * f_res::
1.27      ohara     132: * chdir::
                    133: * pwd::
                    134: * dcurrenttime::
1.34      ohara     135: * nd_gr nd_gr_trace nd_weyl_gr nd_weyl_gr_trace (module)::
                    136: * nd_gr nd_gr_trace nd_weyl_gr nd_weyl_gr_trace (option)::
1.41      takayama  137: * tk_pfn.rkn::
                    138: * tk_pfn.graph::
                    139: * tk_rk.runge_kutta_4::
                    140: * tk_rk.runge_kutta_4_linear::
1.46      takayama  141: * tk_rk.zonal::
1.47      takayama  142: * getpid::
1.34      ohara     143: @end menu
1.23      takayama  144:
1.34      ohara     145: @node $B%/%*!<%H(B,,, $B<B83E*;EMM$N4X?t(B
                    146: @section $B%/%*!<%H(B
1.1       takayama  147:
1.34      ohara     148: @comment --- $B"~"~"~"~(B  $B4X?t(B quotetotex, quotetotex_env $B$N@bL@(B $B"~"~"~"~(B
1.1       takayama  149: @comment --- $B8D!9$N4X?t$N@bL@$N3+;O(B ---
                    150: @comment --- section $BL>$r@53N$K(B ---
1.34      ohara     151: @node quotetotex quotetotex_env,,, $B%/%*!<%H(B
1.2       takayama  152: @subsection @code{quotetotex}, @code{quotetotex_env}
1.1       takayama  153: @comment --- $B:w0zMQ%-!<%o!<%I(B
1.2       takayama  154: @findex quotetotex
                    155: @findex quotetotex_env
1.1       takayama  156:
                    157: @comment --- $B4X?t$N4JC1$J@bL@(B ---
                    158: @table @t
1.34      ohara     159: @item quotetotex(@var{q})
1.2       takayama  160: :: @var{q} $B$r(B latex $B7A<0$GI=8=$7$?J8;zNs$KJQ49$9$k(B.
                    161: @item quotetotex_env(@var{key},@var{value})
                    162: :: quotetotex $B$NF0:n$r@)8f$9$k%Q%i%a!<%?$rJQ99$9$k(B.
                    163: @item quotetotex_env()
                    164: :: quotetotex $B$NF0:n$r@)8f$9$k%Q%i%a!<%?$N8=:_CM$rLa$9(B.
                    165: @item quotetotex_env(0)
                    166: :: quotetotex $B$NF0:n$r@)8f$9$k%Q%i%a!<%?$r%G%U%)!<%k%HCM$KLa$9(B.
1.1       takayama  167: @end table
                    168:
                    169: @comment --- $B0z?t$N4JC1$J@bL@(B ---
                    170: @table @var
                    171: @item return
1.2       takayama  172: $BJ8;zNs(B(quotetotex) $B$^$?$O(B $B%j%9%H$^$?$O%*%V%8%'%/%H(B(quotetotex_env)
                    173: @item q
                    174: quote
                    175: @item key
                    176: $BJ8;zNs(B
                    177: @item value
                    178: $B%*%V%8%'%/%H(B
1.1       takayama  179: @end table
                    180:
                    181: @comment --- $B$3$3$G4X?t$N>\$7$$@bL@(B ---
                    182: @comment --- @itemize$B!A(B@end itemize $B$O2U>r=q$-(B ---
                    183: @comment --- @bullet $B$O9uE@IU$-(B ---
                    184: @itemize @bullet
                    185: @item
1.2       takayama  186: quotetotex $B$O(B @var{q} $B$r(B latex $B7A<0$GI=8=$7$?J8;zNs$KJQ49$9$k(B.
1.34      ohara     187: @item
1.2       takayama  188: $B0J2<(B quotetotex_env $B$N%Q%i%a!<%?$N0UL#$r@bL@$9$k(B.
1.34      ohara     189: @item
1.2       takayama  190: conv_rule: 3 $B%S%C%H$rMQ$$$FJQ49%k!<%k$r;XDj$9$k(B.
                    191: 0$B%S%C%HL\$O(B symbol_table $B$K$h$kJQ49$r9T$&$+(B,
                    192: 1$B%S%C%HL\$OE:;zJQ49$r9T$&$+(B,
1.3       takayama  193: 2$B%S%C%HL\$O(B d $B$+$i;O$^$kJQ?tL>$rHyJ,:nMQAG$H$_$J$7$F=hM}$9$k$+(B,
1.2       takayama  194: $B$r0UL#$9$k(B.
                    195: $B$?$H$($P(B conv_rule $B$H$7$F(B 3 $B$r;XDj$9$k$H(B,
                    196: 0$B%S%C%HL\(B, 1 $B%S%C%HL\$,(B 1 $B$H$J$k$N$G(B
                    197: symbol_table $B$K$h$kJQ49$r9T$$(B, $BE:;zJQ49$r$*$3$J$&(B.
                    198: $BE:;zJQ49$O?t;z$H1Q;z$N6-L\$*$h$S(B _ $B5-9f$r6h@Z$j$H$9$k(B.
                    199: symbol_table $B$K$h$kJQ49$,:G=i$KE,MQ$5$l$k(B.
                    200: alpha, beta, $BEy$O<+F0E*$r%.%j%7%cJ8;z$KJQ49$9$k%F!<%V%k$O(B
                    201: $BFbB"$:$_(B.
1.34      ohara     202: @item
1.5       takayama  203:   dp_vars_prefix: $BJ,;6I=8=B?9`<0$O(B
1.34      ohara     204:   @iftex
                    205:   @tex
1.5       takayama  206:   $x_0, x_1, \cdots$
1.34      ohara     207:   @end tex
                    208:   @end iftex
                    209:   @ifinfo
                    210:   x0, x1, ...
                    211:   @end ifinfo
1.5       takayama  212:   $B$NB?9`<0$H$7$F(B latex $B7A<0$KJQ49$5$l$k$,$3$N(B
                    213:   x $B$NItJ,$rJQ99$9$k(B.
1.34      ohara     214: @item
1.5       takayama  215:   dp_vars_origin: $B%$%s%G%C%/%9$N;O$^$j$NCM$r;XDj$9$k(B.
                    216:   $B%G%U%)!<%k%H$O(B 0.
1.1       takayama  217: @item
1.2       takayama  218: dp_vars_hweyl: $BJ,;6I=8=B?9`<0$r%o%$%kBe?t$N85$H$_$J$7$F(B
1.3       takayama  219: latex $B7A<0$KJQ49$9$k(B.
1.34      ohara     220: $B6v?t8DJQ?t$,$"$k$H$-$O(B $B:G=i$NH>J,$r(B
                    221: @iftex
                    222: @tex
1.2       takayama  223: $x_0, x_1, \cdots$
1.34      ohara     224: @end tex
                    225: $B$K8eH>$NH>J,$r(B
                    226: @tex
1.2       takayama  227: $\partial_0, \partial_1, \cdots$
1.34      ohara     228: @end tex
                    229: @end iftex
                    230: @ifinfo
                    231: x0, x1, ... $B$K8eH>$NH>J,$r(B dx0, dx1, ...
                    232: @end ifinfo
1.2       takayama  233: $B$KJQ49$9$k(B.
                    234: $B4q?t8D$N>l9g$O:G8e$NJQ?t$,F1;~2=JQ?t$H$7$F(B h $B$GI=<($5$l$k(B.
1.5       takayama  235: @item
                    236:   dp_dvars_prefix: dp_vars_hweyl $B$,(B 1 $B$N;~$K8eH>ItJ,$N(B prefix $B$r;XDj$9$k(B.
                    237:   $B%G%U%)!<%k%H$O(B @tex $\partial$ @end tex
                    238: @item
                    239:   dp_dvars_origin: dp_vars_hweyl $B$,(B 1 $B$N;~$N%$%s%G%C%/%9$N;O$^$j$NCM(B.
1.34      ohara     240: @item
1.2       takayama  241: conv_func: $B%f!<%6Dj5A$NJQ494X?t$r$h$V(B.
1.1       takayama  242: @end itemize
                    243:
                    244: @comment --- @example$B!A(B@end example $B$O<B9TNc$NI=<((B ---
                    245: @example
1.2       takayama  246: [3] quotetotex(quote(1/(x+1)));
                    247: \frac@{ 1@} @{ (  @{x@}+ 1)@}
                    248: [4]  quotetotex(objtoquote(diff(x^x,x)));
                    249:    @{x@}^@{  @{x@}- 1@}   @{x@}+  \log( @{x@})   @{x@}^@{ @{x@}@}
                    250: [5] quotetotex_env("conv_rule",3);
                    251: [6] quotetotex(objtoquote( (alpha2beta+x_i_j)^2));
                    252:   @{\alpha@}_@{2,\beta@}^@{ 2@} +   2  @{x@}_@{i,j@}  @{\alpha@}_@{2,\beta@}+  @{x@}_@{i,j@}^@{ 2@}
1.1       takayama  253: @end example
                    254:
                    255: @comment --- $B;2>H(B($B%j%s%/(B)$B$r=q$/(B ---
                    256: @table @t
                    257: @item $B;2>H(B
1.2       takayama  258: @ref{objtoquote}
1.3       takayama  259: print_tex_form(contrib)
1.1       takayama  260: @end table
                    261:
                    262: @comment --- ChangeLog $B$r=q$/(B. $B%=!<%9%3!<%I$N0LCV(B. $BJQ99F|;~(B $B$J$I(B CVS$B%5!<%P$r8+$k$?$a(B
                    263: @noindent
                    264: ChangeLog
                    265: @itemize @bullet
1.34      ohara     266: @item
                    267:  $B$3$N4X?t$O(B 2004$BG/(B2$B7nKv$+$i(B3$B7n$K$+$1$F(B asir $B$r(B
                    268:  knoppix $BHG(B texmacs $B$KBP1~$5$;$k$?$a$K=q$+$l$?(B.
1.5       takayama  269:  Asir-contrib $B$N(B print_tex_form $B$,$=$N867?$G$"$j(B, $B$=$l$r8zN(2=$7$^$?(B
                    270:  $B=PNO7A<0$r2~A1$7$?(B.
                    271:  OpenXM/src/kxx/ox_texmacs.c, OpenXM/src/texmacs $B$b;2>H(B.
1.34      ohara     272: @item
                    273:  OpenXM/src/asir-contrib/packages/src/noro_print.rr 1.1--1.8,
1.5       takayama  274:  noro_print_default.rr 1.1--1.3 $B$b;2>H(B.
1.34      ohara     275: @item
1.5       takayama  276:  $BJQ99$r<u$1$?%U%!%$%k$O(B OpenXM_contrib2/asir2000 $B$N2<$N<!$N%U%!%$%k(B.
1.3       takayama  277:   builtin/strobj.c 1.14--1.43,
                    278:   include/ca.h 1.46, io/cexpr.c 1.18, io/pexpr.c 1.32, io.sexpr.c 1.29,
                    279:   parse/arith.c 1.12, parse/parse.h 1.28--1.29,
                    280:   parse/quote.c 1.7--1.8, 1.12.
1.34      ohara     281: @item
1.3       takayama  282:   knoppix/math $B$O(B $BJ!2,Bg3X$N_@ED$5$s$,Cf?4$H$J$j3+H/$5$l$F$$$k(B.
1.34      ohara     283: @item
1.5       takayama  284:   dp_dvars_prefix, *_origin $B$O(B builtin/strobj.c 1.46 $B$GF3F~$5$l$?(B.
                    285: @item
                    286:   Todo: quotetoterminalform ($BJ,;6I=8=B?9`<0$N8+0W$$=PNO(B).
1.3       takayama  287: @end itemize
                    288:
                    289:
                    290:
1.34      ohara     291: @comment --- $B"~"~"~"~(B  $B4X?t(B objtoquote $B$N@bL@(B $B"~"~"~"~(B
                    292: @node objtoquote,,, $B%/%*!<%H(B
1.3       takayama  293: @subsection @code{objtoquote}
                    294: @findex objtoquote
                    295:
                    296: @comment --- $B4X?t$N4JC1$J@bL@(B ---
                    297: @table @t
                    298: @item objtoquote(@var{ob})
                    299: :: $B%*%V%8%'%/%H$H(B quote $B7?$N%G!<%?$KJQ49$9$k(B.
                    300: @end table
                    301:
                    302: @table @var
                    303: @item return
                    304: quote
                    305: @item ob
                    306: $B%*%V%8%'%/%H(B
                    307: @end table
                    308:
                    309: @itemize @bullet
                    310: @item
                    311: @code{objtoquote(ob)} $B$O(B, @var{ob} $B$r(B quote $B7?$N%G!<%?$KJQ49$9$k(B.
                    312: @end itemize
                    313:
                    314: @example
                    315: [1150] quotetolist(quote(1+2));
                    316: [b_op,+,[internal,1],[internal,2]]
                    317: [1151] quotetolist(objtoquote(1+x));
                    318: [b_op,+,[internal,x],[internal,1]]3
                    319: @end example
                    320:
                    321: @table @t
                    322: @item $B;2>H(B
                    323: @ref{quotetotex} @ref{quotetolist}
                    324: @end table
                    325:
                    326: @comment --- ChangeLog $B$r=q$/(B. $B%=!<%9%3!<%I$N0LCV(B. $BJQ99F|;~(B $B$J$I(B CVS$B%5!<%P$r8+$k$?$a(B
                    327: @noindent
                    328: ChangeLog
                    329: @itemize @bullet
                    330: @item $B$3$N4X?t$O(B quotetotex $B$NA0=hM}$r$9$k$?$a$K=q$+$l$?(B.
                    331: @item asir-contrib $B$N4X?t(B quote_to_quote $B$b;2>H(B.
                    332: @item OpenXM_contrib2/asir2000/builtin/print.c 1.16.
                    333: @end itemize
                    334:
                    335:
1.34      ohara     336: @node flatten_quote,,, $B%/%*!<%H(B
                    337: @subsection @code{flatten_quote}
                    338: @findex flatten_quote
1.3       takayama  339:
                    340: @comment --- $B4X?t$N4JC1$J@bL@(B ---
                    341: @table @t
1.34      ohara     342: @item flatten_quote(@var{q},@var{op})
                    343: :: quote $B$N3g8L$r$H$j$5$k(B.
1.3       takayama  344: @end table
                    345:
                    346: @table @var
                    347: @item return
1.34      ohara     348: Quote
                    349: @item q
                    350: Quote
                    351: @item op
                    352: $B1i;;;R$rI=$9J8;zNs(B.
1.3       takayama  353: @end table
                    354:
                    355: @itemize @bullet
                    356: @item
1.34      ohara     357: Quote $B7?$N%G!<%?$OLZ9=B$$r$7$F$$$k(B
                    358: ( quotetolist $B;2>H(B ).
                    359: @code{quote_flatten()} $B$O(B, @var{q} $B$NCf$K$"$i$l$k1i;;;R(B @var{op}
                    360: $B$N;R6!%N!<%I$rJ?Ey$K$9$k(B.
                    361: $B$D$^$j1i;;;R(B @var{op} $B$K4X$9$k3g8L$E$1$,$"$C$?>l9g$=$l$r$9$Y$F$H$j$5$k(B.
                    362: $B$?$H$($P(B (1+2)+(3+4) $B$H$$$&I=8=$r(B 1+2+3+4 $B$KJQ49$9$k(B.
                    363: @item
                    364:  $B8=:_$N<BAu$G$O(B n-ary $B$N1i;;;R$ODj5A$5$l$F$$$J$$$N$G(B,
                    365:  1+2+3 $B$O<B$O(B 1+(2+3) $B$HI=8=$5$l$F$$$k(B.
                    366:  $B$D$^$j(B + $B1i;;;R$O1&7k9gE*$G$"$k(B.
                    367: @item  R=0; for (I=0; I<N; I++) R = R+ P[I]; $B$J$kB-$7;;$r7+$jJV$9$H(B,
                    368:   + $B$O:87k9gE*$K$J$k(B. $B1&7k9gE*$KJQ49$9$k$K$O(B flatten_quote $B$r8F$V(B.
                    369: @item $BL>A0$O(B quote_flatten $B$G$J$/(B flatten_quote $B$G$"$k(B.
1.3       takayama  370: @end itemize
                    371:
                    372: @example
1.34      ohara     373: [1288] flatten_quote(quote((1+2)+(3+4*(x+3))),"+");
                    374: quote(1+2+3+4*(x+3))
                    375: [1289] flatten_quote(quote( (x*y)*(p*3)-(x*y)*z),"*");
                    376: quote(x*y*p*3-x*y*z)
                    377: [1290] quotetolist(quote(1+2+3));
                    378: [b_op,+,[b_op,+,[internal,1],[internal,2]],[internal,3]]
1.3       takayama  379: @end example
                    380:
1.34      ohara     381: @table @t
                    382: @item $B;2>H(B
                    383: @ref{quotetolist}, @ref{print_tex_form}(contrib)
                    384: @end table
                    385:
                    386: @comment --- ChangeLog $B$r=q$/(B. $BF05!(B. $B%=!<%9%3!<%I$N0LCV(B. $BJQ99F|;~(B $B$J$I(B CVS$B%5!<%P$r8+$k$?$a(B
1.3       takayama  387: @noindent
                    388: ChangeLog
                    389: @itemize @bullet
1.34      ohara     390: @item
                    391:  $B$3$N4X?t$O(B 2004-7-7 $B$+$i(B 2004-7-8 $B$K$+$1$F(B
                    392:  quote $B$K4X$9$kA`:n$r8&5f$9$k$?$a$K<B83E*$K=q$+$l$?(B.
                    393:  OpenXM/fb $B$GC_@Q$5$l$?8x<0$NITMW$J3g8L$r$H$j$O$:$7(B, tex $B7A<0$KJQ49$9$k$N$K(B
                    394:  $B1~MQ(B.
                    395: @item
                    396:  $BJQ99$r$&$1$?%=!<%9%3!<%I$O(B
                    397:  builtin/strobj.c 1.47,
                    398:  parse/eval.c 1.35,
                    399:  parse/parse.h 1.31,
                    400:  parse/quote.c 1.14--1.16.
1.3       takayama  401: @end itemize
                    402:
                    403:
1.34      ohara     404: @node quote_to_funargs,,, $B%/%*!<%H(B
                    405: @subsection @code{quote_to_funargs}, @code{funargs_to_quote}, @code{remove_paren}
                    406: @findex quote_to_funargs
                    407: @findex funargs_to_quote
                    408: @findex remove_paren
1.3       takayama  409:
                    410: @table @t
1.34      ohara     411: @item quote_to_funargs(@var{q})
                    412: ::  quote $B$r(B funarg $B7A<0(B($B%j%9%H(B) $B$X(B.
                    413: @item funargs_to_quote(@var{f})
                    414: ::  funarg $B7A<0$r(B quote $B$X(B.
                    415: @item get_function_name(@var{f})
                    416: ::  funarg $B7A<0$N(B op $B$rJ8;zNs$X(B.
                    417: @item remove_paren(@var{q})
                    418: ::  $B>e$N4X?t$rMQ$$$F=q$+$l$?M>J,$J3g8L$r<h$j5n$k(B simplifier (asir-contrib $B%^%K%e%"%k$X(B: todo)
1.3       takayama  419: @end table
                    420:
                    421: @table @var
                    422: @item return
1.34      ohara     423: quote(funargs_to_quote, remove_paren) $B$+(B $B%j%9%H(B(quote_to_funargs)
                    424: @item q
                    425: quote
                    426: @item f
                    427: $B%j%9%H(B
1.3       takayama  428: @end table
                    429:
                    430: @itemize @bullet
                    431: @item
1.34      ohara     432:  @code{quote_to_funargs} $B$O(B quote $B7?$N%G!<%?(B ($BFbItE*$K$O(B FNODE) $B$r(B
                    433: quote $B$X$NI|852DG=$J7A$G%j%9%H$XJQ49$9$k(B.
                    434: @code{quotetolist} $B$O(B quote $B$r%j%9%H$XJQ49$9$k$,(B, $B0lIt$N>pJs$r<N$F$k$?$a(B
                    435: $B$b$H$N(B quote $B$NI|85$O$G$-$J$$(B.
                    436: @item
                    437:  @code{quote_to_funargs} $B$NLa$jCM$O(B [fid, op, arg1, arg2, ...]
                    438: $B$J$k7A<0$r$7$F$$$k(B.
                    439: $B$3$3$G(B op $B$O(B node $B$NL>A0$G$"$j(B,
                    440: $B4X?t(B @code{get_function_name} $B$rMQ$$$F?M4V$,FI$a$k7A<0(B
                    441: $B$G<h$j$@$;$k(B.
                    442: $B$?$H$($P(B @code{get_function_name(quote_to_funargs(quote(1+2))[1])}
                    443: $B$O(B "+" $B$rLa$9(B.
1.3       takayama  444: @item
1.34      ohara     445:  $BL>A0(B@code{get_function_name} $B$O$=$N$&$AJQ99$5$l$k$@$m$&(B.
1.3       takayama  446: @item
1.34      ohara     447:  $B2<$NNc$G(B
                    448:  quote_to_funargs(FA[2]);
                    449: [34,[b_op,+,[internal,x],[internal,1]]]
                    450: $B$H$J$k(B.
                    451: 34 $B$O(B @code{I_PAREN} $B$r0UL#$9$k(B.
                    452: $B?t$H0UL#$NBP1~I=$O(B @code{OpenXM/src/asir-contrib/packages/src/noro_simplify.rr}
                    453: $B$^$?$O(B @code{OpenXM_contrib2/asir2000/parse/parse.h} $B$r8+$h(B.
                    454: $B0J2<$N(B fid $B$,(B 0, 1, 2, ... $B$KBP1~$E$1$i$l$F$$$k(B.
                    455:         I_BOP, I_COP, I_AND, I_OR, I_NOT, I_CE,
                    456:         I_PRESELF, I_POSTSELF,
                    457:         I_FUNC, I_FUNC_OPT, I_IFUNC, I_MAP, I_RECMAP, I_PFDERIV,
                    458:         I_ANS, I_PVAR, I_ASSPVAR,
                    459:         I_FORMULA, I_LIST, I_STR, I_NEWCOMP, I_CAR, I_CDR, I_CAST,
                    460:         I_INDEX, I_EV, I_TIMER, I_GF2NGEN, I_GFPNGEN, I_GFSNGEN,
                    461:         I_LOP, I_OPT, I_GETOPT, I_POINT, I_PAREN, I_MINUS,
                    462:         I_NARYOP
1.3       takayama  463: @end itemize
                    464:
1.34      ohara     465: $B<!$NNc$G$O(B (x+1)+(x+2) $B$N3g8L$r$O$:$7$F(B x+1+x+2 $B$KJQ49$7$F$$$k(B.
                    466: @example
                    467: [0] ctrl("print_quote",1) $
                    468:
                    469: [1] Q=quote((x+1)+(x+2));
                    470: [b_op,+,[u_op,(),[b_op,+,[internal,x],[internal,1]]],
                    471:         [u_op,(),[b_op,+,[internal,x],[internal,2]]]]
                    472:
                    473: [2] FA=quote_to_funargs(Q);
                    474: [0,<...quoted...>,
                    475:   [u_op,(),[b_op,+,[internal,x],[internal,1]]],
                    476:   [u_op,(),[b_op,+,[internal,x],[internal,2]]]]
                    477:
                    478: [3] FA2=quote_to_funargs(FA[2])[1];
                    479: [b_op,+,[internal,x],[internal,1]]
                    480:
                    481: [4] FA3=quote_to_funargs(FA[3])[1];
                    482: [b_op,+,[internal,x],[internal,2]]
                    483:
                    484: [5] funargs_to_quote([FA[0],FA[1],FA2,FA3]);
                    485: [b_op,+,[b_op,+,[internal,x],[internal,1]],
                    486:         [b_op,+,[internal,x],[internal,2]]]
                    487: @end example
                    488:
                    489: $B<!$NNc$O(B OpenXM/asir-contrib $BHG$N(B asir $B$G<B9T(B.
                    490: @example
                    491: [1287] load("noro_simplify.rr");
                    492: 1
                    493: [1293] noro_simplify.remove_paren(quote( f(1-(x))));
                    494: quote(f(1-x))
                    495: @end example
1.3       takayama  496:
1.34      ohara     497: funargs_to_quote $B$rMQ$$$F4{B8$N(B quote $B$N;R6!$rCV$-49$($F(B
                    498: $B?7$7$$(B quote $B$r$D$/$j=P$;$k(B.
                    499: @example
                    500: [1184] R=quote_to_funargs(quote(a+(b+c)));
                    501: [0,<...quoted...>,<...quoted...>,<...quoted...>]
                    502: [1185] T=quote_to_funargs(quote(1+2));
                    503: [0,<...quoted...>,<...quoted...>,<...quoted...>]
                    504: [1186] funargs_to_quote([0,R[1],R[2],T[2]]);
                    505: quote(a+1)
1.3       takayama  506: @end example
                    507:
1.34      ohara     508: @table @t
                    509: @item $B;2>H(B
                    510: @ref{quotetolist}
                    511: @end table
                    512:
1.3       takayama  513:
                    514: @noindent
                    515: ChangeLog
                    516: @itemize @bullet
1.34      ohara     517: @item
                    518:  $B$3$l$i$N4X?t$O(B 2004-7-8 $B$+$i3+H/$N$O$8$^$C$F$$$k(B quote $B$N(B simplification $B4XO"(B
                    519:  $B$N<B83E*4X?t$G$"$k(B.
                    520:  $BJQ99$r$&$1$?%=!<%9%3!<%I$OB?4t$K$o$?$k$N$G$^$@=q$+$J$$(B.
                    521: @item
                    522:  $B3g8L$r<h$j5n$kLdBj$O(B OpenXM/fb $B$,C_$($F$$$k8x<0$r(B tex $B$Ge:No$KI=<($9$k$N$,F05!$N0l$D(B.
                    523: @item
                    524:  2004-6-26 $B$N7W;;Be?t%;%_%J!<$K$*$$$F(B, $BCf@n$5$s$,(B simplifier $B$K$D$$$F$$$m$$$mLdBjDs5/(B
                    525: $B$r$7$?(B ($B7W;;Be?t%;%_%J!<%S%G%*;2>H(B).
                    526: @item parse/quote.c $B$N(B {\tt strcut fid_spec fid_spec_tab[] }
                    527: $B$NItJ,$K=q$$$F$"$k7A<0$K(B @code{funargs_to_quote} $B$OJQ49$9$k(B.
1.3       takayama  528: @end itemize
                    529:
                    530:
1.34      ohara     531: @node eval_quote,,, $B%/%*!<%H(B
                    532: @subsection @code{eval_quote}
                    533: @findex eval_quote
1.3       takayama  534:
                    535: @comment --- $B4X?t$N4JC1$J@bL@(B ---
                    536: @comment --- @itemx $B$OJ#?t$KBP$7$F@bL@$r0l$D$D$1$k>l9g$K;H$&(B ---
                    537: @table @t
1.34      ohara     538: @item eval_quote(@var{Q});
                    539: :: quote $B7?%G!<%?(B @var{Q} $B$r(B asir $B$N%*%V%8%'%/%H$KJQ49$9$k(B.
1.3       takayama  540: @end table
                    541:
                    542: @table @var
                    543: @item return
1.34      ohara     544: $B%*%V%8%'%/%H(B
                    545: @item Q
                    546: quote$B7?(B
                    547: @end table
                    548:
                    549: @itemize @bullet
                    550: @item quote $B7?%G!<%?(B @var{Q} $B$r(B asir $B$N%*%V%8%'%/%H$KJQ49$9$k(B.
                    551: @item $B5U4X?t$O(B @code{objtoquote}
                    552: @end itemize
                    553:
                    554: @example
                    555: ctrl("print_quote",2);
                    556: A=quote((x-1)^2+(x-1)+3);
                    557:      $B=PNO(B: ((((x)-(1))^(2))+((x)-(1)))+(3)
                    558: eval_quote(A);
                    559:      $B=PNO(B: x^2-x+3
                    560: print_input_form(A);     /* asir-contrib */
                    561:      $B=PNO(B: quote((x-1)^2+(x-1)+3)
1.11      ohara     562: @end example
1.3       takayama  563:
1.34      ohara     564: @table @t
                    565: @item $B;2>H(B
                    566: @ref{objtoquote}, @ref{quotetolist}, @ref{eval_string},
                    567: @ref{quote_to_funargs}, @ref{funargs_to_quote}
                    568: @end table
1.3       takayama  569:
                    570: @comment --- ChangeLog $B$r=q$/(B. $BF05!(B. $B%=!<%9%3!<%I$N0LCV(B. $BJQ99F|;~(B $B$J$I(B CVS$B%5!<%P$r8+$k$?$a(B
1.34      ohara     571: @comment --- openxm $B$N30It$+$i$N4sM?$b=R$Y$k(B. Credit.
1.3       takayama  572: @noindent
                    573: ChangeLog
                    574: @itemize @bullet
1.34      ohara     575: @item  -----$B$^$@=q$$$F$J$$(B.
1.1       takayama  576: @end itemize
                    577:
1.34      ohara     578:
                    579: @node nqt_match,,, $B%/%*!<%H(B
                    580: @subsection @code{nqt_match}
                    581: @findex nqt_match
1.1       takayama  582:
                    583: @comment --- $B4X?t$N4JC1$J@bL@(B ---
                    584: @comment --- @itemx $B$OJ#?t$KBP$7$F@bL@$r0l$D$D$1$k>l9g$K;H$&(B ---
                    585: @table @t
1.34      ohara     586: @item nqt_match(@var{Expr},@var{Pattern}[,@var{Mode}])
                    587: :: @var{Expr} $B$,(B @var{Pattern} $B$K%^%C%A(B($BE,9g(B)$B$9$k$H(B 1 $B$rLa$9(B. $B$7$J$$$H(B 0 $B$rLa$9(B.
1.3       takayama  588: @end table
                    589:
1.34      ohara     590: @table @var
                    591: @item return
                    592: $B@0?t(B
                    593: @item Expr
                    594: quote$B7?(B
                    595: @item Pattern
                    596: quote$B7?(B
                    597: @item Mode
                    598: $B@0?t(B
                    599: @end table
1.3       takayama  600:
                    601: @itemize @bullet
1.34      ohara     602: @item  @var{Expr} $B$,(B @var{Pattern} $B$K%^%C%A(B($BE,9g(B)$B$9$k$H(B 1 $B$rLa$9(B. $B$7$J$$$H(B 0 $B$rLa$9(B.
                    603: @item $BE,9g$7$?>l9g(B, $BI{:nMQ$H$7$F(B, @var{Pattern} $B$K4^$^$l$k%W%m%0%i%`JQ?t(B($BBgJ8;z$G$O$8$^$kJQ?t(B)$B$KE,9g$7$?CM$,BeF~$5$l$k(B.
                    604: @item nqt $B$O(B normalized quote $B$NN,$G$"$j(B fnode$BI8=`7A$KJQ49$7$F$+$iE,9g8!::$r$9$k(B.  fnode$BI8=`7A$K$D$$$F$O(B @ref{qt_normalize} $B$r8+$h(B.
                    605: @item @var{Mode} $B$K$h$jE83+J}K!$r;XDj$7(B, $B$=$NE83+J}K!$K$h$jF@$i$l$?(B @var{Expr} $B$N(B
                    606: fnode$BI8=`7A$H(B @var{Pattern} $B$rHf3S$9$k(B.
1.3       takayama  607: @end itemize
                    608:
1.34      ohara     609: @example
                    610: ctrl("print_quote",2);
                    611: A=quote((x-y)*(x+y));
                    612: nqt_match(A,quote(P*Q));
                    613: [P,Q]
                    614:     $B=PNO(B:  [x-y, x+y]
                    615: nqt_match(A,quote(P*Q),1);
                    616:     $B%^%C%A$7$J$$(B.
                    617: nqt_match(A,quote(P*Q),2);
                    618:     $B%^%C%A$7$J$$(B.
                    619: qt_normalize(A,1);
                    620:     $B=PNO(B:  ((x)^(2))+((x)*(y))+((-1)*((y)^(2)))+((-1)*(y)*(x))
                    621: qt_normalize(A,2);
                    622:     $B=PNO(B:  ((x)*(x))+((x)*(y))+((-1)*(y)*(x))+((-1)*(y)*(y))
                    623: @end example
                    624:
                    625: @table @t
                    626: @item $B;2>H(B
                    627: @ref{nqt_match_rewrite},
                    628: @ref{qt_rewrite}
                    629: @end table
1.3       takayama  630:
                    631: @comment --- ChangeLog $B$r=q$/(B. $BF05!(B. $B%=!<%9%3!<%I$N0LCV(B. $BJQ99F|;~(B $B$J$I(B CVS$B%5!<%P$r8+$k$?$a(B
1.34      ohara     632: @comment --- openxm $B$N30It$+$i$N4sM?$b=R$Y$k(B. Credit.
1.3       takayama  633: @noindent
                    634: ChangeLog
                    635: @itemize @bullet
1.34      ohara     636: @item  ----- $B$^$@=q$$$F$J$$(B.
1.3       takayama  637: @end itemize
                    638:
1.4       takayama  639:
1.34      ohara     640: @node nqt_match_rewrite,,, $B%/%*!<%H(B
                    641: @subsection @code{nqt_match_rewrite}
                    642: @findex nqt_match_rewrite
1.4       takayama  643:
                    644: @comment --- $B4X?t$N4JC1$J@bL@(B ---
                    645: @comment --- @itemx $B$OJ#?t$KBP$7$F@bL@$r0l$D$D$1$k>l9g$K;H$&(B ---
                    646: @table @t
1.34      ohara     647: @item nqt_match_rewrite(@var{Expr},@var{Rule},@var{Mode})
                    648: :: @var{Expr} $B$r(B @var{Rule} $B$K=>$$=q$-49$($k(B.
1.4       takayama  649: @end table
                    650:
                    651: @table @var
                    652: @item return
1.34      ohara     653: quote$B7?(B
                    654: @item Expr
                    655: quote$B7?(B
                    656: @item Rule
                    657: [@var{Pattern},@var{Action}] $B$+$^$?$O(B
                    658: [@var{Pattern},@var{Condition},@var{Action}].
                    659: $B$3$l$i$NMWAG$O$9$Y$F(B quote$B7?(B.
                    660: @item Mode
                    661: $B@0?t(B
1.4       takayama  662: @end table
                    663:
                    664: @itemize @bullet
1.34      ohara     665: @item @var{Expr} $B$r(B @var{Rule} $B$K=>$$=q$-49$($k(B. @var{Pattern} $B$KE,9g$7$J$$>l9g$O(B
                    666: @var{Exprt} $B<+BN$rLa$9(B.
                    667: @item nqt $B$O(B normalized quote $B$NN,$G$"$j(B fnode$BI8=`7A$KJQ49$7$F$+$iE,9g8!::$r$9$k(B.  fnode$BI8=`7A$K$D$$$F$O(B @ref{qt_normalize} $B$r8+$h(B.
1.4       takayama  668: @end itemize
                    669:
1.34      ohara     670: @comment %%Doc: cfep/tests/2006-03-12-qt.rr
1.4       takayama  671: @example
1.34      ohara     672: ctrl("print_quote",2);
                    673: nqt_match_rewrite(`x*y*z,[`X*Y,`X+Y],1);
                    674:    $B=PNO(B: (x)+((y)*(z))
                    675: A=`x*x;
                    676: nqt_match_rewrite(A,[`X*Y,`X+Y],1);
                    677:    $B=PNO(B: x^2   ($B%^%C%A$7$F$$$J$$(B)
                    678: nqt_match_rewrite(A,[`X*Y,`X+Y],2);
                    679:    $B=PNO(B: 2*x
                    680:
                    681: $BE,9g$K$D$$$F$N%b!<%I$N0c$$$rM}2r$9$k$?$a$K<!$NNc$*$h$S(B fnode$BI8=`7A(B(qt_normalize) $B$r;2>H(B.
                    682: quotetolist(qt_normalize(`x*x,0));
                    683:     $B=PNO(B:  [b_op,^,[internal,x],[internal,2]]
                    684: quotetolist(qt_normalize(`x*x,1));
                    685:     $B=PNO(B:  [b_op,^,[internal,x],[internal,2]]
                    686: quotetolist(qt_normalize(`x*x,2));
                    687:     $B=PNO(B:  [n_op,*,[internal,x],[internal,x]]
1.4       takayama  688: @end example
                    689:
                    690: @table @t
                    691: @item $B;2>H(B
1.34      ohara     692: @ref{nqt_match},
                    693: @ref{qt_rewrite},
                    694: @ref{qt_normalize}
1.4       takayama  695: @end table
                    696:
                    697: @comment --- ChangeLog $B$r=q$/(B. $BF05!(B. $B%=!<%9%3!<%I$N0LCV(B. $BJQ99F|;~(B $B$J$I(B CVS$B%5!<%P$r8+$k$?$a(B
                    698: @comment --- openxm $B$N30It$+$i$N4sM?$b=R$Y$k(B. Credit.
                    699: @noindent
                    700: ChangeLog
                    701: @itemize @bullet
1.34      ohara     702: @item   -----$B$^$@=q$$$F$J$$(B.
1.4       takayama  703: @end itemize
                    704:
1.34      ohara     705:
                    706:
                    707: @node qt_normalize,,, $B%/%*!<%H(B
                    708: @subsection @code{qt_normalize}
                    709: @findex qt_normalize
1.6       takayama  710:
                    711: @comment --- $B4X?t$N4JC1$J@bL@(B ---
                    712: @comment --- @itemx $B$OJ#?t$KBP$7$F@bL@$r0l$D$D$1$k>l9g$K;H$&(B ---
                    713: @table @t
1.34      ohara     714: @item qt_normalize(@var{Expr}[,@var{Mode}])
                    715: :: @var{Expr} $B$r(B fnode$BI8=`7A$KJQ49$9$k(B. @var{Mode}$B$K$h$jI8=`7A$X$NE83+%"%k%4%j%:%`$r;XDj$G$-$k(B.
1.6       takayama  716: @end table
                    717:
                    718: @table @var
                    719: @item return
1.34      ohara     720: quote$B7?(B
                    721: @item Expr
                    722: quote$B7?(B
                    723: @item Mode
                    724: $B@0?t(B
1.6       takayama  725: @end table
                    726:
1.34      ohara     727: fnode$B$O(B quote$B7?$N<BBN$G$"$k(B.
                    728: fnode $B$OLZ$G$"$j(B, $B7?(B id $B$*$h$S;R6!$+$i$J$k(B.
                    729: $B7?$*$h$S;R6!$r<h$j=P$94X?t$,(B funargs_to_quote $B$G$"$k(B.
                    730: $B$^$?(B fnode $B$r%j%9%H$KJQ49$9$k4X?t$,(B quotetolist $B$G$"$k(B.
                    731:
                    732: fnode $B$NI8=`7A$O%Q%?!<%s%^%C%A%s%0(B, $B=q$-49$($rMF0W$K$*$3$J$&$?$a$KF3F~$5$l$?(B.
                    733: fnode $B$NI8=`7A$r(B fn $B$H=q$/$H$-(B, $BI8=`7A$N(B BNF$BIwI=8=$G$NDj5A$O0J2<$N$H$*$j(B.
                    734: @example
                    735:  fn           = formula | functor(nf [,...]) | sum_of_monom
                    736:      fnode $B$NI8=`7A(B.  functor $B$O4X?t$h$S$@$7$_$?$$$J$b$N(B.
                    737:  sum_of_monom = monom [+ ...]
                    738:      $B%b%N%_%"%k$NOB(B
                    739:  monom        = [formula *] nfpow [* ...]
                    740:      $B%b%N%_%"%k(B
                    741:  nfpow        = nf | nf^(nf)
                    742:      $BQQ>hItJ,$NI8=`7A(B
                    743:  formula      = Risa object
                    744: @end example
                    745:
                    746:
1.6       takayama  747: @itemize @bullet
1.34      ohara     748: @item  @var{Expr} $B$r(B fnode$BI8=`7A$KJQ49$9$k(B. @var{Mode}$B$K$h$jI8=`7A$X$NE83+%"%k%4%j%:%`$r;XDj$G$-$k(B.
                    749: @item $BE83+$O:F5"E*$G$"$k(B.
                    750: @item $BF~NO$,(B fnode $B$KJQ49$5$l$?=i4|>uBV$G$O(B + $B$d(B * $B$O;R6!$,(B2$B?M$N(B binary operator
                    751: (b_op) $B$G$"$k$,(B, qt_normalize $B$r:nMQ$5$;$k$3$H$K$h$j(B, + $B$d(B * $B$OG$0U?M?t$N(B
                    752: $B;R6!$r;}$F$k(B n-ary operator $B$KJQ49$5$l$k(B.
                    753: @item n-ary operator $B$r4pAC$H$7$?(B fnode$BI8=`7A$rMQ$$$k$3$H$K$h$j(B, $B%Q%?!<%s%^%C%AMQ$N%Q%?!<%s$N?t$r8:$i$;$k$3$H$,7P83E*$K$o$+$C$F$$$k(B.
                    754: @item @var{Mode}=0. $BE83+$7$J$$(B. $B$3$l$,4{Dj$NF0:n(B.
                    755: @item @var{Mode}=1. $BE83+$9$k(B. $B$?$@$7(B x*x $BEy$r(B x^2 $BEy$KJQ49(B
                    756: @item @var{Mode}=2. $BE83+$9$k(B. $B$?$@$7(B x*x $BEy$r(B x^2 $BEy$KJQ49$7$J$$(B.
1.6       takayama  757: @end itemize
                    758:
1.34      ohara     759: @var{Mode} $B$N0c$$$K$D$$$F$O0J2<$NNc$b;29M$K(B.
                    760: @comment %%cfep/tests/2006-03-12-qt.rr
1.6       takayama  761: @example
1.34      ohara     762: ctrl("print_quote",2);
                    763: A=quote((x-y)*(x+y));
                    764:    $B=PNO(B:  ((x)-(y))*((x)+(y))
                    765: B=qt_normalize(A,0);
                    766:    $B=PNO(B: ((x)+((-1)*(y)))*((x)+(y))  Mode=0. $BE83+$O$5$l$J$$(B. +, * $B$O(B n_op (nary-op) $B$X(B.
                    767: quotetolist(B);
                    768:    $B=PNO(B: [n_op,*,[n_op,+,[internal,x],[n_op,*,[internal,-1],[internal,y]]],[n_op,+,[internal,x],[internal,y]]]
1.6       takayama  769:
1.34      ohara     770: B=qt_normalize(A,1);
                    771:    $B=PNO(B: ((x)^(2))+((x)*(y))+((-1)*((y)^(2)))+((-1)*(y)*(x))
                    772:            Mode=1. $BE83+$9$k(B. +, * $B$O(B n_op (nary-op) $B$X(B. $B6R$r$^$H$a$k(B.
                    773: quotetolist(B);
                    774:    $B=PNO(B: [n_op,+,[b_op,^,[internal,x],[internal,2]],[n_op,*,[internal,x],[internal,y]],[n_op,*,[internal,-1],[b_op,^,[internal,y],[internal,2]]],[n_op,*,[internal,-1],[internal,y],[internal,x]]]
1.6       takayama  775:
1.34      ohara     776: qt_normalize(A,2);
                    777:    $B=PNO(B: ((x)*(x))+((x)*(y))+((-1)*(y)*(x))+((-1)*(y)*(y))
                    778:            Mode=2. $BE83+$9$k(B. +, * $B$O(B n_op (nary-op) $B$X(B. $B6R$O;H$o$J$$(B.
                    779: quotetolist(B);
                    780:    $B=PNO(B: [n_op,+,[b_op,^,[internal,x],[internal,2]],[n_op,*,[internal,x],[internal,y]],[n_op,*,[internal,-1],[b_op,^,[internal,y],[internal,2]]],[n_op,*,[internal,-1],[internal,y],[internal,x]]]
1.6       takayama  781:
1.34      ohara     782: qt_normalize(`x^2,2);
                    783:    $B=PNO(B: (x)*(x)
                    784:        Mode=2. $B6R$O;H$o$J$$(B. n-ary $B$N(B * $B$X(B.
1.6       takayama  785: @end example
                    786:
                    787: @table @t
                    788: @item $B;2>H(B
1.34      ohara     789: @ref{nqt_match},
                    790: @ref{nqt_match_rewrite},
                    791: @ref{quotetolist},
                    792: @ref{quote_to_funargs}
1.6       takayama  793: @end table
                    794:
                    795: @comment --- ChangeLog $B$r=q$/(B. $BF05!(B. $B%=!<%9%3!<%I$N0LCV(B. $BJQ99F|;~(B $B$J$I(B CVS$B%5!<%P$r8+$k$?$a(B
1.34      ohara     796: @comment --- openxm $B$N30It$+$i$N4sM?$b=R$Y$k(B. Credit.
1.6       takayama  797: @noindent
                    798: ChangeLog
                    799: @itemize @bullet
1.34      ohara     800: @item -----$B$^$@=q$$$F$J$$(B.
1.6       takayama  801: @end itemize
                    802:
1.34      ohara     803:
                    804: @node qt_set_coef,,, $B%/%*!<%H(B
                    805: @subsection @code{qt_set_coef}
                    806: @findex qt_set_coef
1.6       takayama  807:
                    808: @comment --- $B4X?t$N4JC1$J@bL@(B ---
1.34      ohara     809: @comment --- @itemx $B$OJ#?t$KBP$7$F@bL@$r0l$D$D$1$k>l9g$K;H$&(B ---
1.6       takayama  810: @table @t
1.34      ohara     811: @item qt_set_coef(@var{ParamList})
                    812: :: $B0J2<(B @var{ParamList} $B$K8=$l$kB?9`<0JQ?t$rJQ?t$H$9$kM-M}4X?tBN$r78?t$H$9$k(B
                    813: $BHs2D49B?9`<0$r07$&(B.
1.6       takayama  814: @end table
                    815:
                    816: @table @var
                    817: @item return
1.34      ohara     818: $B%j%9%H(B
                    819: @item  ParamList
                    820: $B%j%9%H(B
1.6       takayama  821: @end table
                    822:
                    823: @itemize @bullet
1.34      ohara     824: @item $B0J2<(B @var{ParamList} $B$K8=$l$kB?9`<0JQ?t$rJQ?t$H$9$kM-M}4X?tBN$r78?t$H$9$k(B
                    825: $BHs2D49B?9`<0$r07$&(B.
                    826: @item $B$3$N@k8@$r$7$J$$$H78?tBN$r?t$H$9$kHs2D49B?9`<0$H$7$F7W;;$9$k(B.
                    827: @item qt_normalize $B$*$h$S$=$N5!G=$rMQ$$$k4X?t$,$3$N5!G=$N1F6A$r<u$1$k(B.
                    828: @item qt_comp $B4X?t$,$3$N5!G=$N1F6A$r<u$1$k(B.
1.6       takayama  829: @end itemize
                    830:
                    831: @example
1.34      ohara     832: ctrl("print_quote",2);
                    833: qt_set_coef([a]);
                    834: B=qt_normalize(quote((a*x+a)^2),2);
                    835:      $B=PNO(B: ((a^2)*(x)*(x))+((2*a^2)*(x))+(a^2)
                    836: qt_normalize(B+B,2);
                    837:      $B=PNO(B: ((2*a^2)*(x)*(x))+((4*a^2)*(x))+(2*a^2)
1.6       takayama  838: @end example
                    839:
                    840: @table @t
                    841: @item $B;2>H(B
1.34      ohara     842: @ref{qt_normalize}
1.6       takayama  843: @end table
                    844:
                    845: @comment --- ChangeLog $B$r=q$/(B. $BF05!(B. $B%=!<%9%3!<%I$N0LCV(B. $BJQ99F|;~(B $B$J$I(B CVS$B%5!<%P$r8+$k$?$a(B
1.34      ohara     846: @comment --- openxm $B$N30It$+$i$N4sM?$b=R$Y$k(B. Credit.
1.6       takayama  847: @noindent
                    848: ChangeLog
                    849: @itemize @bullet
1.34      ohara     850: @item -----$B$^$@=q$$$F$J$$(B.
1.6       takayama  851: @end itemize
                    852:
1.34      ohara     853:
                    854: @node qt_set_ord,,, $B%/%*!<%H(B
                    855: @subsection @code{qt_set_ord}
                    856: @findex qt_set_ord
1.6       takayama  857:
                    858: @comment --- $B4X?t$N4JC1$J@bL@(B ---
1.34      ohara     859: @comment --- @itemx $B$OJ#?t$KBP$7$F@bL@$r0l$D$D$1$k>l9g$K;H$&(B ---
1.6       takayama  860: @table @t
1.34      ohara     861: @item qt_set_ord(@var{VarList})
                    862: :: @var{VarList} $B$rJQ?t=g=x$H$9$k(B.
1.6       takayama  863: @end table
                    864:
                    865: @table @var
                    866: @item return
1.34      ohara     867: $B%j%9%H(B
                    868: @item VarList
                    869: $B%j%9%H(B
1.6       takayama  870: @end table
                    871:
                    872: @itemize @bullet
1.34      ohara     873: @item @var{VarList} $B$r<-=q<0$KMQ$$$?JQ?t=g=x$r0J2<;HMQ$9$k(B.
                    874: @item $B$3$N@k8@$r$7$J$$$H$"$kITDj85$K$D$$$F$N4{Dj$N<-=q<0=g=x(B-----$B$^$@=q$$$F$J$$(B---$B$rMQ$$$F9`$rHf3S$9$k(B.
                    875: @var{VarList} $B$K8=$l$J$$JQ?t$K$D$$$F$O$3$N=g=x$,E,MQ$5$l$k(B.
                    876: @item qt_normalize $B$*$h$S$=$N5!G=$rMQ$$$k4X?t$,$3$N5!G=$N1F6A$r<u$1$k(B.
                    877: @item qt_comp $B4X?t$,$3$N5!G=$N1F6A$r<u$1$k(B.
1.6       takayama  878: @end itemize
                    879:
                    880: @example
1.34      ohara     881: ctrl("print_quote",2);
                    882: qt_normalize(quote(x+y),2);
                    883:      $B=PNO(B: (x)+(y)
                    884: qt_set_ord([y,x]);
                    885:      $B=PNO(B: [y,x,z,u,v,w,p,q,r,s,t,a,b,c,d,e,f,g, $B0J2<>JN,(B ]
                    886: qt_normalize(quote(x+y),2);
                    887:      $B=PNO(B: (y)+(x)
1.6       takayama  888: @end example
                    889:
                    890: @table @t
                    891: @item $B;2>H(B
1.34      ohara     892: @ref{qt_normalize},
                    893: @ref{nqt_comp}
1.6       takayama  894: @end table
                    895:
                    896: @comment --- ChangeLog $B$r=q$/(B. $BF05!(B. $B%=!<%9%3!<%I$N0LCV(B. $BJQ99F|;~(B $B$J$I(B CVS$B%5!<%P$r8+$k$?$a(B
1.34      ohara     897: @comment --- openxm $B$N30It$+$i$N4sM?$b=R$Y$k(B. Credit.
1.6       takayama  898: @noindent
                    899: ChangeLog
                    900: @itemize @bullet
1.34      ohara     901: @item -----$B$^$@=q$$$F$J$$(B.
1.6       takayama  902: @end itemize
                    903:
1.8       takayama  904:
1.34      ohara     905: @node qt_set_weight,,, $B%/%*!<%H(B
                    906: @subsection @code{qt_set_weight}
                    907: @findex qt_set_weight
1.8       takayama  908:
1.34      ohara     909: @comment --- $B4X?t$N4JC1$J@bL@(B ---
                    910: @comment --- @itemx $B$OJ#?t$KBP$7$F@bL@$r0l$D$D$1$k>l9g$K;H$&(B ---
1.8       takayama  911: @table @t
1.34      ohara     912: @item qt_set_weight(@var{WeightVector})
                    913: :: $BJQ?t$K$D$$$F(B weight $B%Y%/%H%k$r@_Dj$9$k(B.
1.8       takayama  914: @end table
                    915:
                    916: @table @var
                    917: @item return
1.34      ohara     918: $B%j%9%H(B
                    919: @item WeightVector
                    920: $B%j%9%H(B
1.8       takayama  921: @end table
                    922:
1.34      ohara     923: fnode f $B$N(B weight w(f) $B$O<!$N<0$G7W;;$9$k(B.
                    924: @example
                    925:  f $B$,MU$N>l9g$O86B'(B 0. qt_weight_vector $B$G(B weight $B$,M?$($i$l$F$$$kITDj85$K(B
                    926:  $B$D$$$F$O$=$NCM(B.
                    927:
                    928:  f $B$,(Bnode$B$N>l9g$O<!$N5,B'$G:F5"E*$K$-$a$k(B.
                    929:    w(f+g) = max(w(f),w(g))
                    930:    w(f g) = w(f) + w(g)
                    931:    w(f^n) = n w(f)
                    932:    $B4X?t$K$D$$$F$O(B? -----$B$^$@=q$$$F$J$$(B.
                    933: @end example
                    934:
1.8       takayama  935: @itemize @bullet
1.34      ohara     936: @item @var{WeightVector} $B$G$^$:=g=x$NHf3S$r$7$F(B, $B$=$l$+$i(B qt_set_order $B$K$h$k=g=x(B, $B:G8e$K4{Dj$N=g=x$GHf3S$9$k(B.
                    937: @var{WeightVector} $B$K8=$l$J$$JQ?t$K$D$$$F$N(B weight $B$O(B 0 $B$H$J$k(B.
                    938: @item qt_normalize $B$*$h$S$=$N5!G=$rMQ$$$k4X?t$,$3$N5!G=$N1F6A$r<u$1$k(B.
                    939: qt_normalize $B$G$NE83+$G$O(B, $B$3$N=g=x$rMQ$$$F9`$,%=!<%H$5$l$k(B.
                    940: @item qt_comp $B$*$h$S$=$N5!G=$rMQ$$$k4X?t$,$3$N5!G=$N1F6A$r<u$1$k(B.
                    941: @item weight $B%Y%/%H%k$K$h$k=g=xHf3S$K$D$$$F$O%0%l%V%J4pDl$N@a(B@ref{dp_gr_main}$B$b;2>H(B.
1.8       takayama  942: @end itemize
                    943:
                    944: @example
1.34      ohara     945: ctrl("print_quote",2);
                    946: qt_set_weight([[x,-1],[y,-1]]);
                    947:      $B7k2L(B: [[x,-1],[y,-1]]
                    948: qt_normalize(quote( 1+(x+y)+(x+y)^2),1);
                    949:      $B7k2L(B: (1)+(y)+(x)+((y)^(2))+((y)*(x))+((x)^(2))+((x)*(y))
1.8       takayama  950: @end example
                    951:
                    952: @table @t
                    953: @item $B;2>H(B
1.34      ohara     954: @ref{qt_normalize},
                    955: @ref{qt_set_ord},
                    956: @ref{qt_set_weight},
                    957: @ref{dp_gr_main}
1.8       takayama  958: @end table
                    959:
                    960: @comment --- ChangeLog $B$r=q$/(B. $BF05!(B. $B%=!<%9%3!<%I$N0LCV(B. $BJQ99F|;~(B $B$J$I(B CVS$B%5!<%P$r8+$k$?$a(B
                    961: @comment --- openxm $B$N30It$+$i$N4sM?$b=R$Y$k(B. Credit.
                    962: @noindent
                    963: ChangeLog
                    964: @itemize @bullet
1.34      ohara     965: @item -----$B$^$@=q$$$F$J$$(B.
1.8       takayama  966: @end itemize
                    967:
                    968:
1.34      ohara     969: @node nqt_comp,,, $B%/%*!<%H(B
                    970: @subsection @code{nqt_comp}
                    971: @findex nqt_comp
                    972:
                    973: @comment --- $B4X?t$N4JC1$J@bL@(B ---
                    974: @comment --- @itemx $B$OJ#?t$KBP$7$F@bL@$r0l$D$D$1$k>l9g$K;H$&(B ---
1.8       takayama  975: @table @t
1.34      ohara     976: @item nqt_cmp(@var{Expr1},@var{Exprt2})
                    977: :: @var{Expr1} $B$H(B @var{Expr2} $B$N=g=x$rHf3S$9$k(B.
1.8       takayama  978: @end table
                    979:
                    980: @table @var
                    981: @item return
1.34      ohara     982: $B@0?t(B
                    983: @item Expr1, Expr2
                    984: quote$B7?(B
1.8       takayama  985: @end table
                    986:
                    987: @itemize @bullet
1.34      ohara     988: @item @var{Expr1} $B$H(B @var{Expr2} $B$N=g=x$rHf3S$9$k(B.
                    989: @item @var{Expr1} > @var{Exprt2} $B$J$i(B 1.
                    990: @item @var{Expr1} < @var{Exprt2} $B$J$i(B -1.
                    991: @item @var{Expr1} = @var{Exprt2} ($B$*$J$8=g=x(B) $B$J$i(B 0.
1.8       takayama  992: @end itemize
                    993:
                    994: @example
1.34      ohara     995: ctrl("print_quote",2);
                    996: qt_set_ord([y,x]); qt_set_weight([[x,-1],[y,-1]]);
                    997: [nqt_comp(`x,`y), nqt_comp(`y,`x), nqt_comp(`x,`x)];
                    998:      $B=PNO(B: [-1,1,0]
1.8       takayama  999: @end example
                   1000:
                   1001: @table @t
                   1002: @item $B;2>H(B
1.34      ohara    1003: @ref{qt_normalize},
                   1004: @ref{qt_set_ord},
                   1005: @ref{qt_set_weight}
1.8       takayama 1006: @end table
                   1007:
                   1008: @comment --- ChangeLog $B$r=q$/(B. $BF05!(B. $B%=!<%9%3!<%I$N0LCV(B. $BJQ99F|;~(B $B$J$I(B CVS$B%5!<%P$r8+$k$?$a(B
                   1009: @comment --- openxm $B$N30It$+$i$N4sM?$b=R$Y$k(B. Credit.
                   1010: @noindent
                   1011: ChangeLog
                   1012: @itemize @bullet
1.34      ohara    1013: @item $B$^$@=q$$$F$J$$(B.
1.8       takayama 1014: @end itemize
1.34      ohara    1015: @comment ****************************************************************
1.8       takayama 1016:
1.34      ohara    1017: @node qt_is_var,,, $B%/%*!<%H(B
                   1018: @subsection @code{qt_is_var}, @code{qt_is_coef}
                   1019: @findex qt_is_var
                   1020: @findex qt_is_coef
1.9       takayama 1021:
                   1022: @comment --- $B4X?t$N4JC1$J@bL@(B ---
1.34      ohara    1023: @comment --- @itemx $B$OJ#?t$KBP$7$F@bL@$r0l$D$D$1$k>l9g$K;H$&(B ---
1.9       takayama 1024: @table @t
1.34      ohara    1025: @item qt_is_var(@var{Expr})
                   1026: :: @var{Expr} $B$,ITDj85$KBP1~$9$k(B quote $B$J$i(B 1 $B$rLa$9(B.
                   1027: @item qt_is_coef(@var{Expr})
                   1028: :: @var{Expr} $B$,78?t$NM-M}4X?tBN$KB0$9$k$H$-(B 1 $B$rLa$9(B.
1.9       takayama 1029: @end table
                   1030:
                   1031: @table @var
                   1032: @item return
                   1033: $B@0?t(B
1.34      ohara    1034: @item Expr
                   1035: quote$B7?(B
1.9       takayama 1036: @end table
                   1037:
                   1038: @itemize @bullet
1.34      ohara    1039: @item  @var{Expr} $B$,ITDj85$KBP1~$9$k(B quote $B$J$i(B 1 $B$rLa$9(B.
                   1040: $B$=$&$G$J$$$H$-(B 0 $B$rLa$9(B.
1.9       takayama 1041: @end itemize
                   1042:
                   1043: @example
1.34      ohara    1044: [qt_is_var(quote(x)), qt_is_var(quote(3/2))];
                   1045:      $B=PNO(B: [1,0]
1.9       takayama 1046: @end example
                   1047:
                   1048: @table @t
                   1049: @item $B;2>H(B
1.34      ohara    1050: @ref{qt_rewrite},
                   1051: @ref{nqt_match_rewrite}
1.9       takayama 1052: @end table
                   1053:
1.34      ohara    1054: @comment --- ChangeLog $B$r=q$/(B. $BF05!(B. $B%=!<%9%3!<%I$N0LCV(B. $BJQ99F|;~(B $B$J$I(B CVS$B%5!<%P$r8+$k$?$a(B
                   1055: @comment --- openxm $B$N30It$+$i$N4sM?$b=R$Y$k(B. Credit.
1.9       takayama 1056: @noindent
                   1057: ChangeLog
                   1058: @itemize @bullet
1.34      ohara    1059: @item -----$B$^$@=q$$$F$J$$(B.
1.9       takayama 1060: @end itemize
1.34      ohara    1061: @comment ****************************************************************
1.8       takayama 1062:
1.34      ohara    1063: @node qt_rewrite,,, $B%/%*!<%H(B
                   1064: @subsection @code{qt_rewrite}
                   1065: @findex qt_rewrite
1.12      takayama 1066:
                   1067: @comment --- $B4X?t$N4JC1$J@bL@(B ---
1.34      ohara    1068: @comment --- @itemx $B$OJ#?t$KBP$7$F@bL@$r0l$D$D$1$k>l9g$K;H$&(B ---
1.12      takayama 1069: @table @t
1.34      ohara    1070: @item qt_rewrite(@var{Expr},@var{Rules},@var{Mode})
                   1071: :: @var{Expr} $B$r5,B'=89g(B @var{Rules} $B$rMQ$$$F=q$-49$($k(B.
1.12      takayama 1072: @end table
                   1073:
                   1074: @table @var
                   1075: @item return
1.34      ohara    1076: quote$B7?(B
                   1077: @item Expr
                   1078: quote$B7?(B
                   1079: @item Rules
                   1080: $B%j%9%H(B
                   1081: @item Mode
1.12      takayama 1082: $B@0?t(B
                   1083: @end table
                   1084:
                   1085: @itemize @bullet
1.34      ohara    1086: @item $B%f!<%68@8l$rMQ$$$FDj5A$5$l$?4X?t(B.
                   1087: @code{import("noro_rewrite.rr")}  $B$7$F$*$/$3$H(B.
                   1088: (noro_rewrite.rr $B$,(B OpenXM/lib/asir-contrib $B$KB8:_$7$J$$>l9g(B
                   1089: $B%=!<%9$N(B OpenXM/src/asir-contrib/testing/noro/new_rewrite.rr $B$r%3%T!<(B)
                   1090: @item @var{Expr} $B$r5,B'=89g(B @var{Rules} $B$rMQ$$$F=q$-49$($k(B.
                   1091: @item $B5,B'$NE,MQ$O(B fnode$BLZ$KBP$7$F:F5"E*$G$"$k(B.
                   1092:  $B0lJ}(B @code{nqt_match_rewrite} $B$G$O%H%C%W%l%Y%k$N$_$K5,B'$,E,MQ$5$l$k(B.
                   1093: @item $B5,B'=89g(B @var{Rules} $B$N3FMWAG$N=q$-J}$O(B @code{nqt_match()} $B$N(B
                   1094: @var{Pattern} $B$HF1$8=q$-J}(B.
                   1095: $B$D$^$j(B [$B%Q%?!<%s(B, $B=q$-49$(7k2L(B] $B$^$?$O(B
                   1096: [$B%Q%?!<%s(B, $B>r7o(B, $B=q$-49$(7k2L(B].
                   1097: @item @var{Mode} $B$N0UL#$O(B @ref{qt_normalize} $B$N(B @var{Mode} $B$HF1MM(B.
                   1098: $B%Q%?!<%s%^%C%A(B, $B=q$-49$($O(B @var{Mode} $B$G(B @code{qt_normalize()}
                   1099: $B$5$l$F$+$i?k9T$5$l$k(B.
1.12      takayama 1100: @end itemize
                   1101:
1.34      ohara    1102: $BCm0U(B: $B?t3XE*$K$O(B X*Y=Y*X $B$,2D49@-$rM?$($k5,B'$@$,(B, $B$3$l$r$=$N$^$^5,B'$H$7$F(B
                   1103:            $BM?$($k$H=q$-49$($,Dd;_$7$J$$(B. $B<!$NNc$G$O(B, $B>e$NNc$N$h$&$K=g=xHf3S$7(B, $B$?$H$($P(B,
                   1104:            $B=g=x$,Bg$-$/$J$k>l9g$N$_$K=q$-49$($k$Y$-$G$"$k(B.
                   1105: @example
                   1106: import("noro_rewrite.rr");
                   1107: R=[[`X*Y,`nqt_comp(Y*X,X*Y)>0, `Y*X]];
                   1108: qt_rewrite(`(x-y)^2,R,2);
                   1109:      $B=PNO(B: quote(x*x+-2*x*y+y*y)
                   1110: @end example
                   1111:
                   1112: $B30@QBe?t$N7W;;(B (asir-contrib $B$r%m!<%I$7$?>uBV(B).
                   1113: @example
                   1114: import("noro_rewrite.rr");
                   1115: Rext0=[quote(X*Y),quote(qt_is_var(X) && qt_is_var(Y) && nqt_comp(Y,X)>0),
                   1116:                   quote(-Y*X)];
                   1117: Rext1=[quote(X^N),quote(eval_quote(N)>=2),quote(0)];
                   1118: Rext2=[quote(X*X),quote(0)];
                   1119: Rext=[Rext0,Rext1,Rext2];
                   1120: qt_rewrite(quote( (x+2*y)*(x+4*y) ), Rext,1);
                   1121:      $B=PNO(B: 2*x*y
                   1122:
                   1123: qt_set_coef([a,b,c,d]);
                   1124: qt_rewrite(quote((a*x+b*y)*(c*x+d*y)), Rext,1);
                   1125:      $B=PNO(B: (d*a-c*b)*x*y
                   1126:
                   1127: @end example
                   1128:
                   1129: $BHyJ,$N7W;;(B (asir-contrib $B$r%m!<%I$7$?>uBV(B).
1.12      takayama 1130: @example
1.34      ohara    1131: import("noro_rewrite.rr");
                   1132: qt_set_coef([a,b]);
                   1133: Rd1=[`d(X+Y), `d(X)+d(Y)];
                   1134: Rd2=[`d(X*Y),`d(X)*Y+X*d(Y)];
                   1135: Rd3=[`d(N), `qt_is_coef(N), `0];
                   1136: Rd4=[`d(x),`1];
                   1137: Rd=[Rd1,Rd2,Rd3,Rd4];
                   1138: B=qt_rewrite( `d( (a*x+b)^3),Rd,2);
                   1139:      $B=PNO(B: quote(3*a^3*x*x+6*b*a^2*x+3*b^2*a)
                   1140: fctr(eval_quote(B));
                   1141:      $B=PNO(B: [[3,1],[a,1],[a*x+b,2]]
1.12      takayama 1142: @end example
                   1143:
                   1144: @table @t
                   1145: @item $B;2>H(B
1.34      ohara    1146: @ref{nqt_match},
                   1147: @ref{nqt_match_rewrite},
                   1148: @ref{qt_normalize}
1.12      takayama 1149: @end table
                   1150:
                   1151: @comment --- ChangeLog $B$r=q$/(B. $BF05!(B. $B%=!<%9%3!<%I$N0LCV(B. $BJQ99F|;~(B $B$J$I(B CVS$B%5!<%P$r8+$k$?$a(B
1.34      ohara    1152: @comment --- openxm $B$N30It$+$i$N4sM?$b=R$Y$k(B. Credit.
1.12      takayama 1153: @noindent
                   1154: ChangeLog
                   1155: @itemize @bullet
1.34      ohara    1156: @item qt $B7O$N4X?t$N867?$O(B OpenXM/src/asir-contrib/testing/tr.rr $B$G$"$k(B.
                   1157: $B$3$N%f!<%68@8l$K$h$k3+H/$,(B 2005$BG/$N=U$^$G9T$o$l(B, $B$=$N$"$HAH$_9~$_4X?t<gBN$N(B
                   1158: qt $B7O$N4X?t$,3+H/$5$l$?(B.
                   1159: @item qt $B7O$N4X?t$K$D$$$F$N$=$NB>$N;29MJ88%(B:
                   1160:   OpenXM/doc/Papers/2005-rims-noro.tex $B$*$h$S(B
                   1161:   OpenXM/doc/Papers/2005-rims-noro.tm (TeXmacs$B$N5-;v(B).
                   1162: @item Todo: qt $B7O$N4X?t$rMQ$$$?$*$b$7$m$$7W;;$r(B Risa/Asir $B%8%c!<%J%k$N5-;v$H$7$F=q$/(B.
1.13      takayama 1163: @end itemize
                   1164:
1.34      ohara    1165: @comment ****************************************************************
                   1166:
                   1167: @node $BJ8;zNs=hM}(B,,, $B<B83E*;EMM$N4X?t(B
                   1168: @section $BJ8;zNs=hM}(B
1.13      takayama 1169:
1.34      ohara    1170: @comment --- $B"~"~"~"~(B  $B4X?t(B copyright $B$N@bL@(B $B"~"~"~"~(B
                   1171: @node copyright,,, $BJ8;zNs=hM}(B
                   1172: @subsection @code{copyright}
                   1173: @findex copyright
1.13      takayama 1174:
                   1175: @comment --- $B4X?t$N4JC1$J@bL@(B ---
                   1176: @table @t
1.34      ohara    1177: @item copyright()
                   1178: :: Risa/Asir $B$N(B copyright $BI=<($rJ8;zNs$H$7$FLa$9(B.
1.13      takayama 1179: @end table
                   1180:
                   1181: @table @var
                   1182: @item return
1.34      ohara    1183: $BJ8;zNs(B
1.13      takayama 1184: @end table
                   1185:
                   1186: @itemize @bullet
                   1187: @item
1.34      ohara    1188: Risa/Asir $B$N(B copyright $BI=<($rJ8;zNs$H$7$FLa$9(B.
1.13      takayama 1189: @end itemize
                   1190:
                   1191: @example
1.34      ohara    1192: [1150] copyright();
                   1193: This is Risa/Asir, Version 20040312 (Kobe Distribution).
                   1194: Copyright (C) 1994-2000, all rights reserved, FUJITSU LABORATORIES LIMITED.
                   1195: Copyright 2000-2003, Risa/Asir committers, http://www.openxm.org/.
                   1196: GC 6.2(alpha6) copyright 1988-2003, H-J. Boehm, A. J. Demers, Xerox, SGI, HP.
                   1197: PARI 2.0.17, copyright 1989-1999, C. Batut, K. Belabas, D. Bernardi,
                   1198:    H. Cohen and M. Olivier.
1.13      takayama 1199: @end example
                   1200:
1.34      ohara    1201: @comment --- ChangeLog $B$r=q$/(B. $B%=!<%9%3!<%I$N0LCV(B. $BJQ99F|;~(B $B$J$I(B CVS$B%5!<%P$r8+$k$?$a(B
1.13      takayama 1202: @noindent
                   1203: ChangeLog
                   1204: @itemize @bullet
1.34      ohara    1205: @item $B$3$N4X?t$O(B texmacs $BMQ$K=q$+$l$?(B (2004-03).
                   1206: @item OpenXM_contrib2/asir2000 $B$N2<$N0J2<$N%U%!%$%k$r$_$h(B. builtin/miscf.c 1.21,
                   1207:       parse/glob.c 1.47.
                   1208: @end itemize
                   1209:
                   1210:
                   1211:
                   1212: @comment --- $B"~"~"~"~(B  $B4X?t(B string_to_tb, ... $B$N@bL@(B $B"~"~"~"~(B
                   1213: @comment --- $BJ#?t$N4X?t$r$^$H$a$F@bL@$9$kNc(B ---
                   1214: @node string_to_tb tb_to_string write_to_tb,,, $BJ8;zNs=hM}(B
                   1215: @subsection @code{string_to_tb}, @code{tb_to_string}, @code{write_to_tb}
                   1216: @findex string_to_tb
                   1217: @findex tb_to_string
                   1218: @findex write_to_tb
                   1219:
                   1220: @comment --- $B4X?t$N4JC1$J@bL@(B ---
                   1221: @comment --- @itemx $B$OJ#?t$KBP$7$F@bL@$r0l$D$D$1$k>l9g$K;H$&(B ---
                   1222: @table @t
                   1223: @item string_to_tb(@var{s})
                   1224: @itemx tb_to_string(@var{tb})
                   1225: @itemx write_to_tb(@var{s},@var{tb})
                   1226: :: $BJ8;zNs2DJQD9G[Ns7?(B(text buffer)$B$N%G!<%?$N=hM}(B
                   1227: @end table
                   1228:
                   1229: @table @var
                   1230: @item return
                   1231: $BJ8;zNs2DJQD9G[Ns7?(B(string_to_tb), $BJ8;zNs7?(B(tb_to_string)
                   1232: @item s
                   1233: $BJ8;zNs(B
                   1234: @item tb
                   1235: $BJ8;zNs2DJQD9G[Ns7?(B
                   1236: @end table
                   1237:
                   1238: @itemize @bullet
                   1239: @item
                   1240: @code{string_to_tb(@var{s})} $B$O(B, $BJ8;zNs(B @var{s} $B$r$O$8$a$NMWAG$H$9$k(B
                   1241: $BJ8;zNs2DJQD9G[Ns7?%*%V%8%'%/%H$r@8@.$9$k(B.
                   1242: @item
                   1243: @code{tb_to_string_(@var{tb})} $B$O(B,
                   1244: $BJ8;zNs2DJQD9G[Ns7?%*%V%8%'%/%H(B @var{tb} $B$+$iDL>o$NJ8;zNs%*%V%8%'%/%H$r@8@.$9$k(B.
                   1245: @item
                   1246: @code{write_to_tb(@var{s},@var{tb})} $B$O(B, $BJ8;zNs(B @var{s} $B$r(B
                   1247: $BJ8;zNs2DJQD9G[Ns7?%*%V%8%'%/%H(B @var{tb} $B$X=q$-=P$9(B.
                   1248: @item @var{SS} $B$rJ8;zNsJQ?t$H$9$k$H$-(B,
                   1249: @var{SS} += "$BJ8;zNs(B" $B$G(B @var{SS} $B$XJ8;zNs$r=q$-B-$7$F$$$/$3$H$,$G$-$k$,(B,
                   1250: $BL5BL$J%a%b%j$rBgNL$K>CHq$9$k(B.
                   1251: $BBe$j$K4X?t(B @code{write_to_tb} $B$rMQ$$$k$Y$-$G$"$k(B.
                   1252: $BJ8;zNs2DJQD9G[Ns7?%*%V%8%'%/%H$OJ8;zNs$N2DJQD9$NG[Ns$G$"$j%a%b%j4IM}$KM%$7$$(B
                   1253: $B%G!<%?9=B$$G$"$k(B.
                   1254: @end itemize
                   1255:
                   1256: @example
                   1257: [219] T=string_to_tb("");
                   1258:
                   1259: [220] write_to_tb("Hello",T);
                   1260: 0
                   1261: [221] write_to_tb(" world!",T);
                   1262: 0
                   1263: [222] tb_to_string(T);
                   1264: Hello world!
                   1265: @end example
                   1266:
                   1267:
                   1268: @comment --- ChangeLog $B$r=q$/(B. $B%=!<%9%3!<%I$N0LCV(B. $BJQ99F|;~(B $B$J$I(B CVS$B%5!<%P$r8+$k$?$a(B
                   1269: @noindent
                   1270: ChangeLog
                   1271: @itemize @bullet
                   1272: @item
                   1273:  $B$3$N4X?t$O(B 2004-3 $B$K(B print_tex_form $B$r8zN(2=$9$k$?$a$K=q$+$l$?(B.
                   1274: @item
                   1275:  OpenXM_contrib2/asir2000 $B$N2<$N0J2<$N%U%!%$%k$r8+$h(B.
                   1276: io/ox_asir.c 1.52, builtin/strobj.c 1.12--1.13, 1.16,
                   1277: engine/str.c 1.5, parse/quote.c 1.9.
1.13      takayama 1278: @item
1.34      ohara    1279:  rtostr $B$,(B text buffer $B7?$N%G!<%?$K4X$7$F$*$=$+$C$?(B. $BB.EY$N2~A1$O(B
                   1280:  asir2000/io/pexpr_body.c 1.2, asir2000/parse/lex.c 1.32.
1.14      takayama 1281: @end itemize
                   1282:
1.34      ohara    1283:
                   1284: @node set_print_function,,, $BJ8;zNs=hM}(B
                   1285: @subsection @code{set_print_function}
                   1286: @findex set_print_function
1.14      takayama 1287:
                   1288: @comment --- $B4X?t$N4JC1$J@bL@(B ---
                   1289: @table @t
1.34      ohara    1290: @item set_print_function([@var{fname}])
                   1291: :: $B2hLLI=<(MQ$N4X?t$rEPO?(B
1.14      takayama 1292: @end table
                   1293:
                   1294: @table @var
                   1295: @item return
1.34      ohara    1296: $B@0?t(B
                   1297: @item fname
                   1298: $BJ8;zNs(B
1.14      takayama 1299: @end table
                   1300:
                   1301: @itemize @bullet
1.34      ohara    1302: @item
                   1303: @code{set_print_function} $B$O(B @code{fname(F)} $B$rDL>o$N2hLLI=<(4X?t$NBe$o$j$K$h$V(B.
                   1304: @code $B0z?t$,$J$$>l9g$O2hLLI=<(4X?t$r%G%U%)!<%k%H$XLa$9(B.
                   1305: @code Asir-contrib $B$O$3$N4X?t$rMQ$$$F=PNO4X?t$r(B Asir-contrib $BMQ$KJQ99$7$F$$$k(B.
1.14      takayama 1306: @end itemize
                   1307:
                   1308: @example
1.34      ohara    1309: [219] def my_output(F) @{
                   1310:            print("Out: ",0); print(rtostr(F));
                   1311:       @}
                   1312: [220] set_print_function("my_output");
                   1313: Out: 0
                   1314: [221]  1+2;
                   1315: Out: 3
1.14      takayama 1316: @end example
                   1317:
                   1318: @table @t
                   1319: @item $B;2>H(B
1.34      ohara    1320: @ref{rtostr}
1.14      takayama 1321: @end table
                   1322:
                   1323: @noindent
                   1324: ChangeLog
                   1325: @itemize @bullet
1.34      ohara    1326: @item $B$3$N4X?t$O(B 2001-9-4 $B$K(B asir-contrib $B$N$?$a$KF3F~$5$l$?(B.
                   1327:  $BJQ99$r$&$1$?%=!<%9%3!<%I$O(B builtin/print.c 1.11 $B$G$"$k(B.
1.12      takayama 1328: @end itemize
1.13      takayama 1329:
1.15      takayama 1330:
1.34      ohara    1331: @node sprintf,,, $BJ8;zNs=hM}(B
1.28      ohara    1332: @subsection @code{printf}, @code{fprintf}, @code{sprintf}
1.15      takayama 1333: @findex sprintf
                   1334:
                   1335: @table @t
1.27      ohara    1336: @item printf(@var{format}[,@var{args}])
1.28      ohara    1337: @item fprintf(@var{fd},@var{format}[,@var{args}])
1.15      takayama 1338: @item sprintf(@var{format}[,@var{args}])
                   1339: :: C $B$K;w$?%W%j%s%H4X?t(B
                   1340: @end table
                   1341:
                   1342: @table @var
                   1343: @item return
1.28      ohara    1344: $B@0?t(B(printf,fprintf), $BJ8;zNs(B(sprintf)
1.15      takayama 1345: @item format
                   1346: $BJ8;zNs(B
1.28      ohara    1347: @item fd
                   1348: $BHsIi@0?t(B($B%U%!%$%k5-=R;R(B)
1.15      takayama 1349: @item args
                   1350: $B%*%V%8%'%/%H(B
                   1351: @end table
                   1352:
                   1353: @itemize @bullet
                   1354: @item
1.27      ohara    1355: @code{printf} $B$O=q<0J8;zNs(B @var{format } $B$K$7$?$,$$(B, $B%*%V%8%'%/%H(B @var{args} $B$rI8=`=PNO$K=q$-=P$9(B.
1.15      takayama 1356: @item
1.28      ohara    1357: @code{fprintf} $B$O7k2L$r(B, $B%U%!%$%k5-=R;R(B @var{fd} $B$N;X$9%U%!%$%k$K=q$-=P$9(B.
                   1358: @item
1.27      ohara    1359: @code{sprintf} $B$O7k2L$rJ8;zNs$GJV$7(B, $BI8=`=PNO$K$O=q$-=P$5$J$$(B.
                   1360: @item
                   1361: $B=q<0J8;zNs$NCf$G(B @code{%a} (any) $B$,MxMQ2DG=(B.
                   1362: @var{args} $B$N8D?t$O=q<0J8;zNs$NCf$N(B @code{%a} $B$N8D?t$KEy$7$/$9$k$3$H(B.
1.28      ohara    1363: @item
                   1364: $B%U%!%$%k5-=R;R$O(B, @code{open_file} $B4X?t$rMQ$$$FF@$k$3$H(B.
1.15      takayama 1365: @end itemize
                   1366:
                   1367: @example
1.27      ohara    1368: [0] printf("%a: rat = %a\n",10,x^2-1)$
                   1369: 10: rat = x^2-1
                   1370: [1] S=sprintf("%a: rat = %a",20,x^2-1)$
                   1371: [2] S;
                   1372: 20: rat = x^2-1
1.28      ohara    1373: [3] Fd=open_file("hoge.txt","w");
                   1374: 0
                   1375: [4] fprintf(Fd,"Poly=%a\n",(x-1)^3)$
                   1376: [5] close_file(Fd)$
                   1377: [6] quit;
                   1378:
                   1379: $ cat hoge.txt
                   1380: Poly=x^3-3*x^2+3*x-1
1.15      takayama 1381: @end example
                   1382:
                   1383: @table @t
                   1384: @item $B;2>H(B
1.28      ohara    1385: @ref{rtostr},@ref{open_file},@ref{close_file}
1.15      takayama 1386: @end table
                   1387:
                   1388: @comment --- ChangeLog $B$r=q$/(B. $BF05!(B. $B%=!<%9%3!<%I$N0LCV(B. $BJQ99F|;~(B $B$J$I(B CVS$B%5!<%P$r8+$k$?$a(B
                   1389: @comment --- openxm $B$N30It$+$i$N4sM?$b=R$Y$k(B. Credit.
                   1390: @noindent
                   1391: ChangeLog
                   1392: @itemize @bullet
1.34      ohara    1393: @item
1.27      ohara    1394:  $B4X?t(B sprintf$B$O(B 2004-7-13 $B$K%3%_%C%H$5$l$?(B.
1.15      takayama 1395:  $BJQ99$r$&$1$?%=!<%9%3!<%I$O(B builtin/strobj (1.50) $B$G$"$k(B.
1.34      ohara    1396: @item
1.27      ohara    1397:  $B4X?t(B printf$B$O(B 2007-11-8 $B$K%3%_%C%H$5$l$?(B.
                   1398:  $BJQ99$r$&$1$?%=!<%9%3!<%I$O(B builtin/print.c (1.23) $B$G$"$k(B.
1.34      ohara    1399: @item
1.28      ohara    1400:  $B4X?t(B fprintf$B$O(B 2008-11-18 $B$K%3%_%C%H$5$l$?(B.
                   1401:  $BJQ99$r$&$1$?%=!<%9%3!<%I$O(B builtin/file.c (1.25) $B$G$"$k(B.
1.34      ohara    1402: @item
1.15      takayama 1403:  @code{%a} $B$O(B Maple $B$N(B sprintf $B$N??;w$+(B.
                   1404: @end itemize
                   1405:
                   1406:
1.34      ohara    1407: @node $B%0%l%V%J!<4pDl(B,,, $B<B83E*;EMM$N4X?t(B
                   1408: @section $B%0%l%V%J!<4pDl(B
                   1409:
                   1410: @comment --- $B"~"~"~"~(B  $B4X?t(B dp_gr_main $B$N@bL@(B $B"~"~"~"~(B
                   1411: @comment --- $BJ#?t$N4X?t$r$^$H$a$F@bL@$9$kNc(B ---
                   1412: @node dp_gr_main,,, $B%0%l%V%J!<4pDl(B
                   1413: @subsection @code{dp_gr_main}
                   1414: @findex dp_gr_main
1.15      takayama 1415:
1.34      ohara    1416: @comment --- $B4X?t$N4JC1$J@bL@(B ---
                   1417: @comment --- @itemx $B$OJ#?t$KBP$7$F@bL@$r0l$D$D$1$k>l9g$K;H$&(B ---
1.15      takayama 1418: @table @t
1.34      ohara    1419: @item dp_gr_main(@var{f} | v=@var{vv}, order=@var{oo}, homo=@var{n}, matrix=@var{m}, block=@var{b}, sugarweight=@var{sw})
                   1420: :: dp_gr_main $B$N?7$7$$%$%s%?%U%'!<%9(B.
1.15      takayama 1421: @end table
                   1422:
                   1423: @table @var
                   1424: @item return
1.34      ohara    1425: $B%j%9%H(B ($B%0%l%V%J4pDl(B. $B:F5"I=8=B?9`<0$+J,;6I=8=B?9`<0$N%j%9%H(B)
1.15      takayama 1426: @item f
1.34      ohara    1427: $B%j%9%H(B  ($BF~NOB?9`<07O(B. $B:F5"I=8=B?9`<0$+J,;6I=8=B?9`<0$N%j%9%H(B)
                   1428: @item vv
                   1429: $B%j%9%H(B  ($BJQ?t$N%j%9%H(B)
                   1430: @item oo
                   1431: $B%j%9%H(B  ($B=g=x$r$"$i$o$9%j%9%H(B)
                   1432: @item n
                   1433: 0 $B$+(B1 (homogenization $B$r$9$k$+(B)
                   1434: @item m
                   1435: $B=g=x$r(B matrix $B$GI=8=$9$k>l9g(B (cf. dp_ord).
                   1436: @item b
                   1437: ???
                   1438: @item sw
                   1439: Sugar strategy $B$rE,MQ$9$k$H$-$N(B weight vector. $BA4$F$NMWAG$OHsIi(B.
1.15      takayama 1440: @end table
                   1441:
                   1442: @itemize @bullet
                   1443: @item
1.34      ohara    1444:  @code{dp_gr_main(@var{f})} $B$O(B, @var{f} $B$N%0%l%V%J4pDl$r7W;;$9$k(B.
                   1445:  $B%0%l%V%J4pDl$O=g=x$rJQ$($k$H$=$N7A$,JQ$o$k(B.   asir $B$G$O$$$^$^$G=g=x$N;XDjJ}K!$,(B
                   1446:  $B7OE}$@$C$F$$$J$+$C$?(B.
                   1447:  dp_gr_main $B$N?7$7$$%$%s%?%U%'!<%9$G$O=g=x$r$"$kJ8K!$K=>$$;XDj$9$k(B.
                   1448: @comment  ~taka/this03/misc-2003/A2/dp
                   1449: @item $B=g=x(B order $B$O<!$NJ8K!$GDj5A$9$k(B.  @{, @} $B$O(B 0 $B2s0J>e$N7+$jJV$7$r0UL#$9$k(B.
                   1450: @example
                   1451:   order         : '[' orderElement @{ ',' orderElement @} ']'
                   1452:   orderElement   :  weightVec | builtinOrder
                   1453:   weightVec     : '[' weightElement @{ ',' weightElement @} ']'
                   1454:   builtiniOrder : '[' orderName  ',' setOfVariables ']'
                   1455:   weightElement :   NUMBER | setOfVariables ',' NUMBER
                   1456:   setOfVariables:  V | range(V,V)
                   1457:   orderName    : @@grlex | @@glex | @@lex
                   1458: @end example
                   1459: $B$3$3$G(B @code{V} $B$O(B $BJQ?tL>(B, @code{NUMBER} $B$O@0?t$r$"$o$i$9(B.
                   1460: $BNc(B1:  @code{v=[x,y,z,u,v], order=[[x,10,y,5,z,1],[@@grlex,range(x,v)]]}
                   1461: $B$O(B @code{x},@code{y},@code{z} $B$,$=$l$>$l(B weight 10, 5, 1 $B$r$b$D(B
                   1462: $B=g=x$GHf3S$7$?$"$H(B, @code{[x,y,z,u,v]} $B$K$D$$$F$N(B
                   1463: graded reverse lexicographic order $B$r(B tie-breaker $B$H$7$FMQ$$$k$3$H$r0UL#$9$k(B.
                   1464: $B;29M=q(B: B.Sturmfels: Gr\"obner Bases and Convex Polytopes (1995).
                   1465: M.Saito, B.Sturmfels, N.Takayama:
                   1466: Gr\"obner Deformations of Hypergeometric Differential Equations (2000).
                   1467: @item
                   1468:   $B=g=xMWAG(B (orderElement) $B$N;XDjJ}K!$O(B
                   1469:  (1) $BJQ?tL>$^$?$O(B range$B$G;XDj$5$l$?JQ?t$N=89g$H=E$_$NCM$N7+$jJV$7(B
                   1470:  (2) $B=E$_$NCM$rJQ?t%j%9%H$N=gHV$KJB$Y$kJ}K!(B
                   1471:  (3) $BJQ?tL>$^$?$O(B range$B$G;XDj$5$l$?JQ?t$N=89g$H=g=xL>$NAH(B
                   1472:  $B$N;0DL$j$N4pACE*J}K!$,$"$k(B.
                   1473:  $B;w$?;XDjJ}K!$,(B Macaulay, Singular, CoCoA, Kan/sm1 $BEy$N4DO@%7%9%F%`$G(B
                   1474:  $B;HMQ$5$l$F$$$?(B. Risa/Asir $B$N;XDjJ}K!$O$3$l$i$N%7%9%F%`$N;XDjJ}K!$r;29M$K(B
                   1475:  $B$5$i$K2~NI$r2C$($?$b$N$G=@Fp@-$,9b$$(B.
                   1476: @item
                   1477:   order $B$N(B tie-breaker $B$O(B grlex $B$,%G%U%)!<%k%H(B.
1.15      takayama 1478: @item
1.34      ohara    1479:   $BJ,;6I=8=B?9`<0$r0z?t$H$7$?$H$-$O7k2L$bJ,;6I=8=B?9`<0$H$7$FLa$k(B.
                   1480:   order $B;XDj$K$b$A$$$k%G%U%)!<%k%H$NJQ?tL>$O$3$N$H$-(B x0, x1, x2, ... $B$H$J$k(B.
1.15      takayama 1481: @item
1.34      ohara    1482:   $B%*%W%7%g%s$NCM$O(B option_list $B%-!<%o!<%I$rMQ$$$F%j%9%H$GM?$($F$b$h$$(B.
                   1483:   $B2<$NNc$r;2>H(B.
1.15      takayama 1484: @end itemize
                   1485:
                   1486: @example
1.34      ohara    1487: [218] load("cyclic");
                   1488: [219] V=vars(cyclic(4));
                   1489: [c0,c1,c2,c3]
                   1490: [220]dp_gr_main(cyclic(4) | v=V, order=[[c0,10,c1,1],[c2,5],[@@grlex,range(c0,c3)]]);
                   1491: [ 10 1 0 0 ]
                   1492: [ 0 0 5 0 ]
                   1493: [ R R R R ]
                   1494: [(-c3^6+c3^2)*c2^2+c3^4-1,c3^2*c2^3+c3^3*c2^2-c2-c3,
                   1495:  (c3^4-1)*c1+c3^5-c3,(c2-c3)*c1+c3^4*c2^2+c3*c2-2*c3^2,-c1^2-2*c3*c1-c3^2,
                   1496:  c0+c1+c2+c3]
1.15      takayama 1497:
1.34      ohara    1498: [1151]  F=map(dp_ptod,katsura(4), vars(katsura(4)));
                   1499: [(1)*<<1,0,0,0,0>>+(2)*<<0,1,0,0,0>>+ ... ]
                   1500: [1152] dp_gr_main(F | order=[[range(x0,x3),1]]);
                   1501: [ 1 1 1 1 0 ]
                   1502: [ R R R R R ]
                   1503: [(47774098944)*<<0,0,0,0,13>>+ ... ]
1.15      takayama 1504:
1.34      ohara    1505: [1153] Opt=[["v",[x,y]], ["order",[[x,5,y,1]]]];
                   1506: [[v,[x,y]],[order,[[x,5,y,1]]]]
                   1507: [1154]  dp_gr_main([x^2+y^2-1,x*y-1] | option_list=Opt);
                   1508: [ 5 1 ]
                   1509: [ R R ]
                   1510: [-y^4+y^2-1,x+y^3-y]
                   1511: @end example
1.15      takayama 1512:
1.34      ohara    1513: @comment --- ChangeLog $B$r=q$/(B. $BF05!(B. $B%=!<%9%3!<%I$N0LCV(B. $BJQ99F|;~(B $B$J$I(B CVS$B%5!<%P$r8+$k$?$a(B
                   1514: @noindent
                   1515: ChangeLog
                   1516: @itemize @bullet
                   1517: @item $B$3$N4X?t$O(B 2003-12 $B$+$i(B 2004-2 $B$N;O$a$KBg$-$J=$@5$,9T$o$l$?(B.
                   1518: @item
                   1519:  @code{setOfVariables}$B$NI=8=$N$?$a$K(B range $B%*%V%8%'%/%H$,F3F~$5$l$?(B.
                   1520: @item
                   1521:   $B%0%l%V%J4pDl$O=g=x$rJQ$($k$H$=$N7A$,JQ$o$k(B.   asir $B$G$O$$$^$^$G=g=x$N;XDjJ}K!$,(B
                   1522:   $B7OE}$@$C$F$$$J$+$C$?(B.
                   1523:   dp_gr_main $B$N?7$7$$%$%s%?%U%'!<%9$G$O=g=x$r$"$kJ8K!$K=>$$;XDj$9$k(B.
                   1524: @item
                   1525:   OpenXM_contrib2/asir2000 $B$N2<$N<!$N3F%U%!%$%k$,=$@5$r$&$1$?(B.
                   1526: builtin/gr.c 1.56--1.57,
                   1527: builtin/dp-supp.c 1.27--1.31 (create_composite_order_spec),
                   1528: builtin/dp.c 1.46--1.48 (parse_gr_option),
                   1529: engine/Fgfs.c 1.20,
                   1530: engine/dist.c 1.27--1.28
                   1531: engine/nd.c 1.89,
                   1532: include/ca.h 1.42--1.43,
                   1533: io/pexpr.c 1.28,
                   1534: io/sexpr.c 1.26,
                   1535: parse/arith.c 1.11,
                   1536: parse/glob.c 1.44-1.45,
                   1537: parse/lex.c 1.29,
                   1538: parse/parse.h 1.23--1.26
                   1539: @item
                   1540:  Todo: return $B%-!<%o!<%I$GLa$jCM$N%G!<%?$r(B quote $B$N%j%9%H$K$G$-$k$h$&$K(B.
                   1541:   attribute, ring $B9=B$BN(B.
                   1542: @end itemize
                   1543:
                   1544: @comment --- $B"~"~"~"~(B  $B4X?t(B dp_gr_main $B$N@bL@(B $B"~"~"~"~(B
                   1545: @node dp_weyl_gr_main,,, $B%0%l%V%J!<4pDl(B
                   1546: @subsection @code{dp_weyl_gr_main}
                   1547: @findex dp_weyl_gr_main
                   1548:
                   1549: @comment --- $B4X?t$N4JC1$J@bL@(B ---
                   1550: @comment --- @itemx $B$OJ#?t$KBP$7$F@bL@$r0l$D$D$1$k>l9g$K;H$&(B ---
                   1551: @table @t
                   1552: @item dp_weyl_gr_main(@var{f} | v=@var{vv}, order=@var{oo}, homo=@var{n}, matrix=@var{m}, block=@var{b}, sugarweight=@var{sw})
                   1553: :: dp_weyl_gr_main $B$N?7$7$$%$%s%?%U%'!<%9(B.  dp_gr_main $B$HF1$87A<0$G$"$k(B.
                   1554: @end table
1.15      takayama 1555:
1.34      ohara    1556: @table @var
                   1557: @item return
                   1558: $B%j%9%H(B ($B%0%l%V%J4pDl(B. $B:F5"I=8=B?9`<0$+J,;6I=8=B?9`<0$N%j%9%H(B)
                   1559: @item f
                   1560: $B%j%9%H(B  ($BF~NOB?9`<07O(B. $B:F5"I=8=B?9`<0$+J,;6I=8=B?9`<0$N%j%9%H(B)
                   1561: @item vv
                   1562: $B%j%9%H(B  ($BJQ?t$N%j%9%H(B)
                   1563: @item oo
                   1564: $B%j%9%H(B  ($B=g=x$r$"$i$o$9%j%9%H(B)
                   1565: @item n
                   1566: 0 $B$+(B1 (homogenization $B$r$9$k$+(B). [$B%F%9%H$^$@(B]
                   1567: @item m
                   1568: $B=g=x$r(B matrix $B$GI=8=$9$k>l9g(B (cf. dp_ord). [$B%F%9%H$^$@(B]
                   1569: @item b
                   1570: ???
                   1571: @item sw
                   1572: Sugar strategy $B$rE,MQ$9$k$H$-$N(B weight vector. $BA4$F$NMWAG$OHsIi(B. [$B%F%9%H$^$@(B]
                   1573: @end table
1.15      takayama 1574:
1.34      ohara    1575: @itemize @bullet
                   1576: @item
                   1577:  @code{dp_weyl_gr_main(@var{f})} $B$O(B, @var{f} $B$N%0%l%V%J4pDl$r7W;;$9$k(B.
                   1578:  $B%0%l%V%J4pDl$O=g=x$rJQ$($k$H$=$N7A$,JQ$o$k(B.   asir $B$G$O$$$^$^$G=g=x$N;XDjJ}K!$,(B
                   1579:  $B7OE}$@$C$F$$$J$+$C$?(B.
                   1580:  dp_weyl_gr_main $B$N?7$7$$%$%s%?%U%'!<%9$G$O=g=x$r$"$kJ8K!$K=>$$;XDj$9$k(B.
                   1581:  $B;XDjJ}K!$K$D$$$F$O(B dp_gr_main $B$N%^%K%e%"%k$r;2>H(B.
                   1582: @item
                   1583:  $BJ,;6I=8=B?9`<0$N3F%b%N%_%"%k$ND9$5$,6v?t$N$H$-$O%o%$%kBe?t(B
                   1584:  K[x_1, ..., x_n, d_1, ..., d_n]
                   1585: $B$G7W;;$,$*$3$J$o$l$k(B. $B%o%$%kBe?t$G$O(B x_i $B$H(B d_i $B$OHs2D49$J3]$1;;5,B'(B
                   1586:  d_i x_i = x_i d_i +1 $B$r$_$?$7(B, x_i $B$H(B x_j $B$d(B d_i $B$H(B d_j $B$O2D49$G$"$k(B.
                   1587:  $B$^$?(B i $B$H(B j $B$,0[$J$k>l9g$O(B x_i $B$H(B d_j $B$b2D49$G$"$k(B.
                   1588: @item
                   1589:  $BJ,;6I=8=B?9`<0$N3F%b%N%_%"%k$ND9$5$,4q?t$N$H$-$OF1<!2=%o%$%kBe?t(B
                   1590:  K[x_1, ..., x_n, d_1, ..., d_n, h]
                   1591: $B$G7W;;$,$*$3$J$o$l$k(B. $BF1<!2=%o%$%kBe?t$G$O(B x_i $B$H(B d_i $B$OHs2D49$J3]$1;;5,B'(B
                   1592:  d_i x_i = x_i d_i + h^2
                   1593: $B$r$_$?$7(B, h $B$OG$0U$N85$H2D49(B, $B$=$NB>$NJQ?t$b%o%$%kBe?t$HF1MM$J2D49@-$N5,B'$r$_$?$9(B.
                   1594:  $B>\$7$/$O(B dp_gr_main $B$G;2>H$7$?(B Saito, Sturmfels, Takayama $B$N652J=q$r$_$h(B.
                   1595: @end itemize
1.15      takayama 1596:
                   1597: @example
1.34      ohara    1598: [1220] F=sm1.gkz([ [[1,1,1,1],[0,1,3,4]], [0,0]]);  /* Command in asir-contrib*/
                   1599: [[x4*dx4+x3*dx3+x2*dx2+x1*dx1,4*x4*dx4+3*x3*dx3+x2*dx2,-dx1*dx4+dx2*dx3,-dx2^2*dx4+dx1*dx3^2,dx1^2*dx3-dx2^3,-dx2*dx4^2+dx3^3],[x1,x2,x3,x4]]
                   1600: [1221] V=[x1,x2,x3,x4,dx1,dx2,dx3,dx4]$
                   1601: [1222] dp_weyl_gr_main(F[0] | v=V, order=[[dx1,1,dx2,1,dx3,1,dx4,1]]);
                   1602: ...
                   1603: [1238] FF=map(dp_ptod,F[0],V);
                   1604: [(1)*<<1,0,0,0,1,0,0,0>>+(1)*<<0,1,0,0,0,1,0,0>>+(1)*<<0,0,1,0,0,0,1,0>>+(1)*<<0,0,0,1,0,0,0,1>>,(1)*<<0,1,0,0,0,1,0,0>>+(3)*<<0,0,1,0,0,0,1,0>>+(4)*<<0,0,0,1,0,0,0,1>>,0,0,0,0]
                   1605:
                   1606: [1244] FF=map(dp_ptod,F[0],V);
                   1607: [(1)*<<1,0,0,0,1,0,0,0>>+(1)*<<0,1,0,0,0,1,0,0>>+(1)*<<0,0,1,0,0,0,1,0>>+(1)*<<0,0,0,1,0,0,0,1>>,(1)*<<0,1,0,0,0,1,0,0>>+(3)*<<0,0,1,0,0,0,1,0>>+(4)*<<0,0,0,1,0,0,0,1>>,(1)*<<0,0,0,0,0,1,1,0>>+(-1)*<<0,0,0,0,1,0,0,1>>,(1)*<<0,0,0,0,1,0,2,0>>+(-1)*<<0,0,0,0,0,2,0,1>>,(-1)*<<0,0,0,0,0,3,0,0>>+(1)*<<0,0,0,0,2,0,1,0>>,(1)*<<0,0,0,0,0,0,3,0>>+(-1)*<<0,0,0,0,0,1,0,2>>]
                   1608:
                   1609: dp_weyl_gr_main(FF | v=V, order=[[0,0,0,0,1,1,1,1]]);
                   1610:
                   1611: [1246] dp_weyl_gr_main(FF | v=V, order=[[dx1,1,dx2,1,dx3,1,dx4,1]]);
                   1612: [ 0 0 0 0 1 1 1 1 ]
                   1613: [ R R R R R R R R ]
                   1614:  ...
                   1615:
1.15      takayama 1616: @end example
                   1617:
1.34      ohara    1618: @table @t
                   1619: @item $B;2>H(B
                   1620: @ref{dp_gr_main}
                   1621: @end table
                   1622:
                   1623: @comment --- ChangeLog $B$r=q$/(B. $BF05!(B. $B%=!<%9%3!<%I$N0LCV(B. $BJQ99F|;~(B $B$J$I(B CVS$B%5!<%P$r8+$k$?$a(B
                   1624: @noindent
                   1625: ChangeLog
                   1626: @itemize @bullet
                   1627: @item dp_gr_main $B$N%$%s%?%U%'!<%9$,(B dp_weyl_gr_main $B$X$bF3F~$5$l$?(B.
                   1628: @item
                   1629:   OpenXM_contrib2/asir2000 $B$N2<$N<!$N3F%U%!%$%k$,=$@5$r$&$1$?(B.
                   1630: builtin/dp-supp.c 1.32--1.33
                   1631: builtin/dp.c 1.49--1.50
                   1632: @end itemize
                   1633:
                   1634: @comment --- $B"~"~"~"~(B  $B4X?t(B dp_initial_term $B$N@bL@(B $B"~"~"~"~(B
                   1635: @node dp_initial_term,,, $B%0%l%V%J!<4pDl(B
                   1636: @subsection @code{dp_initial_term}
                   1637: @findex dp_initial_term
                   1638:
                   1639: @comment --- $B4X?t$N4JC1$J@bL@(B ---
                   1640: @table @t
                   1641: @item dp_initial_term(@var{f} | v=@var{vv}, order=@var{oo})
                   1642: :: dp_initial_term $B$OM?$($i$l$?(B weight $B$KBP$9$k@hF,9`$NOB$rLa$9(B.
                   1643: @end table
                   1644:
                   1645: @table @var
                   1646: @item return
                   1647: $BJ,;6I=8=B?9`<0$^$?$OJ,;6I=8=B?9`<0$N%j%9%H(B.
                   1648: @item f
                   1649: $BJ,;6I=8=B?9`<0$+J,;6I=8=B?9`<0$N%j%9%H(B.
                   1650: @item vv
                   1651: $B%j%9%H(B  ($BJQ?t$N%j%9%H(B)
                   1652: @item oo
                   1653: $B%j%9%H(B  ($B=g=x$r$"$i$o$9%j%9%H(B)
                   1654: @end table
                   1655:
                   1656: @itemize @bullet
                   1657: @item
                   1658:  dp_initial_term $B$OM?$($i$l$?(B weight w $B$KBP$9$k@hF,9`$NOB$rLa$9(B.
                   1659:  $B$3$l$OB?$/$N652J=q$G(B @tex ${\rm in}_w(f)$ @end tex
                   1660:  $B$H=q$+$l$F$$$k(B.
                   1661: @item
                   1662:  $B=g=x$rI=$9%j%9%H$O(B dp_gr_main $B$GDj5A$7$?J8K!$K=>$&(B.
                   1663:  $B$3$N%j%9%H$N@hF,$,(B weight vector $B$GL5$$>l9g$O%(%i!<$H$J$k(B.
                   1664:  $B$?$H$($P(B order=[[@@lex,...]] $B$O%(%i!<$H$J$k(B.
                   1665: @item
                   1666:  $B7k2L$OM?$($i$l$?=g=x$K4X$7$F%=!<%H$5$l$F$k$o$1$G$O$J$$(B.
                   1667: @end itemize
                   1668:
1.19      takayama 1669: @example
1.34      ohara    1670: [1220] F=<<2,0,0>>+<<1,1,0>>+<<0,0,1>>;
                   1671: (1)*<<2,0,0>>+(1)*<<1,1,0>>+(1)*<<0,0,1>>
                   1672: [1220] dp_initial_term(F | order=[[1,1,1]]);
                   1673: [ 1 1 1 ]
                   1674: [ R R R ]
                   1675: (1)*<<2,0,0>>+(1)*<<1,1,0>>
                   1676: [1221] dp_initial_term(F | v=[x,y,z], order=[[x,1]]);
                   1677: [ 1 0 0 ]
                   1678: [ R R R ]
                   1679: (1)*<<2,0,0>>
1.19      takayama 1680: @end example
                   1681:
1.15      takayama 1682: @table @t
                   1683: @item $B;2>H(B
1.34      ohara    1684: @ref{dp_gr_main}, @ref{dp_weyl_gr_main}, @ref{dp_order}, @ref{dp_hm}
1.15      takayama 1685: @end table
                   1686:
1.34      ohara    1687: @comment --- ChangeLog $B$r=q$/(B. $BF05!(B. $B%=!<%9%3!<%I$N0LCV(B. $BJQ99F|;~(B $B$J$I(B CVS$B%5!<%P$r8+$k$?$a(B
1.15      takayama 1688: @noindent
                   1689: ChangeLog
                   1690: @itemize @bullet
1.34      ohara    1691: @item
                   1692:   OpenXM_contrib2/asir2000 $B$N2<$N<!$N3F%U%!%$%k$,=$@5$r$&$1$?(B.
                   1693: builtin/dp-supp.c 1.32
                   1694: builtin/dp.c 1.49
1.17      takayama 1695: @end itemize
                   1696:
1.34      ohara    1697: @comment --- $B"~"~"~"~(B  $B4X?t(B dp_order $B$N@bL@(B $B"~"~"~"~(B
                   1698: @node dp_order,,, $B%0%l%V%J!<4pDl(B
                   1699: @subsection @code{dp_order}
                   1700: @findex dp_order
1.17      takayama 1701:
                   1702: @comment --- $B4X?t$N4JC1$J@bL@(B ---
                   1703: @table @t
1.34      ohara    1704: @item dp_order(@var{f} | v=@var{vv}, order=@var{oo})
                   1705: :: dp_order $B$OM?$($i$l$?(B weight $B$KBP$9$k<!?t$N:GBgCM$rLa$9(B.
1.17      takayama 1706: @end table
                   1707:
                   1708: @table @var
                   1709: @item return
1.34      ohara    1710: $B?t$+?t$N%j%9%H(B
                   1711: @item f
                   1712: $BJ,;6I=8=B?9`<0$+J,;6I=8=B?9`<0$N%j%9%H(B.
                   1713: @item vv
                   1714: $B%j%9%H(B  ($BJQ?t$N%j%9%H(B)
                   1715: @item oo
                   1716: $B%j%9%H(B  ($B=g=x$r$"$i$o$9%j%9%H(B)
1.17      takayama 1717: @end table
                   1718:
                   1719: @itemize @bullet
                   1720: @item
1.34      ohara    1721:  $B=g=x$rI=$9%j%9%H$O(B dp_gr_main $B$GDj5A$7$?J8K!$K=>$&(B.
                   1722:  $B$3$N%j%9%H$N@hF,$,(B weight vector $B$GL5$$>l9g$O%(%i!<$H$J$k(B.
                   1723:  $B$?$H$($P(B order=[[@@lex,...]] $B$O%(%i!<$H$J$k(B.
                   1724: @item
                   1725:  dp_order $B$OM?$($i$l$?(B weight w $B$KBP$9$k<!?t$N:GBgCM$rLa$9(B.
                   1726:  $B$3$l$r(B @tex ${\rm ord}_w(f)$ @end tex
                   1727:  $B$H=q$/O@J8$d652J=q$b$"$k(B.
1.17      takayama 1728: @item
1.34      ohara    1729:  $B0z?t$,%j%9%H$N>l9g3FMWAG$N<!?t$,7W;;$5$l$k(B.
1.17      takayama 1730: @end itemize
                   1731:
                   1732: @example
1.34      ohara    1733: [1220] F=<<2,0,0>>+<<1,1,0>>+<<0,0,1>>;
                   1734: (1)*<<2,0,0>>+(1)*<<1,1,0>>+(1)*<<0,0,1>>
                   1735: [1222] dp_order(F | order=[[1,1,1]]);
                   1736: [ 1 1 1 ]
                   1737: [ R R R ]
                   1738: 2
                   1739: [1223] dp_order(F | v=[x,y,z], order=[[x,1]]);
                   1740: [ 1 0 0 ]
                   1741: [ R R R ]
1.17      takayama 1742: @end example
                   1743:
                   1744: @table @t
                   1745: @item $B;2>H(B
1.34      ohara    1746: @ref{dp_gr_main}, @ref{dp_weyl_gr_main}, @ref{dp_initial_term}, @ref{dp_hm}
1.17      takayama 1747: @end table
                   1748:
1.34      ohara    1749: @comment --- ChangeLog $B$r=q$/(B. $BF05!(B. $B%=!<%9%3!<%I$N0LCV(B. $BJQ99F|;~(B $B$J$I(B CVS$B%5!<%P$r8+$k$?$a(B
1.17      takayama 1750: @noindent
                   1751: ChangeLog
                   1752: @itemize @bullet
                   1753: @item
1.34      ohara    1754:   OpenXM_contrib2/asir2000 $B$N2<$N<!$N3F%U%!%$%k$,=$@5$r$&$1$?(B.
                   1755: builtin/dp-supp.c 1.32
                   1756: builtin/dp.c 1.49
1.15      takayama 1757: @end itemize
1.21      takayama 1758:
                   1759:
1.34      ohara    1760: @node nd_gr nd_gr_trace nd_weyl_gr nd_weyl_gr_trace (module),,, $B%0%l%V%J!<4pDl(B
                   1761: @subsection @code{nd_gr}, @code{nd_gr_trace} ($B2C72(B)
                   1762: @findex nd_gr (module)
                   1763: @findex nd_gr_trace (module)
                   1764: @findex nd_weyl_gr (module)
                   1765: @findex nd_weyl_gr_trace (module)
1.21      takayama 1766:
1.34      ohara    1767: @comment --- nd_gr, nd_gr_trace $B$K$*$1$k2C72$N%0%l%V%J!<4pDl7W;;(B ---
1.21      takayama 1768: @table @t
1.34      ohara    1769: @item  nd_gr(@var{gen},@var{vars},@var{char},@var{ord})
                   1770: @itemx  nd_gr_trace(@var{gen},@var{vars},@var{homo},@var{char},@var{ord})
                   1771: @item  nd_weyl_gr(@var{gen},@var{vars},@var{char},@var{ord})
                   1772: @itemx  nd_weyl_gr_trace(@var{gen},@var{vars},@var{homo},@var{char},@var{ord})
                   1773: :: $BItJ,2C72$N%0%l%V%J!<4pDl$N7W;;(B
1.21      takayama 1774: @end table
                   1775:
1.34      ohara    1776: @table @var
                   1777: @item gen
                   1778: $B%j%9%H$N%j%9%H(B
                   1779: @item ord
                   1780: @var{[IsPOT,Ord]} $B$J$k%j%9%H(B
                   1781: @item return
                   1782: $B%j%9%H$N%j%9%H(B
                   1783: @end table
1.21      takayama 1784:
                   1785: @itemize @bullet
1.34      ohara    1786: @item $BB?9`<04D$"$k$$$O%o%$%kBe?t>e$N<+M32C72$NItJ,2C72$N%0%l%V%J!<4pDl(B
                   1787: $B$r7W;;$9$k(B. $B7k2L$O%j%9%H$N%j%9%H$G$"$k(B. $B3FMWAG%j%9%H$O(B, $B<+M32C72$N(B
                   1788: $B85$G$"$k%Y%/%H%k$H$_$J$9(B.
                   1789: @item @var{ord} $B$H$7$F(B @var{[IsPOT,Ord]} $B$H$$$&(B2$BMWAG%j%9%H$,;XDj$5$l$?(B
                   1790: $B>l9g(B, $B2C72$N%0%l%V%J!<4pDl7W;;$r<B9T$9$k(B. $B$3$N>l9g(B, @var{gen} $B$O(B, $BB?9`<0(B
                   1791: $B$N%j%9%H$N%j%9%H$H$7$FM?$($kI,MW$,$"$k(B.
                   1792: @item @var{IsPOT} $B$,(B 1 $B$N>l9g(B, POT (position over term), 0 $B$N(B
                   1793: $B>l9g(B TOP (term over position) $B$GHf3S$9$k(B. $B4pAC4D$G$N9`Hf3S$O(B @var{Ord}
                   1794: $B$G9T$&(B.
                   1795: @item $B@bL@$5$l$F$$$J$$0z?t$O(B, $B%$%G%"%k$N>l9g$N2r@b$r;2>H$N$3$H(B.
1.21      takayama 1796: @end itemize
                   1797:
1.34      ohara    1798: @example
                   1799: [0] Gen=[[x,y,z],[y^2+x,x^2,z],[y^2,z^3+x,x+z]];
                   1800: [[x,y,z],[x+y^2,x^2,z],[y^2,x+z^3,x+z]]
                   1801: [1]  nd_gr(Gen,[x,y,z],0,[0,0]);
                   1802: [[x,y,z],[y^2,x^2-y,0],[y^2,x+z^3,x+z],[y^3+z^3*y^2,y^3*x-y^3,
                   1803: -x^3-z*x^2+(z*y^2+y)*x-z*y^2+z*y],[0,0,x^4+z*x^3+(-z*y^2-y)*x^2
                   1804: +(-y^3+z*y^2-z*y)*x+z^4*y^2]]
                   1805: @end example
                   1806:
                   1807: @table @t
                   1808: @item $B;2>H(B
                   1809: @ref{nd_gr}, @ref{nd_gr_trace}
                   1810: @end table
                   1811:
                   1812: @node nd_gr nd_gr_trace nd_weyl_gr nd_weyl_gr_trace (option),,, $B%0%l%V%J!<4pDl(B
                   1813: @subsection @code{nd_gr}, @code{nd_gr_trace} (option)
                   1814: @findex nd_gr (option)
                   1815: @findex nd_gr_trace (option)
                   1816: @findex nd_weyl_gr (option)
                   1817: @findex nd_weyl_gr_trace (option)
                   1818:
                   1819: @comment --- nd_gr, nd_gr_trace $B$N%*%W%7%g%s(B ---
                   1820:
                   1821: @table @t
                   1822: @item  nd_gr(@var{...}[|@var{opt},@var{opt},@dots{}])
                   1823: @itemx  nd_gr_trace(@var{...}[|@var{opt},@var{opt},@dots{}])
                   1824: @itemx  nd_weyl_gr(@var{...}[|@var{opt},@var{opt},@dots{}])
                   1825: @itemx  nd_weyl_gr_trace(@var{...}[|@var{opt},@var{opt},@dots{}])
                   1826: :: $B%0%l%V%J!<4pDl7W;;$K4X$9$k<o!9$N%*%W%7%g%s$N@bL@(B
                   1827: @end table
                   1828:
                   1829: @table @var
                   1830: @item opt
                   1831: @var{key=value} $B$J$k%*%W%7%g%s@_Dj(B
                   1832: @item return
                   1833: $B%*%W%7%g%s$K$h$j0[$J$k(B
                   1834: @end table
                   1835:
                   1836: @itemize @bullet
                   1837: @item $B%0%l%V%J!<4pDl7W;;$r%*%W%7%g%s$K$h$j@)8f$9$k(B.
                   1838: @item $B8=>u$G$O<!$N(B 3 $B$D$N%*%W%7%g%s$r<u$1IU$1$k(B.
                   1839:
                   1840: @table @var
                   1841: @item gentrace
                   1842: @var{value} $B$,(B 0 $B$G$J$$$H$-(B, $B%0%l%V%J!<4pDl$N7W;;7P2a>pJs$r=PNO$9$k(B.
1.45      takayama 1843: @item gensyz
1.34      ohara    1844: @var{value} $B$,(B 0 $B$G$J$$$H$-(B, $B7W;;$5$l$?%0%l%V%J!<4pDl$KBP$9$k(B syzygy $B$N@8@.7O$r=PNO$9$k(B.
                   1845: @item nora
                   1846: @var{value} $B$,(B 0 $B$G$J$$$H$-(B, $B:G=*%9%F%C%W$GAj8_4JLs$r9T$o$J$$(B.
                   1847: @end table
                   1848:
                   1849: @item @var{gentrace} $B$,;XDj$5$l$?>l9g(B, $B=PNO$O(B,
                   1850: @var{[GB,Homo,Trace,IntRed,Ind,InputRed,SpairTrace]} $B$J$k%j%9%H$G$"$k(B. $B3FMWAG$N0UL#$O(B
                   1851: $B<!$NDL$j$G$"$k(B.
                   1852: @table @var
                   1853: @item GB
                   1854: $B%0%l%V%J!<4pDl(B
                   1855: @item Homo
                   1856: $BCf4V4pDl$,@F<!2=$5$l$F$$$k>l9g(B 1, $B$=$&$G$J$$>l9g(B 0.
                   1857: @item Trace
                   1858: $BA4Cf4V4pDl$KBP$9$k7W;;7P2a>pJs(B
                   1859: @item IntRed
                   1860: $BAj8_4JLs$KBP$9$k7W;;7P2a>pJs(B
                   1861: @item Ind
                   1862: $B4JLs%0%l%V%J!<4pDl$N3FMWAG$N(B, $BA4Cf4V4pDl$N$K$*$1$k%$%s%G%C%/%9(B
                   1863: @item InputRed
                   1864: $B3FF~NOB?9`<0$r%0%l%V%J!<4pDl$G4JLs$7$F>jM>(B 0 $B$rF@$k$^$G$N7W;;7P2a>pJs(B
                   1865: (@var{gensyz} $B$,;XDj$5$l$?>l9g(B)
                   1866: @item SpairTrace
                   1867: $B4JLs%0%l%V%J!<4pDl$KBP$9$k(B S $BB?9`<0$r4JLs$7$F>jM>(B 0 $B$rF@$k$^$G$N7W;;7P2a>pJs(B
                   1868: (syzygy $B2C72$N@8@.7O$NMWAG$N$_(B; @var{gensyz} $B$,;XDj$5$l$?>l9g(B)
                   1869: @end table
                   1870: @item $B>\:Y$O(B, $BF~NOB?9`<0=89g$H%0%l%V%J!<4pDl$NAj8_JQ499TNs(B, $B$*$h$S(B syzygy $B7W;;(B
                   1871: $B4X?t$N9`$G@bL@$9$kM=Dj(B.
                   1872: @end itemize
1.21      takayama 1873:
                   1874: @example
1.34      ohara    1875: [0] C=[c3*c2*c1*c0-1,((c2+c3)*c1+c3*c2)*c0+c3*c2*c1,...]
                   1876: [1] D=nd_gr_trace(C,[c0,c1,c2,c3,c4],0,1,0|gentrace=1,gensyz=1)$
                   1877: [2] D[0];
                   1878: [c0+c1+c2+c3,-c1^2-2*c3*c1-c3^2,...]
                   1879: [3] D[2];
                   1880: [[[0,0,1],[1,1,1],[2,2,1],[3,3,1]],[4,[[1,2,(1)*<<0,0,0,0>>,1],...]
                   1881: [4] D[6];
                   1882: [[-1,[[1,0,(1)*<<0,0,2,4>>,1],[1,6,(-1)*<<1,0,0,0>>,1],...]
                   1883: @end example
1.21      takayama 1884:
1.34      ohara    1885: @table @t
                   1886: @item $B;2>H(B
                   1887: @ref{nd_gr}, @ref{nd_gr_trace}
                   1888: @end table
1.21      takayama 1889:
                   1890:
1.34      ohara    1891: @node $B%7%9%F%`(B,,, $B<B83E*;EMM$N4X?t(B
                   1892: @section $B%7%9%F%`(B
1.21      takayama 1893:
1.34      ohara    1894: @comment --- $B"~"~"~"~(B  $B4X?t(B syz_pqr, xyz_stu $B$N@bL@(B $B"~"~"~"~(B
                   1895: @comment --- $BJ#?t$N4X?t$r$^$H$a$F@bL@$9$kNc(B ---
                   1896: @node asir-install.sh,,, $B%7%9%F%`(B
                   1897: @subsection @code{asir-port.sh}, @code{asir-install.sh}
                   1898: @findex asir-port.sh
                   1899: @findex asir-install.sh
1.23      takayama 1900:
                   1901: @comment --- $B4X?t$N4JC1$J@bL@(B ---
                   1902: @comment --- @itemx $B$OJ#?t$KBP$7$F@bL@$r0l$D$D$1$k>l9g$K;H$&(B ---
                   1903: @table @t
1.34      ohara    1904: @item asir-install.sh
                   1905: @itemx asir-port.sh
                   1906: :: $B$3$l$O(B asir $B$NFbIt%3%^%s%I$G$O$J$$(B. asir $B$r%M%C%H%o!<%/$+$i%@%&%s%m!<%I$+$D<B9T$9$k%7%'%k%9%/%j%W%H(B
1.23      takayama 1907: @end table
                   1908:
                   1909:
                   1910: @itemize @bullet
1.34      ohara    1911: @item
                   1912: asir-port.sh $B$O(B knoppix $B@lMQ$G$"$k(B.
                   1913: $B$3$N%3%^%s%I$O(B asir $B$N%P%$%J%j$*$h$S(B FLL $B$GG[I[$G$-$J$$ItJ,$r(B
                   1914:  ftp.math.kobe-u.ac.jp $B$h$j%@%&%s%m!<%I$7$F(B
                   1915: /home/knoppix/.asir-tmp $B$X%;!<%V$7$F(B, $B<B9T$9$k(B.
                   1916: .asirrc $B$*$h$S(B .TeXmacs/plugins/ox/progs/init-ox.scm $B$b%@%&%s%m!<%I$9$k(B.
                   1917: @item
                   1918: asir-install.sh $B$O(B Debian GNU Linux / openxm-binary*.deb $B@lMQ$G$"$k(B.
                   1919: asir-install.sh $B$O(B asir $B$r%@%&%s%m!<%I$7$F(B /usr/local/OpenXM/bin $B$*$h$S(B
                   1920: /usr/local/OpenXM/lib/asir $B$X%$%s%9%H!<%k$9$k(B.
1.23      takayama 1921: @end itemize
                   1922:
                   1923:
                   1924: @comment --- ChangeLog $B$r=q$/(B. $BF05!(B. $B%=!<%9%3!<%I$N0LCV(B. $BJQ99F|;~(B $B$J$I(B CVS$B%5!<%P$r8+$k$?$a(B
                   1925: @noindent
                   1926: ChangeLog
                   1927: @itemize @bullet
1.34      ohara    1928: @item
                   1929:  $B$3$l$i$N%7%'%k%9%/%j%W%H$O(B knoppix/math $B$N$?$a$K(B 2004/2, 3 $B7n$K=q$+$l$?(B.
                   1930: @item
                   1931:   knoppix/math $B$OJ!2,Bg3X$N_@ED$5$s$,Cf?4$H$J$j3+H/$5$l$F$$$k(B.
                   1932: @item
                   1933:   OpenXM/misc/packages/Linux/Debian $B$N2<$NA4$F$N%U%!%$%k(B (2004-2-22 $B$+$i(B
                   1934:   2004-3 $B$NKv$^$G(B). ( ~taka/this03/misc-2003/A3/knoppix-03-05 ($B%W%i%$%Y!<%H%U%!%$%k(B) $B$b8+$h(B.)
                   1935:   OpenXM/src/asir-port $B$N2<$N<!$N3F%U%!%$%k(B.
                   1936:   Makefile 1.1--1.8, asir-install.sh 1.1--1.2, asir-port.sh 1.1--1.6.
1.23      takayama 1937: @end itemize
                   1938:
                   1939:
1.34      ohara    1940: @node asirgui.hnd,,, $B%7%9%F%`(B
                   1941: @subsection @code{asirgui.hnd}
                   1942: @findex asirgui.hnd
1.23      takayama 1943:
                   1944: @comment --- $B4X?t$N4JC1$J@bL@(B ---
                   1945: @comment --- @itemx $B$OJ#?t$KBP$7$F@bL@$r0l$D$D$1$k>l9g$K;H$&(B ---
                   1946: @table @t
1.34      ohara    1947: @item asirguid.hnd
                   1948: :: asirgui $B$N(B main window $B$N%O%s%I%kHV9f$rJ];}$9$k%U%!%$%k(B
1.23      takayama 1949: @end table
                   1950:
1.34      ohara    1951: @comment ****************************************************************
1.23      takayama 1952:
                   1953: @itemize @bullet
1.48      ohara    1954: @item asirgui (Windows $BHG(B) $B$r5/F0$9$k$H(B $B4D6-JQ?t(B TEMP $B$G;XDj$5$l$?%U%)%k%@$K$3$N%U%!%$%k$,:n@.$5$l$k(B.
1.35      takayama 1955: @item $BCf?H$O#1#0?J@0?t$G(B, asirgui $B$N(B main window $B$N%O%s%I%k$G$"$k(B. $B$3$N%O%s%I%k$"$F$K(B PostMessage $B$r$9$l$P(B, asuirgui $B$K%-!<%\!<%I$+$iF~NO$7$?$N$HF1MM$J8z2L$,F@$i$l$k(B.
1.34      ohara    1956: @item text editor $B$G:n@.(B, $BJ]B8$7$?%U%!%$%k$r(B text editor $BB&$+$i(B asirgui $B$KFI$_9~$^$;$?$j$9$k$?$a$KMxMQ2DG=(B.
1.37      takayama 1957: @item http://www.math.kobe-u.ac.jp/Asir/Add-ons $B$K$F(B winfep.exe $B$rG[I[$7$F$$$k(B. winfep $B$G$O$"$i$+$8$a%U%!%$%k$KF~NO%9%/%j%W%H$r=q$$$F$*$$$F(B, asirgui $B$G0l9T$E$D<B9T$5$;$k$3$H$,$G$-$k(B. winfep $B$O%W%l%<%s%F!<%7%g%sMQ$N%=%U%H%&%(%"$G$"$k(B. $B$3$l$O(B asirgui.hnd $B$rMxMQ$7$F$$$k(B.
1.23      takayama 1958: @end itemize
                   1959:
                   1960: @example
1.34      ohara    1961: // cl test.c user32.lib
                   1962:
                   1963: #include <windows.h>
                   1964: #include <stdlib.h>
                   1965: #include <stdio.h>
                   1966: #include <process.h>
                   1967:
                   1968: int main()
                   1969: @{
                   1970:
                   1971:        HWND hnd;
                   1972:        FILE *fp = fopen("c:/Program Files/asir/bin/asirgui.hnd","r");
                   1973:        fscanf(fp,"%d",&hnd);
                   1974:        fclose(fp);
                   1975:        while (1) @{
                   1976:                int c;
                   1977:                c = getchar();
                   1978:                if ( c == '#' ) break;
                   1979:                PostMessage(hnd,WM_CHAR,c,1);
                   1980:        @}
                   1981:        return 0;
                   1982: @}
1.23      takayama 1983: @end example
                   1984:
                   1985: @table @t
                   1986: @item $B;2>H(B
1.34      ohara    1987: @ref{xyz_abc}
1.23      takayama 1988: @end table
                   1989:
                   1990: @comment --- ChangeLog $B$r=q$/(B. $BF05!(B. $B%=!<%9%3!<%I$N0LCV(B. $BJQ99F|;~(B $B$J$I(B CVS$B%5!<%P$r8+$k$?$a(B
                   1991: @comment --- openxm $B$N30It$+$i$N4sM?$b=R$Y$k(B. Credit.
                   1992: @noindent
                   1993: ChangeLog
                   1994: @itemize @bullet
1.34      ohara    1995: @item $B$3$N5!G=$O(B 2006-12-5, 2007-02-13 $B$K2C$($i$l$?(B.
                   1996: @item @code{OpenXM_contrib2/windows/asir32gui/asir32gui.clw} 1.11
                   1997: @item @code{OpenXM_contrib2/windows/asir32gui/asir32guiview.cpp}  1.15, 1.1.6
1.37      takayama 1998: @item winfep $B$O(B 2010-01-20 $B:"$KBh0lHG$,(B commit $B$5$l$?(B.
                   1999: @item @code{OpenXM_contrib2/windows/winfep}  1.1
1.23      takayama 2000: @end itemize
                   2001:
                   2002:
1.34      ohara    2003: @comment ****************************************************************
                   2004:
                   2005: @node chdir,,, $B%7%9%F%`(B
                   2006: @subsection @code{chdir}, @code{pwd}
                   2007: @findex chdir
                   2008: @findex pwd
1.23      takayama 2009:
1.34      ohara    2010: @comment --- $B%G%#%l%/%H%jA`:n(B ---
1.23      takayama 2011: @table @t
1.34      ohara    2012: @item chdir(@var{directory})
                   2013: @item  pwd()
                   2014: :: $B%7%'%k%3%^%s%I(B cd $B$H(B pwd $B$KBP1~$9$kA`:n(B.
1.23      takayama 2015: @end table
                   2016:
                   2017: @table @var
                   2018: @item return
1.34      ohara    2019: $BJ8;zNs(B(@code{pwd}), $B@0?t(B(@code{chdir})
                   2020: @item dirctory
                   2021: $BJ8;zNs(B
1.23      takayama 2022: @end table
                   2023:
                   2024: @itemize @bullet
1.34      ohara    2025: @item
                   2026: @code{pwd} $B$O%+%l%s%H%G%#%l%/%H%j$rJ8;zNs$GJV$9(B.
                   2027: @item
                   2028: @code{chdir} $B$O%+%l%s%H%G%#%l%/%H%j$r(B @var{directory} $B$KJQ99$9$k(B.  $B@.8y$9$l$P(B 0 $B$r<:GT$9$l$P(B -1 $B$rJV$9(B.
1.23      takayama 2029: @end itemize
                   2030:
                   2031: @example
1.34      ohara    2032: [0] S=pwd();
                   2033: /home/ohara
                   2034: [1] chdir(".../taka");
                   2035: -1
                   2036: [2] chdir("/usr/bin");
                   2037: 0
1.23      takayama 2038: @end example
                   2039:
                   2040: @comment --- ChangeLog $B$r=q$/(B. $BF05!(B. $B%=!<%9%3!<%I$N0LCV(B. $BJQ99F|;~(B $B$J$I(B CVS$B%5!<%P$r8+$k$?$a(B
                   2041: @comment --- openxm $B$N30It$+$i$N4sM?$b=R$Y$k(B. Credit.
                   2042: @noindent
                   2043: ChangeLog
                   2044: @itemize @bullet
1.34      ohara    2045: @item
                   2046: $B$3$l$i$N4X?t$O(B 2008-8-27 $B$K%3%_%C%H$5$l$?(B.
                   2047: $BJQ99$r$&$1$?%=!<%9%3!<%I$O(B builtin/miscf.c (1.27) $B$G$"$k(B.
1.23      takayama 2048: @end itemize
                   2049:
                   2050:
1.34      ohara    2051: @node dcurrenttime,,, $B%7%9%F%`(B
                   2052: @subsection @code{dcurrenttime}
                   2053: @findex dcurrenttime
1.23      takayama 2054:
1.34      ohara    2055: @comment --- $B8=:_;~9o$r<hF@(B ---
1.23      takayama 2056: @table @t
1.34      ohara    2057: @item  dcurrenttime()
                   2058: :: $B8=:_;~9o$r<hF@(B.
1.23      takayama 2059: @end table
                   2060:
1.34      ohara    2061: @table @var
                   2062: @item return
                   2063: $BIbF0>.?tE@?t(B
                   2064: @end table
1.23      takayama 2065:
                   2066: @itemize @bullet
1.34      ohara    2067: @item
                   2068: $BJV$jCM$O(B1970$BG/(B1$B7n(B1$BF|(B0$B;~(B0$BJ,(B0$BIC$+$i$N7P2aIC?t$G$"$k(B.
1.23      takayama 2069: @end itemize
                   2070:
                   2071: @example
1.34      ohara    2072: [0] ctrl("real_digit", 16);
                   2073: 16
                   2074: [1] dcurrenttime();
                   2075: 1226390851.34476
                   2076: [2] currenttime();
                   2077: 1226390854
1.23      takayama 2078: @end example
                   2079:
                   2080: @table @t
                   2081: @item $B;2>H(B
1.34      ohara    2082: @ref{currenttime}
1.23      takayama 2083: @end table
                   2084:
                   2085: @comment --- ChangeLog $B$r=q$/(B. $BF05!(B. $B%=!<%9%3!<%I$N0LCV(B. $BJQ99F|;~(B $B$J$I(B CVS$B%5!<%P$r8+$k$?$a(B
                   2086: @comment --- openxm $B$N30It$+$i$N4sM?$b=R$Y$k(B. Credit.
                   2087: @noindent
                   2088: ChangeLog
                   2089: @itemize @bullet
1.34      ohara    2090: @item
                   2091: $B$3$N4X?t$O(B 2008-9-12 $B$K%3%_%C%H$5$l$?(B.
                   2092: $BJQ99$r$&$1$?%=!<%9%3!<%I$O(B builtin/time.c (1.6) $B$G$"$k(B.
1.23      takayama 2093: @end itemize
                   2094:
                   2095:
1.47      takayama 2096: @node getpid,,, $B%7%9%F%`(B
                   2097: @subsection @code{getpid}
                   2098: @findex getpid
                   2099:
                   2100: @comment --- $B4X?t$N4JC1$J@bL@(B ---
                   2101: @comment --- @itemx $B$OJ#?t$KBP$7$F@bL@$r0l$D$D$1$k>l9g$K;H$&(B ---
                   2102: @table @t
                   2103: @item getpid()
                   2104: @end table
                   2105:
                   2106: @table @var
                   2107: @item return
                   2108: $B@0?t(B
                   2109: @end table
                   2110:
                   2111: @itemize @bullet
                   2112: @item asir $B$N%W%m%;%9HV9f$rLa$9(B.
1.48      ohara    2113: @item $B%W%m%;%9HV9f$O(B asir, ox_asir $BEy$GFHN)$7$?%W%m%;%9$KBP$7$F%7%9%F%`Fb$G0l0U$G$"$k(B.
1.47      takayama 2114: @end itemize
                   2115:
                   2116: @example
1.48      ohara    2117: [219] getpid();
1.47      takayama 2118: 3214
                   2119: @end example
                   2120:
                   2121:
                   2122: @comment --- ChangeLog $B$r=q$/(B. $BF05!(B. $B%=!<%9%3!<%I$N0LCV(B. $BJQ99F|;~(B $B$J$I(B CVS$B%5!<%P$r8+$k$?$a(B
                   2123: @comment --- openxm $B$N30It$+$i$N4sM?$b=R$Y$k(B. Credit.
                   2124: @noindent
                   2125: ChangeLog
                   2126: @itemize @bullet
                   2127: @item $B$3$N4X?t$O(B ox_work_dir() $B4X?t$,0l0U$J:n6H%U%!%$%kL>$rF@$k$?$a$K;H$o$l$F$$$k(B.
                   2128: src/asir-contrib/packages/src/misc/rr 1.3,
                   2129: asir2000/builtin/file.c 1.28, rat.c 1.5,
                   2130: asir2000/parse/puref.c 1.9 $B$r;2>H(B (2013/02/15, 18).
                   2131: @end itemize
                   2132:
                   2133:
1.48      ohara    2134: @node loadpath,,, $B%7%9%F%`(B
                   2135: @subsection @code{loadpath}
                   2136: @findex loadpath
                   2137:
                   2138: @comment --- $B4X?t$N4JC1$J@bL@(B ---
                   2139: @comment --- @itemx $B$OJ#?t$KBP$7$F@bL@$r0l$D$D$1$k>l9g$K;H$&(B ---
                   2140: @table @t
                   2141: @item ctrl(``loadpath''[,list])
                   2142: @end table
                   2143:
                   2144: @table @var
                   2145: @item list
                   2146: $BJ8;zNs(B($B%Q%9(B)$B$N%j%9%H(B
                   2147: @item return
                   2148: $BJ8;zNs(B($B%Q%9(B)$B$N%j%9%H(B, $B$^$?$O?t(B(list$B$,M?$($i$l$?$H$-(B)
                   2149: @end table
                   2150:
                   2151: @itemize @bullet
                   2152: @item asir $B$NAH$_9~$_4X?t(B ctrl $B$N%9%$%C%A$N$R$H$D$G$"$k(B.
                   2153: @item asir $B$N%m!<%I%Q%9$N=PNO$^$?$O@_Dj$r9T$&(B.
                   2154: @end itemize
                   2155:
                   2156: @example
                   2157: [0] L=ctrl("loadpath");
                   2158: [/home/you/OpenXM/lib/asir-contrib,/home/you/OpenXM/lib/asir,.]
                   2159: [1] ctrl("loadpath", cons(getenv("HOME")+"/lib",L));
                   2160: 0
                   2161: @end example
                   2162:
                   2163:
                   2164: @comment --- ChangeLog $B$r=q$/(B. $BF05!(B. $B%=!<%9%3!<%I$N0LCV(B. $BJQ99F|;~(B $B$J$I(B CVS$B%5!<%P$r8+$k$?$a(B
                   2165: @comment --- openxm $B$N30It$+$i$N4sM?$b=R$Y$k(B. Credit.
                   2166: @noindent
                   2167: ChangeLog
                   2168: @itemize @bullet
                   2169: @item $B$3$N4X?t$O(B 2014-5-12 $B$K%3%_%C%H$5$l$?(B.
                   2170: $BJQ99$r$&$1$?%=!<%9%3!<%I$O(B builtin/ctrl.c (1.41) $B$G$"$k(B.
                   2171: @end itemize
                   2172:
                   2173:
                   2174: @node sysinfo,,, $B%7%9%F%`(B
                   2175: @subsection @code{sysinfo}
                   2176: @findex sysinfo
                   2177:
                   2178: @comment --- $B4X?t$N4JC1$J@bL@(B ---
                   2179: @comment --- @itemx $B$OJ#?t$KBP$7$F@bL@$r0l$D$D$1$k>l9g$K;H$&(B ---
                   2180: @table @t
                   2181: @item sysinfo()
                   2182: @end table
                   2183:
                   2184: @table @var
                   2185: @item return
                   2186: $BJ8;zNs$N%j%9%H(B
                   2187: @end table
                   2188:
                   2189: @itemize @bullet
                   2190: @item asir $B$NF0:n$7$F$$$k%*%Z%l!<%F%#%s%0%7%9%F%`$N>pJs$rJV$9(B.
                   2191: @item $B%j%9%H$N3F@.J,$O(B, OS$B%?%$%W(B, $B%+!<%M%kL>(B, OS$BL>(B, CPU$B%?%$%W(B, OS$B%P!<%8%g%s(B, $B40A4$J>pJs(B, $B%m%1!<%k$G$"$k(B.
                   2192: @item OS$B%?%$%W$O(B unix, macosx, windows $B$N$$$:$l$+$G$"$k(B.
                   2193: @item unix $B$*$h$S(B macosx $B$K$*$$$F$O(B, $B%7%9%F%`%3!<%k$*$h$S(B uname $B%3%^%s%I$K$h$j>pJs$r<hF@$7$F$$$k(B.
                   2194: windows $B$G$O(B, GetVersionEx() $B$J$I$N(B Win32 API $B$,MQ$$$i$l$F$$$k(B.
                   2195: @end itemize
                   2196:
                   2197: @example
                   2198: [0] sysinfo();
                   2199: [windows,WindowsNT,Windows7,x86_64,6.1.7601,WindowsNT 6.1.7601 Windows7 Service Pack 1 x86_64,ja]
                   2200: @end example
                   2201:
                   2202:
                   2203: @comment --- ChangeLog $B$r=q$/(B. $BF05!(B. $B%=!<%9%3!<%I$N0LCV(B. $BJQ99F|;~(B $B$J$I(B CVS$B%5!<%P$r8+$k$?$a(B
                   2204: @comment --- openxm $B$N30It$+$i$N4sM?$b=R$Y$k(B. Credit.
                   2205: @noindent
                   2206: ChangeLog
                   2207: @itemize @bullet
                   2208: @item $B$3$N4X?t$O(B 2014-5-14 $B$K%3%_%C%H$5$l$?(B.
                   2209: $BJQ99$r$&$1$?%=!<%9%3!<%I$O(B builtin/ctrl.c (1.42) $B$G$"$k(B.
                   2210: @end itemize
                   2211:
                   2212:
1.34      ohara    2213: @comment ****************************************************************
                   2214:
                   2215:
                   2216: @node $B8@8l(B,,, $B<B83E*;EMM$N4X?t(B
                   2217: @section $B8@8l(B
                   2218:
                   2219: @node get_struct_name,,, $B8@8l(B
                   2220: @subsection @code{get_struct_name}, @code{get_element_names}, @code{get_element_at}, @code{put_element_at}
                   2221: @findex get_struct_name
                   2222: @findex get_element_names
                   2223: @findex get_element_at
                   2224: @findex put_element_at
1.23      takayama 2225:
                   2226: @comment --- $B4X?t$N4JC1$J@bL@(B ---
                   2227: @comment --- @itemx $B$OJ#?t$KBP$7$F@bL@$r0l$D$D$1$k>l9g$K;H$&(B ---
                   2228: @table @t
1.34      ohara    2229: @item get_struct_name(@var{s})
                   2230: @itemx get_element_names(@var{s})
                   2231: @itemx get_element_at(@var{s},@var{key})
                   2232: @itemx put_element_at(@var{s},@var{key},@var{obj})
                   2233: :: $B9=B$BN(B @var{s} $B$KBP$9$kA`:n(B
1.23      takayama 2234: @end table
                   2235:
                   2236: @table @var
                   2237: @item return
1.34      ohara    2238: $BJ8;zNs(B (get_struct_name),
                   2239: $BJ8;zNs$N%j%9%H(B (get_element_names),
                   2240: $B%*%V%8%'%/%H(B (get_element_at),
                   2241: $B%*%V%8%'%/%H(B (put_element_at)
                   2242: @item s
                   2243: $B9=B$BN(B
                   2244: @item key
                   2245: $BJ8;zNs(B
                   2246: @item obj
                   2247: $B%*%V%8%'%/%H(B
1.23      takayama 2248: @end table
                   2249:
                   2250: @itemize @bullet
1.34      ohara    2251: @item
                   2252:  @code{get_struct_name(s)} $B$O(B, $B9=B$BN(B @var{s} $B$NL>A0$rLa$9(B.
                   2253: @item
                   2254:  @code{get_element_names(s)} $B$O(B, $B9=B$BN$N%a%s%P!<$NL>A0$N%j%9%H$rLa$9(B.
                   2255: @item
                   2256:  @code{get_element_at(s,key)} $B$O9=B$BN(B s $B$N%a%s%P!<(B key $B$NCM$rLa$9(B.
                   2257: @item
                   2258:  @code{put_element_at(s,key,obj)} $B$O9=B$BN(B s $B$N%a%s%P!<(B key $B$NCM$r(B obj $B$K@_Dj$9$k(B.
1.23      takayama 2259: @end itemize
                   2260:
                   2261: @example
1.34      ohara    2262: [219]  struct point @{ x, y, color@};
                   2263: [220]  P = newstruct(point);
                   2264: @{0,0,0@}
                   2265: [221]  P->x = 10$ P->y=5$ P->color="red"$
                   2266: [222]  get_element_names(P);
                   2267: [x,y,color]
                   2268: [223] put_element_at(P,"color","blue");
                   2269: blue
                   2270: [224] P->color;
                   2271: bule
1.23      takayama 2272: @end example
                   2273:
                   2274: @table @t
                   2275: @item $B;2>H(B
1.34      ohara    2276: @ref{newstruct}, @ref{struct}
1.23      takayama 2277: @end table
                   2278:
                   2279: @comment --- ChangeLog $B$r=q$/(B. $BF05!(B. $B%=!<%9%3!<%I$N0LCV(B. $BJQ99F|;~(B $B$J$I(B CVS$B%5!<%P$r8+$k$?$a(B
                   2280: @comment --- openxm $B$N30It$+$i$N4sM?$b=R$Y$k(B. Credit.
                   2281: @noindent
                   2282: ChangeLog
                   2283: @itemize @bullet
1.34      ohara    2284: @item  $B9=B$BN$NDj5A$rCN$i$:$K9=B$BN$r07$&%f!<%64X?t$r=q$/$H$-$KJXMx(B.
                   2285:        asir-contrib $B$N(B noro_print.rr $B$r8+$h(B.
                   2286: @item  OpenXM_contrib2/asir2000/builtin/compobj.c 1.8.
1.23      takayama 2287: @end itemize
                   2288:
                   2289:
1.34      ohara    2290: @comment  mapat
                   2291: @node mapat,,, $B8@8l(B
                   2292: @subsection @code{mapat}
                   2293: @findex mapat
1.23      takayama 2294:
                   2295: @table @t
1.34      ohara    2296: @item mapat(@var{fname},@var{pos}[,@var{arg0}, @var{arg1}, ...])
                   2297: :: @var{pos} $B$KBP$9$k(B map $B4X?t(B
1.23      takayama 2298: @end table
                   2299:
                   2300: @table @var
                   2301: @item return
1.34      ohara    2302: $B%*%V%8%'%/%H(B
                   2303: @item pos
                   2304: $B@0?t(B
                   2305: @item arg0, arg1, arg2, ...
                   2306: $B%*%V%8%'%/%H(B
1.23      takayama 2307: @end table
                   2308:
                   2309: @itemize @bullet
1.34      ohara    2310: @item
                   2311: @code{map} $B4X?t$O(B 0 $BHVL\$N0z?t$KBP$7$F$7$+F0:n$7$J$$$,(B, @code{mapat}
                   2312: $B4X?t$O;XDj$7$?HV9f$N0z?t$KBP$7$F(B @code{map} $B4X?t$r<B9T$9$k(B.
                   2313: @item
                   2314: @code{mapat(fname,0,A0,A1,...)} $B$O(B
                   2315: @code{map(fname,A0,A1,...)} $B$KEy2A$G$"$k(B.
                   2316: @item
                   2317: $B<!$NI{:nMQ$,$"$k(B. $B$^$@=q$$$F$J$$(B.
1.23      takayama 2318: @end itemize
                   2319:
                   2320: @example
1.34      ohara    2321: [219] mapat(deg,1,x^2+y^3+x+y,[x,y]);
                   2322: [2,3]
                   2323: [220] mapat(subst,1,x+y+z,[x,y,z],2);
                   2324: [y+z+2,x+z+2,x+y+2]
1.23      takayama 2325: @end example
                   2326:
                   2327: @table @t
                   2328: @item $B;2>H(B
1.34      ohara    2329: @ref{map}
1.23      takayama 2330: @end table
                   2331:
                   2332: @comment --- ChangeLog $B$r=q$/(B. $BF05!(B. $B%=!<%9%3!<%I$N0LCV(B. $BJQ99F|;~(B $B$J$I(B CVS$B%5!<%P$r8+$k$?$a(B
                   2333: @comment --- openxm $B$N30It$+$i$N4sM?$b=R$Y$k(B. Credit.
                   2334: @noindent
                   2335: ChangeLog
                   2336: @itemize @bullet
1.34      ohara    2337: @item $B$3$N4X?t$O(B 2004-6-22 $B$K%3%_%C%H$5$l$?(B.
                   2338:  $BJQ99$r$&$1$?%=!<%9%3!<%I$O(B builtin/pf.c, subst.c $B$G$"$k(B.
1.23      takayama 2339: @end itemize
                   2340:
1.34      ohara    2341: @comment  list
                   2342: @node list,,, $B8@8l(B
                   2343: @subsection @code{list}
                   2344: @findex list
1.23      takayama 2345:
                   2346: @table @t
1.34      ohara    2347: @item list([@var{arg0}, @var{arg1}, ...])
                   2348: :: list $B$r@8@.$9$k(B.
1.23      takayama 2349: @end table
                   2350:
                   2351: @table @var
                   2352: @item return
                   2353: $B%j%9%H(B
1.34      ohara    2354: @item arg0, arg1, arg2, ...
                   2355: $B%*%V%8%'%/%H(B
1.23      takayama 2356: @end table
                   2357:
1.34      ohara    2358: @itemize @bullet
                   2359: @item
                   2360: @var{arg0}, @var{arg1}, ... $B$rMWAG$H$9$k%j%9%H$r@8@.$9$k(B.
1.23      takayama 2361: @end itemize
                   2362:
                   2363: @example
1.34      ohara    2364: [219] list(1,2,3);
                   2365: [1,2,3]
                   2366: [220] list(1,2,[3,4]);
                   2367: [1,2,[3,4]]
1.23      takayama 2368: @end example
                   2369:
                   2370: @table @t
                   2371: @item $B;2>H(B
1.34      ohara    2372: @ref{cons}
1.23      takayama 2373: @end table
                   2374:
                   2375: @comment --- ChangeLog $B$r=q$/(B. $BF05!(B. $B%=!<%9%3!<%I$N0LCV(B. $BJQ99F|;~(B $B$J$I(B CVS$B%5!<%P$r8+$k$?$a(B
                   2376: @comment --- openxm $B$N30It$+$i$N4sM?$b=R$Y$k(B. Credit.
                   2377: @noindent
                   2378: ChangeLog
                   2379: @itemize @bullet
1.34      ohara    2380: @item $B$3$N4X?t$O(B 2004-6-22 $B$K%3%_%C%H$5$l$?(B.
                   2381:  $BJQ99$r$&$1$?%=!<%9%3!<%I$O(B builtin/list.c $B$G$"$k(B.
1.23      takayama 2382: @end itemize
                   2383:
                   2384:
1.34      ohara    2385: @node assoc,,, $B8@8l(B
                   2386: @subsection @code{assoc}
                   2387: @findex assoc
1.23      takayama 2388:
                   2389: @comment --- $B4X?t$N4JC1$J@bL@(B ---
                   2390: @table @t
1.34      ohara    2391: @item assoc(@var{a},@var{b})
                   2392: :: $BO"A[%j%9%H$r$D$/$k(B
1.23      takayama 2393: @end table
                   2394:
                   2395: @table @var
                   2396: @item return
1.34      ohara    2397: List
                   2398: @item a
                   2399: List
                   2400: @item b
                   2401: List
1.23      takayama 2402: @end table
                   2403:
                   2404: @itemize @bullet
1.34      ohara    2405: @item $B%j%9%H(B @var{a}, @var{b} $B$h$j(B
                   2406: [[@var{a}[0],@var{b}[0]], [@var{a}[1],@var{b}[1]], ...]
                   2407: $B$J$k?7$7$$%j%9%H$r@8@.$9$k(B.
1.23      takayama 2408: @end itemize
                   2409:
1.34      ohara    2410: $B2<$NNc$G$O(B @code{A} $B$KF0J*$NL>A0$,(B,
                   2411: @code{B} $B$KB-$NK\?t$,F~$C$F$$$k(B.
                   2412: @code{assoc(A,B)} $B$GF0J*$HB-$NK\?t$r%Z%"$K$7$?%j%9%H$r@8@.$9$k(B.
                   2413:
1.23      takayama 2414: @example
1.34      ohara    2415: [1192]  A=["dog","cat","snake"];
                   2416: [dog,cat,snake]
                   2417: [1193] B=[4,4,0];
                   2418: [4,4,0]
                   2419: [1194] assoc(A,B);
                   2420: [[dog,4],[cat,4],[snake,0]]
1.23      takayama 2421: @end example
                   2422:
                   2423: @table @t
                   2424: @item $B;2>H(B
1.34      ohara    2425: @ref{cons}, @ref{append}
1.23      takayama 2426: @end table
                   2427:
                   2428: @comment --- ChangeLog $B$r=q$/(B. $BF05!(B. $B%=!<%9%3!<%I$N0LCV(B. $BJQ99F|;~(B $B$J$I(B CVS$B%5!<%P$r8+$k$?$a(B
                   2429: @noindent
                   2430: ChangeLog
                   2431: @itemize @bullet
1.34      ohara    2432: @item
                   2433:  $B$3$N4X?t$O(B 2004-6-28 $B$K=q$+$l$?(B.
                   2434:  $BJQ99$r$&$1$?%=!<%9%3!<%I$O(B
                   2435:  builtin/list.c 1.9
                   2436:  parse/eval.c 1.35,
                   2437:  parse/parse.h 1.31,
                   2438:  parse/quote.c 1.14--1.16.
1.23      takayama 2439: @end itemize
                   2440:
1.34      ohara    2441:
                   2442: @node set_secure_flag,,, $B8@8l(B
                   2443: @subsection @code{set_secure_flag}, @code{set_secure_mode}
                   2444: @findex set_secure_flag
                   2445: @findex set_secure_mode
1.23      takayama 2446:
                   2447: @comment --- $B4X?t$N4JC1$J@bL@(B ---
                   2448: @comment --- @itemx $B$OJ#?t$KBP$7$F@bL@$r0l$D$D$1$k>l9g$K;H$&(B ---
                   2449: @table @t
1.34      ohara    2450: @item set_secure_flag(@var{fname},@var{m})
                   2451: @itemx set_secure_mode(@var{m})
                   2452: :: $B4X?t$N<B9T8"8B$r@_Dj$9$k(B.  (web $B%5!<%S%9MQ(B)
1.23      takayama 2453: @end table
                   2454:
                   2455: @table @var
                   2456: @item return
                   2457: $B@0?t(B
1.34      ohara    2458: @item fname
                   2459: $BJ8;zNs(B
                   2460: @item m
                   2461: $B@0?t(B
1.23      takayama 2462: @end table
                   2463:
                   2464: @itemize @bullet
1.34      ohara    2465: @item @code{set_secure_flag}, @code{set_secure_mode} $B$O(B
                   2466: asir $B$r(B web $B%5!<%PEy$G8x3+$9$k$?$a$K2C$($i$l$?4X?t(B.
                   2467: @code{set_secure_flag} $B$G8x3+$9$k4X?t$r;XDj$9$k(B.
                   2468: @code{secure_mode} $B$,(B 1 $B$N>l9g$O(B @code{set_secure_flag} $B$G;XDj$5$l$?(B
                   2469: $B4X?t$7$+<B9T$G$-$J$$(B.
                   2470: $B4X?t$N<B9TESCf$G$O(B @code{secure_mode} $B$,(B 0 $B$H$J$C$F$$$k$N$G(B,
                   2471: $BG$0U$N4X?t$r<B9T$G$-$k(B.
                   2472: $B$^$?%(%i!<$N;~Ey$O(B, @code{secure_mode} $B$O(B 1 $B$K<+F0E*$KI|5"$9$k(B.
                   2473: $B$?$@$7(B @code{def} $B$O<B9T$G$-$J$$(B.
                   2474: $B8x3+$9$k4X?t$G$O(B, $B$=$N=hM}Cf$OG$0U$N4X?t$,<B9T$G$-$k$N$G(B,
                   2475: security $B$K==J,Cm0U$7$?<BAu$r$9$kI,MW$,$"$k(B.
                   2476: @item
                   2477: @code{set_secure_flag} $B$O(B, @var{fname} $B$N(B secure flag $B$r(B @var{m}
                   2478: $B$K$9$k(B.
                   2479: $B8x3+$9$kL?Na$O(B 1 $B$K@_Dj$9$k(B.
                   2480: @item
                   2481: @var{set_secure_mode(1)} $B$G(B @code{secure_mode} $B$,(B 1 $B$H$J$j(B,
                   2482: $B8x3+$5$l$?4X?t$7$+<B9T$G$-$J$/$J$k(B.
                   2483: quit $BEy$b<B9T$G$-$J$$$N$GCm0U(B.
                   2484: @item  @code{ timer } $B$N0z?t$H$7$F(B secure_flag $B$r@_Dj$7$F$$$J$$4X?t$r(B
                   2485: $B;XDj$7$F<B9T$7$F$b%(%i!<$,I=<($5$l$J$$(B.
                   2486: $B$3$N$H$-$O(B, @code{ ctrl("error_in_timer",1) } $B$r<B9T$7$F$*$/(B.
1.23      takayama 2487: @end itemize
                   2488:
                   2489: @example
1.34      ohara    2490: [1194] set_secure_flag("print_input_form_",1);
                   2491: 1
                   2492: [1195] set_secure_flag("fctr",1);
                   2493: 1
                   2494: [220] set_secure_mode(1);
                   2495: 1
                   2496: [1197] fctr((x-1)^3);
                   2497: [[1,1],[x-1,3]]
                   2498: [1198] fctr(shell("ls"));
                   2499: evalf : shell not permitted
                   2500: return to toplevel
1.23      takayama 2501: @end example
                   2502:
                   2503: @table @t
                   2504: @item $B;2>H(B
1.34      ohara    2505: @ref{timer}
1.23      takayama 2506: @end table
                   2507:
                   2508: @noindent
                   2509: ChangeLog
                   2510: @itemize @bullet
1.34      ohara    2511: @item @code{set_secure_flag}, @code{set_secure_mode} $B$O(B asir $B$r(B
                   2512: web $B%5!<%PEy$G8x3+$9$k$?$a$K2C$($i$l$?4X?t(B.
                   2513: sm1 $B$NF1MM$J4X?t(B RestrictedMode $B$G:NMQ$5$l$?J}K!$rMQ$$$F$$$k(B.
                   2514: $B$D$^$j(B, @code{set_secure_flag} $B$G8x3+$9$k4X?t$r;XDj$9$k(B.
                   2515: @code{secure_mode} $B$,(B 1 $B$N>l9g$O(B @code{set_secure_flag} $B$G;XDj$5$l$?(B
                   2516: $B4X?t$7$+<B9T$G$-$J$$(B.
                   2517: v$B4X?t$N<B9TESCf$G$O(B @code{secure_mode} $B$,(B 0 $B$H$J$C$F$$$k$N$G(B,
                   2518: $BG$0U$N4X?t$r<B9T$G$-$k(B.
                   2519: @item $B$3$N4X?t$O(B 2004-10-27 $B$+$i(B 2004-11-22 $B$K$+$1$F3+H/$5$l$?(B.
                   2520: @item cgiasir.sm1, cgi-asir.sh $B$HAH$_9g$o$;$F(B cgi $B%5!<%S%9$rDs6!$9$k$?$a$K(B
                   2521: $BMxMQ$9$k(B.
                   2522: cgi-asir.sh $B$G$O(B
                   2523: @code{CGI_ASIR_ALLOW} $B4D6-JQ?t$G8x3+$9$k%3%^%s%I$r;XDj$9$k(B.
                   2524: @item
                   2525:   1.24--1.25      OpenXM_contrib2/asir2000/builtin/miscf.c
                   2526: @item
                   2527:   1.36--1.38      OpenXM_contrib2/asir2000/parse/eval.c
                   2528: @item
                   2529:   1.6--1.7       OpenXM_contrib2/asir2000/parse/function.c
                   2530: @item
                   2531:   1.33      OpenXM_contrib2/asir2000/parse/parse.h
1.23      takayama 2532: @end itemize
                   2533:
1.34      ohara    2534: @node initialize_static_variable,,, $B8@8l(B
                   2535: @subsection @code{initialize_static_variable}
                   2536: @findex initialize_static_variable
                   2537:
1.23      takayama 2538:
1.34      ohara    2539: @comment --- $B@bL@(B ---
1.23      takayama 2540: @table @t
1.34      ohara    2541: @item static $BJQ?t$N=i4|2=$NLdBjE@(B. $B=i4|2=$N;~$K(B segmentation fault $B$,$*$-$k(B.
1.23      takayama 2542: @end table
                   2543:
                   2544:
                   2545: @itemize @bullet
1.34      ohara    2546: @item static $BJQ?t$N<h07(B.
                   2547: $B2<$NNc$r;2>H$N$3$H(B.
1.23      takayama 2548: @end itemize
                   2549:
1.34      ohara    2550:
1.23      takayama 2551: @example
1.34      ohara    2552: if (1) @{
                   2553:  module abc;
                   2554:  static A;
                   2555:  A=1;
                   2556:  endmodule;
                   2557: @} else @{ @};
1.23      takayama 2558:
1.34      ohara    2559: end$
                   2560: $B$r(B t.rr $B$H$9$k$H$-(B,
1.23      takayama 2561:
1.34      ohara    2562: [6] load("./t.rr");
                   2563: 1
                   2564: internal error (SEGV)
                   2565: $B$H$J$k(B.
1.23      takayama 2566:
1.34      ohara    2567: t.rr $B$r(B
                   2568: if (1) @{
                   2569:  module abc;
                   2570:  static A;
                   2571:  localf initA;
                   2572:  localf foo;
                   2573:  def initA() @{
                   2574:    A=1;
                   2575:  @}
                   2576:  initA();
                   2577:  def foo() @{
                   2578:    return A;
                   2579:  @}
                   2580:  endmodule;
                   2581: @} else @{ @};
1.23      takayama 2582:
1.34      ohara    2583: end$
                   2584: $B$H$9$k$H@5$7$/=i4|2=$5$l$k(B.
1.23      takayama 2585: @end example
                   2586:
1.34      ohara    2587: @comment --- ChangeLog
1.23      takayama 2588: @noindent
                   2589: ChangeLog
                   2590: @itemize @bullet
1.34      ohara    2591: @item  oxasir-win.rr $B$N<h07$GLdBjE@$H$7$FIb>e(B.  2005.07.25.
                   2592: @item  oxasir-win.rr $B$N<h07$G(B double quote $B$N<h$j07$$$KLdBj$,$"$C$?$,(B, $B$3$l$O(B asir2000/io/ox_asir.c, 1.58, $B$GLdBjE@2r7h(B.
                   2593: @item ox_asir $B$K7W;;$r0MMj$9$k;~$O(B if (1) @{ ... @}$B$G0O$`(B.
1.23      takayama 2594: @end itemize
1.34      ohara    2595:
1.23      takayama 2596: @comment ****************************************************************
1.13      takayama 2597:
1.34      ohara    2598: @node $B?tO@!&Be?t(B,,, $B<B83E*;EMM$N4X?t(B
                   2599: @section $B?tO@!&Be?t(B
                   2600:
1.24      takayama 2601:
1.34      ohara    2602: @node small_jacobi,,, $B?tO@!&Be?t(B
                   2603: @subsection @code{small_jacobi}
                   2604: @findex small_jacobi
1.24      takayama 2605:
                   2606: @comment --- $B4X?t$N4JC1$J@bL@(B ---
                   2607: @table @t
1.34      ohara    2608: @item small_jacobi(@var{a},@var{m})
                   2609: :: Jacobi $B5-9f$N7W;;(B
1.24      takayama 2610: @end table
                   2611:
1.34      ohara    2612: @table @var
                   2613: @item return
                   2614: $B@0?t(B
                   2615: @item arg1, arg2
                   2616: $B@0?t(B
                   2617: @end table
1.24      takayama 2618:
                   2619: @itemize @bullet
1.34      ohara    2620: @item
                   2621:  @var{m} $B$,AG?t$N$H$-$O(B Legendre $B5-9f$H$h$P$l(B,
                   2622:  x^2 = @var{a} mod @var{m} $B$K2r$,$"$k$H$-(B 1, $B2r$,$J$$$H$-(B -1 $B$r$b$I$9(B.
                   2623: @item
                   2624: Jacobi $B5-9f$O(B Legendre $B5-9f$N@Q$GDj5A$5$l$k(B ($B=iEy@0?tO@$NK\;2>H(B).
                   2625: @item
                   2626:  $B$3$N4X?t$O(B machine int $B$NHO0O$G(B jacobi $B5-9f$r7W;;$9$k(B.
1.24      takayama 2627: @end itemize
                   2628:
                   2629: @example
1.34      ohara    2630: [1286] small_jacobi(2,3);
                   2631: -1
                   2632: [1287] small_jacobi(2,7);
                   2633: 1
1.24      takayama 2634: @end example
                   2635:
                   2636: @table @t
                   2637: @item $B;2>H(B
1.34      ohara    2638: http://members.jcom.home.ne.jp/yokolabo/asirlib/
                   2639: $B$b8+$F$M(B.
1.24      takayama 2640: @end table
                   2641:
                   2642: @comment --- ChangeLog $B$r=q$/(B. $BF05!(B. $B%=!<%9%3!<%I$N0LCV(B. $BJQ99F|;~(B $B$J$I(B CVS$B%5!<%P$r8+$k$?$a(B
                   2643: @noindent
                   2644: ChangeLog
                   2645: @itemize @bullet
1.34      ohara    2646: @item $B$3$N4X?t$NM3Mh$OITL@(B.
1.24      takayama 2647: @end itemize
                   2648:
1.34      ohara    2649:
                   2650: @node noro_matrix.rr,,, $B?tO@!&Be?t(B
1.25      takayama 2651: @subsection @code{noro_matrix.rr}
                   2652: @findex noro_matrix.rr
                   2653:
                   2654: @comment --- $B4X?t$N4JC1$J@bL@(B ---
                   2655: @comment --- @itemx $B$OJ#?t$KBP$7$F@bL@$r0l$D$D$1$k>l9g$K;H$&(B ---
                   2656: @table @t
                   2657: @item linalg.unit_mat(@var{arg1})
                   2658: @item linalg.random_rmat(@var{arg1}, @var{arg2}, @var{arg3})
                   2659: @item linalg.minipoly_mat(@var{arg1})
                   2660: @item linalg.compute_kernel(@var{arg1})
                   2661: @item linalg.compute_image(@var{arg1})
                   2662: @item linalg.jordan_canonical_form(@var{arg1})
                   2663: @end table
                   2664:
                   2665:
                   2666: @itemize @bullet
                   2667: @item $B4JC1$J2r@b$*$h$S<BNc$O(B http://www.math.kobe-u.ac.jp/HOME/taka/2007/knx/noro_matrix-ja.txt $B$r;2>H(B.
                   2668: @end itemize
                   2669:
                   2670: @example
                   2671: load("noro_matrix.rr");
                   2672: A=newmat(4,4,[[2,0,0,0],[3,5,1,0],[-9,-9,-1,0],[-5,0,0,1]]);
                   2673: B=linalg.jordan_canonical_form(A);
                   2674: @end example
                   2675:
                   2676: @table @t
                   2677: @item $B;2>H(B
                   2678: @ref{invmat}
                   2679: @end table
                   2680:
                   2681: @comment --- ChangeLog $B$r=q$/(B. $BF05!(B. $B%=!<%9%3!<%I$N0LCV(B. $BJQ99F|;~(B $B$J$I(B CVS$B%5!<%P$r8+$k$?$a(B
                   2682: @comment --- openxm $B$N30It$+$i$N4sM?$b=R$Y$k(B. Credit.
                   2683: @noindent
                   2684: ChangeLog
                   2685: @itemize @bullet
                   2686: @item $B$3$N4X?t$O(B 2004-04 $B:"$+$i@~7ABe?t(BIII $B$N9V5A$r$7$J$,$i=q$+$l$?(B.
                   2687: @item $B%=!<%9(B:  OpenXM/src/asir-contrib/packages/src/noro_matrix.rr
                   2688: @end itemize
                   2689:
                   2690:
1.34      ohara    2691: @node f_res,,, $B?tO@!&Be?t(B
1.26      takayama 2692: @subsection @code{f_res}
                   2693: @findex f_res
1.25      takayama 2694:
                   2695: @comment --- $B4X?t$N4JC1$J@bL@(B ---
                   2696: @table @t
1.26      takayama 2697: @item f_res
1.25      takayama 2698: @end table
                   2699:
                   2700:
                   2701: @itemize @bullet
1.26      takayama 2702: @item f_res $B$O3F<o$N=*7k<0$r7W;;$9$k%b%8%e!<%k$G$"$k(B. ox_grep("f_res"); $B$G(B online manual $B$r1\Mw2DG=$G$"$k(B.
1.25      takayama 2703: @end itemize
                   2704:
                   2705: @table @t
                   2706: @item $B;2>H(B
                   2707: @ref{}
                   2708: @end table
                   2709:
                   2710: @comment --- ChangeLog $B$r=q$/(B. $BF05!(B. $B%=!<%9%3!<%I$N0LCV(B. $BJQ99F|;~(B $B$J$I(B CVS$B%5!<%P$r8+$k$?$a(B
                   2711: @comment --- openxm $B$N30It$+$i$N4sM?$b=R$Y$k(B. Credit.
                   2712: @noindent
                   2713: ChangeLog
                   2714: @itemize @bullet
                   2715: @item $B$3$N%b%8%e!<%k$O(B Fujiwara $B7/$N=$;NO@J8$,85$K$J$j(B, $B$=$l$r2~B$$7$?$b$N$G$"$k(B.
1.26      takayama 2716: @item OpenXM/src/ox_cdd, OpenXM/src/asir-contrib/packages/src/f_res.rr
1.25      takayama 2717: @end itemize
                   2718:
                   2719:
1.34      ohara    2720: @node D $B2C72$N@)8B$K4X$9$k4X?t(B,,, $B<B83E*;EMM$N4X?t(B
                   2721: @section D $B2C72$N@)8B$K4X$9$k4X?t(B
1.27      ohara    2722:
                   2723:
1.34      ohara    2724: @node nk_restriction.restriction,,, D $B2C72$N@)8B$K4X$9$k4X?t(B
1.29      nakayama 2725: @subsection @code{nk_restriction.restriction}
                   2726: @comment --- $B:w0zMQ%-!<%o!<%I(B
                   2727: @findex nk_restriction.restriction
                   2728:
                   2729: @comment --- $B4X?t$N4JC1$J@bL@(B ---
                   2730: @table @t
1.34      ohara    2731: @item nk_restriction.restriction(@var{Id}, @var{VL}, @var{DVL}, @var{W})
1.52    ! nakayama 2732: :: D $B2C72(B M = D / @var{Id} ($B%[%m%N%_%C%/(B D $B%$%G%"%k(B @var{Id}) $B$KBP$7$F(B,
        !          2733: $B=E$_%Y%/%H%k(B @var{W} $B$K$D$$$F$N@)8B2C72$rJV$9(B.
1.29      nakayama 2734: @end table
                   2735:
                   2736: @comment --- $B0z?t$N4JC1$J@bL@(B ---
                   2737: @table @var
                   2738: @item Id
                   2739: $B%$%G%"%k$N@8@.85$N%j%9%H(B
                   2740: @item VL
                   2741: $BJQ?t$N%j%9%H(B
                   2742: @item DVL
                   2743: $BJQ?t$N%j%9%H(B(@var{VL} $B$KBP1~$9$kHyJ,:nMQAG$NJ}$NJQ?t(B)
                   2744: @item W
                   2745: $B=E$_%Y%/%H%k$rI=$9%j%9%H(B
                   2746: @end table
                   2747:
                   2748: @itemize @bullet
                   2749: @item
1.52    ! nakayama 2750: @var{W} $B$NMWAG$OHsIi@0?t$G(B, 0 $BHVL\$NMWAG$+$iO"B3$7$F@5$N@0?t$,F~$i$J$1$l$P$J$i$J$$(B.
        !          2751: ($B$9$J$o$A(B, @code{[1,1,0,0,0]} $B$O(B OK $B$@$,!"(B @code{[1,0,1,0,0]} $B$O%@%a(B)
1.29      nakayama 2752: @item
1.52    ! nakayama 2753: $B@5$N=E$_$r;}$DJQ?t$K$D$$$F$N@)8B$r9T$&(B.
        !          2754: $BNc$($P(B, @var{VL} @code{=[x,y,z]}, @var{W} @code{=[1,1,0]} $B$G$"$l$P(B,
        !          2755: x,y $B$K$D$$$F@)8B$r9T$&(B.
1.29      nakayama 2756: @end itemize
                   2757:
1.52    ! nakayama 2758: $B0J2<$O(B, $B%$%G%"%k(B
1.34      ohara    2759: @iftex
1.29      nakayama 2760: @tex
1.34      ohara    2761: $I = D \cdot \{x \partial_x -1, y \partial_y - 1\} $
                   2762: @end tex
1.52    ! nakayama 2763: $B$H$*$$$?;~(B, D $B2C72(B
        !          2764: @tex $M = D / I$ @end tex
        !          2765: $B$N(B
        !          2766: @tex $x$ @end tex
1.34      ohara    2767: @end iftex
                   2768: @ifinfo
1.52    ! nakayama 2769: I = D . @{ x dx -1, y dy - 1 @} $B$H$*$$$?;~(B,
        !          2770: D $B2C72(B M = D / I $B$N(B x
1.34      ohara    2771: @end ifinfo
1.52    ! nakayama 2772: $B$K$D$$$F$N@)8B2C72$r7W;;$7$?Nc$G$"$k(B.
1.29      nakayama 2773: @example
                   2774: [1432] nk_restriction.restriction([x*dx-1,y*dy-1],[x,y],[dx,dy],[1,0]);
                   2775: -- generic_bfct_and_gr :0.001sec(0.001629sec)
                   2776: generic bfct : [[1,1],[s-1,1]]
                   2777: S0 : 1
1.33      ohara    2778: B_@{S0@} length : 2
1.29      nakayama 2779: -- fctr(BF) + base :0.000999sec(0.0005109sec)
                   2780: [[y*dy-1,(y*dy-1)*dx,-1],[[1],[0]]]
                   2781: @end example
1.51      nakayama 2782: $BJV$jCM$NBh(B 1 $BHVL\$NMWAG(B @code{[[1],[0]]]} $B$O(B,
                   2783: $B@)8B2C72$N4pDl(B
1.52    ! nakayama 2784: @iftex
1.51      nakayama 2785: @tex $\partial_x^1, \partial_x^0$ @end tex
                   2786: $B$r0UL#$7(B,
                   2787: $BJV$jCM$NBh(B 0 $BHVL\$NMWAG$+$i(B, $B@)8B2C72$O(B
                   2788: @tex $(y \partial_y - 1, 0), (0, y\partial_y-1), (-1,0)$ @end tex
1.52    ! nakayama 2789: @end iftex
        !          2790: @ifinfo
        !          2791: dx^1, dx^0
        !          2792: $B$r0UL#$7(B,
        !          2793: $BJV$jCM$NBh(B 0 $BHVL\$NMWAG$+$i(B, $B@)8B2C72$O(B
        !          2794: (y dy - 1, 0), (0, ydy-1), (-1,0)
        !          2795: @end ifinfo
1.51      nakayama 2796: $B$G@8@.$5$l$k$3$H$,$o$+$k(B.
1.29      nakayama 2797:
                   2798: @node nk_restriction.restriction_ideal,,, D $B2C72$N@)8B$K4X$9$k4X?t(B
                   2799: @subsection @code{nk_restriction.restriction_ideal}
                   2800: @comment --- $B:w0zMQ%-!<%o!<%I(B
                   2801: @findex nk_restriction.restriction_ideal
                   2802:
                   2803: @comment --- $B4X?t$N4JC1$J@bL@(B ---
                   2804: @table @t
1.34      ohara    2805: @item nk_restriction.restriction_ideal(@var{Id}, @var{VL}, @var{DVL}, @var{W})
1.52    ! nakayama 2806: :: $B%[%m%N%_%C%/(B D $B%$%G%"%k(B @var{Id} $B$r=E$_%Y%/%H%k(B @var{W} $B$K$D$$$F$N@)8B%$%G%"%k$rJV$9(B.
1.29      nakayama 2807: @end table
                   2808:
                   2809: @comment --- $B0z?t$N4JC1$J@bL@(B ---
                   2810: @table @var
                   2811: @item Id
                   2812: $B%$%G%"%k$N@8@.85$N%j%9%H(B
                   2813: @item VL
                   2814: $BJQ?t$N%j%9%H(B
                   2815: @item DVL
                   2816: $BJQ?t$N%j%9%H(B(@var{VL} $B$KBP1~$9$kHyJ,:nMQAG$NJ}$NJQ?t(B)
                   2817: @item W
                   2818: $B=E$_%Y%/%H%k$rI=$9%j%9%H(B
                   2819: @end table
                   2820:
                   2821: @itemize @bullet
                   2822: @item
1.52    ! nakayama 2823: @var{W} $B$NMWAG$OHsIi@0?t$G(B, 0 $BHVL\$NMWAG$+$iO"B3$7$F@5$N@0?t$,F~$i$J$1$l$P$J$i$J$$(B.
        !          2824: ($B$9$J$o$A(B, @code{[1,1,0,0,0]} $B$O(B OK $B$@$,(B, @code{[1,0,1,0,0]} $B$O%@%a(B)
1.29      nakayama 2825: @item
1.52    ! nakayama 2826: $B@5$N=E$_$r;}$DJQ?t$K$D$$$F$N@)8B$r9T$&(B.
        !          2827: $BNc$($P(B, @var{VL} @code{=[x,y,z]}, @var{W} @code{=[1,1,0]} $B$G$"$l$P(B,
        !          2828: x,y $B$K$D$$$F@)8B$r9T$&(B.
1.29      nakayama 2829: @end itemize
                   2830:
1.52    ! nakayama 2831: $B0J2<$O(B, $B%$%G%"%k(B
1.34      ohara    2832: @iftex
1.52    ! nakayama 2833: @tex $I = D \cdot \{x \partial_x -1, y \partial_y - 1\} $ @end tex
1.29      nakayama 2834: $B$N(B
1.52    ! nakayama 2835: @tex $x$ @end tex
1.34      ohara    2836: @end iftex
                   2837: @ifinfo
                   2838: I = D . @{ x dx -1, y dy - 1 @} $B$N(B x
                   2839: @end ifinfo
1.29      nakayama 2840: $B$K$D$$$F$N@)8B%$%G%"%k$r7W;;$7$?Nc$G$"$k!#(B
                   2841: @example
                   2842: [1346] nk_restriction.restriction_ideal([x*dx-1,y*dy-1],[x,y],[dx,dy],[1,0]);
                   2843: -- generic_bfct_and_gr :0.002sec(0.001652sec)
                   2844: generic bfct : [[1,1],[s-1,1]]
                   2845: S0 : 1
1.33      ohara    2846: B_@{S0@} length : 2
1.29      nakayama 2847: -- fctr(BF) + base :0sec(0.000566sec)
                   2848: -- restriction_ideal_internal :0.001sec(0.0007441sec)
                   2849: [-1]
                   2850: @end example
                   2851:
1.34      ohara    2852: @node nk_restriction.integration,,, D $B2C72$N@)8B$K4X$9$k4X?t(B
1.29      nakayama 2853: @subsection @code{nk_restriction.integration}
                   2854: @comment --- $B:w0zMQ%-!<%o!<%I(B
                   2855: @findex nk_restriction.integration
                   2856:
                   2857: @comment --- $B4X?t$N4JC1$J@bL@(B ---
                   2858: @table @t
1.34      ohara    2859: @item nk_restriction.integration(@var{Id}, @var{VL}, @var{DVL}, @var{W})
1.52    ! nakayama 2860: :: D $B2C72(B M = D / @var{Id} ($B%[%m%N%_%C%/(B D $B%$%G%"%k(B @var{Id}) $B$KBP$7$F(B, $B=E$_%Y%/%H%k(B @var{W} $B$K$D$$$F$N@QJ,2C72$rJV$9(B.
1.29      nakayama 2861: @end table
                   2862:
                   2863: @comment --- $B0z?t$N4JC1$J@bL@(B ---
                   2864: @table @var
                   2865: @item Id
                   2866: $B%$%G%"%k$N@8@.85$N%j%9%H(B
                   2867: @item VL
                   2868: $BJQ?t$N%j%9%H(B
                   2869: @item DVL
                   2870: $BJQ?t$N%j%9%H(B(@var{VL} $B$KBP1~$9$kHyJ,:nMQAG$NJ}$NJQ?t(B)
                   2871: @item W
                   2872: $B=E$_%Y%/%H%k$rI=$9%j%9%H(B
                   2873: @end table
                   2874:
                   2875: @comment --- $B$3$3$G4X?t$N>\$7$$@bL@(B ---
                   2876: @comment --- @itemize$B!A(B@end itemize $B$O2U>r=q$-(B ---
                   2877: @comment --- @bullet $B$O9uE@IU$-(B ---
                   2878: @itemize @bullet
                   2879: @item
1.52    ! nakayama 2880: @var{W} $B$NMWAG$OHsIi@0?t$G(B, 0 $BHVL\$NMWAG$+$iO"B3$7$F@5$N@0?t$,F~$i$J$1$l$P$J$i$J$$(B.
        !          2881: ($B$9$J$o$A(B, @code{[1,1,0,0,0]} $B$O(B OK $B$@$,(B, @code{[1,0,1,0,0]} $B$O%@%a(B)
1.29      nakayama 2882: @item
1.52    ! nakayama 2883: $B@5$N=E$_$r;}$DJQ?t$K$D$$$F$N@QJ,$r9T$&(B.
        !          2884: $BNc$($P(B, @var{VL} @code{=[x,y,z]}, @var{W} @code{=[1,1,0]} $B$G$"$l$P(B,
        !          2885: x,y $B$K$D$$$F@QJ,$r9T$&(B.
1.29      nakayama 2886: @end itemize
                   2887:
1.52    ! nakayama 2888: $B0J2<$O(B, $B%$%G%"%k(B
1.34      ohara    2889: @iftex
1.52    ! nakayama 2890: @tex $I = D \cdot \{2 t \partial_x + \partial_t, t \partial_t + 2 x \partial_x + 2\}$ @end tex
        !          2891: $B$H$*$$$?;~(B, D $B2C72(B
        !          2892: @tex $M = D / I$ @end tex
        !          2893: $B$N(B
        !          2894: @tex $t$ @end tex
1.34      ohara    2895: @end iftex
                   2896: @ifinfo
1.52    ! nakayama 2897: I = D . @{2 t dx + dt, t dt + 2 x dx + 2 @}
        !          2898: $B$H$*$$$?;~(B, D $B2C72(B M = D / I $B$N(B t
1.34      ohara    2899: @end ifinfo
1.52    ! nakayama 2900: $B$K$D$$$F$N@QJ,2C72$r7W;;$7$?Nc$G$"$k(B. ([SST, Ex5.5.2, Ex5.5.6])
1.29      nakayama 2901: @example
                   2902: [1351] nk_restriction.integration([2*t*dx+dt,2*x*dx+t*dt+2],[t,x],
                   2903: [dt,dx],[1,0]);
                   2904: -- generic_bfct_and_gr :0.001sec(0.001796sec)
                   2905: generic bfct : [[1,1],[s,1],[s-1,1]]
                   2906: S0 : 1
1.33      ohara    2907: B_@{S0@} length : 2
1.29      nakayama 2908: -- fctr(BF) + base :0.001sec(0.0006731sec)
                   2909: [[4*x*dx^2+6*dx,-4*t*x*dx^2-6*t*dx,2*x*dx+1,-2*t*x*dx,2*t*dx],[[1],[0]]]
                   2910: @end example
1.51      nakayama 2911: $BJV$jCM$NBh(B 1 $BHVL\$NMWAG(B @code{[[1],[0]]]} $B$O(B,
                   2912: $B@QJ,2C72$N4pDl(B
1.52    ! nakayama 2913: @iftex
1.51      nakayama 2914: @tex $t^1, t^0$ @end tex
1.52    ! nakayama 2915: @end iftex
        !          2916: @ifinfo
        !          2917: t^1, t^0
        !          2918: @end ifinfo
1.51      nakayama 2919: $B$r0UL#$7(B,
                   2920: $BJV$jCM$NBh(B 0 $BHVL\$NMWAG$+$i(B, $B@QJ,2C72$O(B
1.52    ! nakayama 2921: @iftex
1.51      nakayama 2922: @tex $(4 x \partial_x^2 + 6 \partial_x, 0), (0, -4 x \partial_x^2 - 6 \partial_x),
                   2923: (0, -2 x \partial_x), (0, 2 \partial_x)$ @end tex
1.52    ! nakayama 2924: @end iftex
        !          2925: @ifinfo
        !          2926: (4 x dx^2 + 6 dx, 0), (0, -4 x dx^2 - 6 dx),
        !          2927: (0, -2 x dx), (0, 2 dx)
        !          2928: @end ifinfo
1.51      nakayama 2929: $B$G@8@.$5$l$k$3$H$,$o$+$k(B.
1.29      nakayama 2930:
1.34      ohara    2931: @node nk_restriction.integration_ideal,,, D $B2C72$N@)8B$K4X$9$k4X?t(B
1.29      nakayama 2932: @subsection @code{nk_restriction.integration_ideal}
                   2933: @comment --- $B:w0zMQ%-!<%o!<%I(B
                   2934: @findex nk_restriction.integration_ideal
                   2935:
                   2936: @comment --- $B4X?t$N4JC1$J@bL@(B ---
                   2937: @table @t
1.34      ohara    2938: @item nk_restriction.integration_ideal(@var{Id}, @var{VL}, @var{DVL}, @var{W})
1.52    ! nakayama 2939: :: $B%[%m%N%_%C%/(B D $B%$%G%"%k(B @var{Id} $B$r=E$_%Y%/%H%k(B @var{W} $B$K$D$$$F$N@QJ,%$%G%"%k$rJV$9(B.
1.29      nakayama 2940: @end table
                   2941:
                   2942: @comment --- $B0z?t$N4JC1$J@bL@(B ---
                   2943: @table @var
                   2944: @item Id
                   2945: $B%$%G%"%k$N@8@.85$N%j%9%H(B
                   2946: @item VL
                   2947: $BJQ?t$N%j%9%H(B
                   2948: @item DVL
                   2949: $BJQ?t$N%j%9%H(B(@var{VL} $B$KBP1~$9$kHyJ,:nMQAG$NJ}$NJQ?t(B)
                   2950: @item W
                   2951: $B=E$_%Y%/%H%k$rI=$9%j%9%H(B
                   2952: @end table
                   2953:
                   2954: @comment --- $B$3$3$G4X?t$N>\$7$$@bL@(B ---
                   2955: @comment --- @itemize$B!A(B@end itemize $B$O2U>r=q$-(B ---
                   2956: @comment --- @bullet $B$O9uE@IU$-(B ---
                   2957: @itemize @bullet
                   2958: @item
1.52    ! nakayama 2959: @var{W} $B$NMWAG$OHsIi@0?t$G(B, 0 $BHVL\$NMWAG$+$iO"B3$7$F@5$N@0?t$,F~$i$J$1$l$P$J$i$J$$(B.
        !          2960: ($B$9$J$o$A(B, @code{[1,1,0,0,0]} $B$O(B OK $B$@$,(B, @code{[1,0,1,0,0]} $B$O%@%a(B)
1.29      nakayama 2961: @item
1.52    ! nakayama 2962: $B@5$N=E$_$r;}$DJQ?t$K$D$$$F$N@QJ,$r9T$&(B.
        !          2963: $BNc$($P(B, @var{VL} @code{=[x,y,z]}, @var{W} @code{=[1,1,0]} $B$G$"$l$P(B,
        !          2964: x,y $B$K$D$$$F@QJ,$r9T$&(B.
1.29      nakayama 2965: @end itemize
                   2966:
1.52    ! nakayama 2967: $B0J2<$O(B, $B%$%G%"%k(B
1.34      ohara    2968: @iftex
                   2969: @tex
1.29      nakayama 2970: $I = D \cdot \{2 t \partial_x + \partial_t, t \partial_t + 2 x \partial_x + 2\} $
1.34      ohara    2971: @end tex
1.29      nakayama 2972: $B$N(B
1.52    ! nakayama 2973: @tex $t$ @end tex
1.34      ohara    2974: @end iftex
                   2975: @ifinfo
                   2976: I = D . @{2 t dx + dt, t dt + 2 x dx + 2 @} $B$N(B t
                   2977: @end ifinfo
1.52    ! nakayama 2978: $B$K$D$$$F$N@QJ,%$%G%"%k$r7W;;$7$?Nc$G$"$k(B. ([SST, Ex5.5.2, Ex5.5.6])
1.29      nakayama 2979: @example
                   2980: [1431]  nk_restriction.integration_ideal([2*t*dx+dt,t*dt+2*x*dx+2],[t,x],
                   2981: [dt,dx],[1,0]);
                   2982: -- generic_bfct_and_gr :0.002999sec(0.002623sec)
                   2983: generic bfct : [[1,1],[s,1],[s-1,1]]
                   2984: S0 : 1
1.33      ohara    2985: B_@{S0@} length : 2
1.29      nakayama 2986: -- fctr(BF) + base :0.001sec(0.001091sec)
                   2987: -- integration_ideal_internal :0.002sec(0.001879sec)
                   2988: [2*x*dx+1]
                   2989: @end example
                   2990:
1.42      nisiyama 2991: @node nk_restriction.ann_mul,,, D $B2C72$N@)8B$K4X$9$k4X?t(B
                   2992: @subsection @code{nk_restriction.ann_mul}
                   2993: @comment --- $B:w0zMQ%-!<%o!<%I(B
                   2994: @findex nk_restriction.ann_mul
                   2995:
                   2996: @comment --- $B4X?t$N4JC1$J@bL@(B ---
                   2997: @table @t
                   2998: @item nk_restriction.ann_mul(@var{I}, @var{J}, @var{VL}, @var{DVL})
                   2999: :: @var{f} $B$rNm2=$9$k%[%m%N%_%C%/(B D $B%$%G%"%k(B @var{I},
                   3000: @var{g} $B$rNm2=$9$k%[%m%N%_%C%/(B D $B%$%G%"%k$r(B @var{J} $B$H$7$?$H$-(B,
                   3001: @var{fg} $B$rNm2=$9$k%[%m%N%_%C%/(B D $B%$%G%"%k$rJV$9(B.
                   3002: @end table
                   3003:
                   3004: @comment --- $B0z?t$N4JC1$J@bL@(B ---
                   3005: @table @var
                   3006: @item I
                   3007: $B%$%G%"%k$N@8@.85$N%j%9%H(B
                   3008: @item J
                   3009: $B%$%G%"%k$N@8@.85$N%j%9%H(B
                   3010: @item VL
                   3011: $BJQ?t$N%j%9%H(B
                   3012: @item DVL
                   3013: $BJQ?t$N%j%9%H(B(@var{VL} $B$KBP1~$9$kHyJ,:nMQAG$NJ}$NJQ?t(B)
                   3014: @end table
                   3015:
                   3016: @comment --- $B$3$3$G4X?t$N>\$7$$@bL@(B ---
                   3017: @comment --- @itemize$B!A(B@end itemize $B$O2U>r=q$-(B ---
                   3018: @comment --- @bullet $B$O9uE@IU$-(B ---
                   3019: @itemize @bullet
                   3020: @item test_ann_mul(), test_ann_mul2(), test_ann_mul3() $B$r;2>H(B.
                   3021: @end itemize
                   3022:
                   3023:
                   3024: @node nk_restriction (option) ,,, D $B2C72$N@)8B(B, $B@QJ,$K4X$9$k4X?t$N@bL@(B (option)
1.36      nisiyama 3025: @subsection @code{nk_restriction (option)}
                   3026: @comment --- $B:w0zMQ%-!<%o!<%I(B
                   3027: @findex nk_restriction (option)
                   3028:
                   3029: @comment --- $B4X?t$N4JC1$J@bL@(B ---
                   3030: @table @t
                   3031: @item nk_restriction.restriction(... | inhomo=@var{n}, param=@var{p}, s0=@var{m})
1.39      nisiyama 3032: @item nk_restriction.restriction_ideal(... | inhomo=@var{n}, param=@var{p}, s0=@var{m}, ht=@var{b}, ord=@var{ord})
1.36      nisiyama 3033: @item nk_restriction.integration(... | inhomo=@var{n}, param=@var{p}, s0=@var{m})
1.39      nisiyama 3034: @item nk_restriction.integration_ideal(... | inhomo=@var{n}, param=@var{p}, s0=@var{m}, ht=@var{b}, ord=@var{ord})
1.36      nisiyama 3035: :: D $B2C72$N@)8B(B, $B@QJ,$K4X$9$k4X?t$N%*%W%7%g%s$N@bL@(B
                   3036: @end table
                   3037:
                   3038: @comment --- $B0z?t$N4JC1$J@bL@(B ---
                   3039: @table @var
                   3040: @item @var{n}
                   3041: 0 $B$^$?$O(B 1
                   3042: @item @var{p}
                   3043: $B%j%9%H(B ($B78?tBN$KB0$9$kJQ?t$N%j%9%H(B)
                   3044: @item @var{m}
                   3045: $B@0?t(B
1.39      nisiyama 3046: @item @var{b}
                   3047: 0, 1, 2, 3 $B$N$$$:$l$+(B
                   3048: @item @var{ord}
                   3049: $B=E$_(B0$B$NJQ?t$KBP$9$k9`=g=x(B
1.36      nisiyama 3050: @end table
                   3051:
                   3052: @comment --- $B$3$3$G4X?t$N>\$7$$@bL@(B ---
                   3053: @comment --- @itemize$B!A(B@end itemize $B$O2U>r=q$-(B ---
                   3054: @comment --- @bullet $B$O9uE@IU$-(B ---
                   3055: @itemize @bullet
                   3056: @item @var{n} $B$,(B 0 $B$G$J$$$H$-(B, $BHs@F<!ItJ,$N7W;;$r9T$&(B.
                   3057:
                   3058: restriction_ideal (integration_ideal) $B$K4X$7$F$O(B, $B%$%G%"%k(B @code{I} $B$N(B
                   3059: @code{M} $BJQ?t$K$D$$$F$N@)8B(B($B@QJ,(B)$B%$%G%"%k(B @code{J} $B$H(B
                   3060:
                   3061: @iftex
                   3062: @tex
                   3063: {\tt J[K]-(1/IH[K][1])(IH[K][0][0][0]IH[K][0][0][1]+...+IH[K][0][M][0]IH[K][0][M][1])} $\in$ {\tt I}
                   3064: @end tex
                   3065: @end iftex
                   3066: @ifinfo
                   3067: J[K]-(1/IH[K][1])(IH[K][0][0][0]IH[K][0][0][1]+...+IH[K][0][M][0]IH[K][0][M][1]) \in I
                   3068: @end ifinfo
                   3069:
                   3070: $B$rK~$?$9Hs@F<!ItJ,$r9=@.$9$k>pJs(B @code{IH} $B$H$N%Z%"(B @code{[J,IH]} $B$r=PNO$9$k(B.
                   3071: $B>\$7$$=PNO$N8+J}$K$D$$$F$O(B, $B2<$NNc$d%=!<%9$N(B @code{inhomo_part} $B$N(B
                   3072: $B%3%a%s%H$r;2>H(B.
                   3073:
                   3074: restriction, integration $B$KBP$9$k(B @code{inhomo} $B%*%W%7%g%s$O(B
                   3075: restriction_ideal, integration_ideal $B$N%5%V%k!<%A%s$H$7$F$N<B9TMQ$J$N$G(B,
                   3076: $B%f!<%6$,L@<(E*$K;HMQ$9$k$3$H$O$J$$(B.
                   3077:
                   3078: @item @var{param} $B$K;XDj$5$l$?JQ?t$O78?tBN$KB0$9$k$b$N$H$_$J$5$l$F7W;;$,9T$o$l$k(B.
                   3079: $B$^$?(B, ``generic'' $B$G$"$k$3$H$,2>Dj$5$l$k(B.
                   3080: $B$D$^$j(B, $B$3$l$i$NJQ?t$K0MB8$9$k$h$&$J(B generic b-$B4X?t$N:,$O(B,
                   3081: $B:GBg@0?t:,$G$J$$$H$$$&$3$H$G$"$k(B.
                   3082:
                   3083: @item @var{param} $B$,;XDj$5$l$k$H(B, generic b-$B4X?t$N7W;;$O(B noro $B$K$h$k(B
                   3084: $B9bB.%"%k%4%j%:%`$G$O$J$/(B, $B>C5nK!$,MQ$$$i$l$k(B.
                   3085: @var{param} $B$K6u%j%9%H$r;XDj$9$k$3$H$G(B, b-$B4X?t$N7W;;J}K!$N%U%i%0$H$7$F$b(B
                   3086: $BMxMQ$G$-$k(B.
                   3087:
                   3088: @item @var{m} $B$,Ii$G$J$$$H$-(B, $B7W;;$r9T$o$:$K(B s-m $B$r(B generic b-$B4X?t$H$7$F(B
                   3089: $B@)8B(B, $B@QJ,Ey$N7W;;$r9T$&(B.
1.39      nisiyama 3090:
                   3091: @item @var{b} $B$K$h$j(B, $B2C72$N%0%l%V%J4pDl7W;;$K@F<!2=(B, trace $B%"%k%4%j%:%`(B
                   3092: $B$rMQ$$$k$+$I$&$+;XDj$G$-$k(B.
                   3093: $B$?$@$7(B, $B@F<!2=$"$j$G7W;;$G$-$k$N$O(B Risa/Asir $B%P!<%8%g%s(B 20100415 $B0J9_$G$"$k(B.
                   3094:
                   3095: 0: $B@F<!2=$J$7(B, trace $B$J$7(B
                   3096:
                   3097: 1: $B@F<!2=$J$7(B, trace $B$"$j(B
                   3098:
                   3099: 2: $B@F<!2=$"$j(B, trace $B$J$7(B ($B%G%U%)%k%H(B)
                   3100:
                   3101: 3: $B@F<!2=$"$j(B, trace $B$"$j(B
                   3102:
                   3103: @item @var{ord} $B$,;XDj$5$l$k$H(B, $B=PNO$N@QJ,(B, $B@)8B%$%G%"%k$O(B, $B$=$N9`=g=x$K(B
                   3104: $B4X$9$k%0%l%V%J4pDl$H$J$k(B. $B2C72$N%0%l%V%J4pDl7W;;$N(B POT $B=g=x$N(B tie breaker
                   3105: $B$H$7$F;HMQ$5$l$k$N$G7W;;8zN($KBg$-$J1F6A$rM?$($k2DG=@-$,$"$k(B.
                   3106: $B%G%U%)%k%H$O(B 0, $B$D$^$jA4<!?t5U<!=q<0=g=x$G$"$k(B.
                   3107:
                   3108: $B$3$N%*%W%7%g%s$O(B @var{param} $B$HF1;~MxMQ$G$-$J$$(B. ($B8e$KBP1~M=Dj(B.)
1.36      nisiyama 3109: @end itemize
                   3110:
                   3111: $B0J2<$O(B,
                   3112: @iftex
                   3113: @tex
                   3114: $ t^{b-1} (1-t)^{c-b-1} (1-xt)^{-a} $
                   3115: @end tex
                   3116: $B$N(B annihilator
                   3117: @tex
                   3118: $I = D \cdot \{ x(1-x) \partial_x^2+((1-t) \partial_t-(a+b+1)x+c-1)
                   3119:  \partial_x-ab, (1-t)x \partial_x+t(1-t) \partial_t+(2-c)t+b-1,
                   3120:  (xt-1) \partial_x+at \}$
                   3121: @end tex
                   3122: $B$N(B
                   3123: @tex
                   3124: $t$
                   3125: @end tex
                   3126: $B$K$D$$$F$N@QJ,%$%G%"%k(B
                   3127: @tex
                   3128: $J$
                   3129: @end tex
                   3130: $B$r7W;;$7(B, Gauss $B$ND64v2?HyJ,J}Dx<0$rF3=P$7$?Nc$G$"$k(B. ([SST, Chap 1.3])
                   3131: @end iftex
                   3132: @ifinfo
                   3133: t^{b-1} (1-t)^{c-b-1} (1-xt)^{-a}
                   3134: $B$N(B annihilator
                   3135: I = D . @{ x(1-x)dx^2+((1-t)dt-(a+b+1)x+c-1)dx-ab,
                   3136:  (1-t)x dx+t(1-t)dt+(2-c)t+b-1, (xt-1)dx+at @}
                   3137: $B$N(B t $B$K$D$$$F$N@QJ,%$%G%"%k(B J
                   3138: $B$r7W;;$7(B, Gauss $B$ND64v2?HyJ,J}Dx<0$rF3=P$7$?Nc$G$"$k(B. ([SST, Chap 1.3])
                   3139: @end ifinfo
                   3140: @example
                   3141: [1555] A=ndbf.ann_n([t,1-t,1-x*t])$
                   3142: [1556] I=map(subst,A,s0,b-1,s1,c-b-1,s2,-a);
                   3143: [(x^2-x)*dx^2+((t-1)*dt+(a+b+1)*x-c+1)*dx+b*a,(-t+1)*x*dx+(t^2-t)*dt+(-c+2)*t+b-1,(t*x-1)*dx+a*t]
                   3144: [1557] J=nk_restriction.integration_ideal(I,[t,x],[dt,dx],[1,0]|inhomo=1, param=[a,b,c]);
                   3145: -- nd_weyl_gr :0sec(0.001875sec)
                   3146: -- weyl_minipoly_by_elim :0.008001sec(0.006133sec)
                   3147: -- generic_bfct_and_gr :0.008001sec(0.006181sec)
                   3148: generic bfct : [[-1,1],[s,1],[s-a+c-1,1]]
                   3149: S0 : 0
                   3150: B_{S0} length : 1
                   3151: -- fctr(BF) + base :0sec(0.003848sec)
                   3152: -- integration_ideal_internal :0sec(0.07707sec)
                   3153: [[(x^2-x)*dx^2+((a+b+1)*x-c)*dx+b*a],[[[[dt,(-t+1)*dx]],1]]]
                   3154: @end example
                   3155: @iftex
                   3156: $B$3$N=PNO$O(B
                   3157: @tex
                   3158: $\{(x^2-x) \partial_x^2+((a+b+1)x-c) \partial_x+ab \}
                   3159: - 1/1 \{ \partial_t (-t+1) \partial_x \} \in I$
                   3160: @end tex
                   3161: $B$G$"$k$3$H$r0UL#$9$k(B.
                   3162: @end iftex
                   3163: @ifinfo
                   3164: $B$3$N=PNO$O(B
                   3165: @{(x^2-x)dx^2+((a+b+1)x-c)dx+ab @} - 1/1 @{ dt (-t+1)dx @} \in I
                   3166: $B$G$"$k$3$H$r0UL#$9$k(B.
                   3167: @end ifinfo
                   3168:
1.42      nisiyama 3169: @node nk_restriction.trans_inhomo,,, D $B2C72$N@QJ,%$%G%"%k$NHs@F<!ItJ,$K4X$9$k4X?t(B
1.39      nisiyama 3170: @subsection @code{nk_restriction.trans_inhomo}
                   3171: @comment --- $B:w0zMQ%-!<%o!<%I(B
1.42      nisiyama 3172: @findex nk_restriction.trans_inhomo
1.39      nisiyama 3173:
                   3174: @comment --- $B4X?t$N4JC1$J@bL@(B ---
                   3175: @table @t
                   3176: @item nk_restriction.trans_inhomo(@var{P}, @var{INT}, @var{VL}, @var{DVL}, @var{W})
                   3177: :: D $B2C72$N@)8B%$%G%"%k(B, $B@QJ,%$%G%"%k$N@8@.85$KBP$9$kHs@F<!ItJ,$N>pJs$+$i(B, $BG$0U$N85$KBP$9$kHs@F<!ItJ,$r7W;;$9$k4X?t(B
                   3178: @end table
                   3179:
                   3180: @comment --- $B0z?t$N4JC1$J@bL@(B ---
                   3181: @table @var
                   3182: @item P
                   3183: $B@QJ,%$%G%"%k$N85(B, $B$^$?$O@)8B%$%G%"%k$N85(B
                   3184: @item INT
                   3185: nk_restriction.integration_ideal( ... |inhomo=1); $B$^$?$O(B
                   3186:
                   3187: nk_restriction.restriction_ideal( ... |inhomo=1); $B$N=PNO(B
                   3188: @item VL
                   3189: $BJQ?t$N%j%9%H(B
                   3190: @item DVL
                   3191: $BJQ?t$N%j%9%H(B(@var{VL} $B$KBP1~$9$kHyJ,:nMQAG$NJ}$NJQ?t(B)
                   3192: @item W
                   3193: $B=E$_%Y%/%H%k$rI=$9%j%9%H(B
                   3194: @end table
                   3195:
                   3196: @comment --- $B$3$3$G4X?t$N>\$7$$@bL@(B ---
                   3197: @comment --- @itemize$B!A(B@end itemize $B$O2U>r=q$-(B ---
                   3198: @comment --- @bullet $B$O9uE@IU$-(B ---
                   3199: @itemize @bullet
                   3200: @item @var{VL}, @var{DVL}, @var{W} $B$O(B @var{INT} $B$N7W;;$KMQ$$$?$b$N$r$=$N$^$^;HMQ$7$J$1$l$P$J$i$J$$(B.
                   3201: @item $B$b$7(B, @var{P} $B$,(B @var{INT[0]} $B$G@8@.$5$l$k@QJ,(B, $B@)8B%$%G%"%k$N85$G$J$$>l9g$O%(%i!<%a%C%;!<%8$,I=<($5$l$k(B.
                   3202: @end itemize
                   3203:
1.42      nisiyama 3204: @node nk_restriction.ost_integration_ideal,,, D $B2C72$N@QJ,%$%G%"%k(B
                   3205: @subsection @code{nk_restriction.ost_integration_ideal}
                   3206: @comment --- $B:w0zMQ%-!<%o!<%I(B
                   3207: @findex nk_restriction.ost_integration_ideal
                   3208:
                   3209: @comment --- $B4X?t$N4JC1$J@bL@(B ---
                   3210: $B@QJ,NN0h$,6h4V$ND>@Q$G$"$k$h$&$J@QJ,$NK~$?$9(B
1.43      nisiyama 3211: $B%[%m%N%_%C%/@F<!HyJ,J}Dx<07O$rJV$9(B (Oaku-Shiraki-Takayama, 2003).
1.42      nisiyama 3212: @table @t
                   3213: @item nk_restriction.ost_integration_ideal(@var{Id}, @var{VL}, @var{DVL}, @var{W}, @var{LB}, @var{UB})
                   3214: :: Heaviside $B4X?t$H$N@Q$NK~$?$9HyJ,J}Dx<07O$N7W;;$K%7%g!<%H%+%C%HK!$rMQ$$$k(B.
                   3215: @item nk_restriction.ost_integration_ideal2(@var{Id}, @var{VL}, @var{DVL}, @var{W}, @var{LB}, @var{UB})
                   3216: :: Heaviside $B4X?t$H$N@Q$NK~$?$9HyJ,J}Dx<07O$N7W;;$K@)8B%$%G%"%k$rMQ$$$k(B.
                   3217: @end table
                   3218:
                   3219: @comment --- $B0z?t$N4JC1$J@bL@(B ---
                   3220: @table @var
                   3221: @item Id
                   3222: $B%$%G%"%k$N@8@.85$N%j%9%H(B
                   3223: @item VL
                   3224: $BJQ?t$N%j%9%H(B
                   3225: @item DVL
                   3226: $BJQ?t$N%j%9%H(B(@var{VL} $B$KBP1~$9$kHyJ,:nMQAG$NJ}$NJQ?t(B)
                   3227: @item W
                   3228: $B=E$_%Y%/%H%k$rI=$9%j%9%H(B
                   3229: @item LB
                   3230: $B@QJ,6h4V$N2<C<$rI=$9%j%9%H(B
                   3231: @item UB
                   3232: $B@QJ,6h4V$N>eC<$rI=$9%j%9%H(B
                   3233: @end table
                   3234:
                   3235: @comment --- $B$3$3$G4X?t$N>\$7$$@bL@(B ---
                   3236: @comment --- @itemize$B!A(B@end itemize $B$O2U>r=q$-(B ---
                   3237: @comment --- @bullet $B$O9uE@IU$-(B ---
                   3238: @itemize @bullet
                   3239: @item $B2<C<(B, $B>eC<$KL58BBg$r;XDj$9$k$H$-$O(B, $BJ8;zNs(B  "inf", "+inf", "-inf" $B$rMQ$$$k(B.
                   3240: @end itemize
                   3241:
1.43      nisiyama 3242: $B0J2<$O(B, Oaku-Shiraki-Takayama (2003) $B$NNc(B5.1$B$r7W;;$7$?$b$N$G$"$k(B.
1.42      nisiyama 3243: @iftex
                   3244: @tex
                   3245: $ \int_0^\infty \exp((-t^3+t)x) dt $
                   3246: @end tex
1.44      nisiyama 3247: $B$NHo@QJ,4X?t$NK~$?$9%[%m%N%_%C%/%$%G%"%k$O(B
1.42      nisiyama 3248: @tex
                   3249: $ I = \langle \partial_t +(3t^2-1)x, \partial_x+t^3-t \rangle $
                   3250: @end tex
                   3251: $B$G$"$k$+$i(B, $B$3$l$rF~NO$H$7$F<!$N$h$&$K7W;;$r9T$&(B.
                   3252: @end iftex
                   3253: @ifinfo
                   3254: \int_0^$B!g(B exp((-t^3+t)x) dt
                   3255: $B$NHs@QJ,4X?t$NK~$?$9%[%m%N%_%C%/%$%G%"%k$O(B
                   3256: I = < dt +(3t^2-1)x, dx+t^3-t >
                   3257: $B$G$"$k$+$i(B, $B$3$l$rF~NO$H$7$F<!$N$h$&$K7W;;$r9T$&(B.
                   3258: @end ifinfo
                   3259: @example
                   3260: [1871] Id=[dt+(3*t^2-1)*x, dx+t^3-t]$
                   3261: [1872] VL=[t,x]$
                   3262: [1873] DVL=[dt,dx]$
                   3263: [1874] W=[1,0]$
                   3264: [1875] nk_restriction.ost_integration_ideal(Id,VL,DVL,W,[0],["inf"]);
                   3265: -- nd_weyl_gr :0.008sec(0.006768sec)
                   3266: -- weyl_minipoly :0.004001sec(0.003029sec)
                   3267: -- generic_bfct_and_gr :0.012sec(0.0129sec)
                   3268: generic bfct : [[1,1],[s,1],[s-2,1]]
                   3269: S0 : 2
                   3270: B_{S0} length : 3
                   3271: -- fctr(BF) + base :0.008sec(0.007395sec)
                   3272: -- integration_ideal_internal :0.012sec + gc : 0.016sec(0.04311sec)
                   3273: [-27*x^3*dx^3-54*x^2*dx^2+(4*x^3+3*x)*dx+4*x^2-3,27*x^2*dx^4+135*x*dx^3+(-4*x^2+105)*dx^2-16*x*dx-8]
                   3274:
                   3275:
                   3276: [1876] nk_restriction.ost_integration_ideal2(Id,VL,DVL,W,[0],["inf"]);
                   3277: ($BN,(B)
                   3278: [27*x^3*dx^3+54*x^2*dx^2+(-4*x^3-3*x)*dx-4*x^2+3,-27*x^2*dx^4-135*x*dx^3+(4*x^2-105)*dx^2+16*x*dx+8]
                   3279: @end example
                   3280: $B$3$N=PNO$O(B, $B@QJ,$rNm2=$9$k%[%m%N%_%C%/7O$G$"$k(B.
                   3281:
1.44      nisiyama 3282: @node nk_restriction.ost_sum,,, D $B2C72$N@QJ,%$%G%"%k(B
                   3283: @subsection @code{nk_restriction.ost_sum}
                   3284: @comment --- $B:w0zMQ%-!<%o!<%I(B
                   3285: @findex nk_restriction.ost_sum
                   3286:
                   3287: @comment --- $B4X?t$N4JC1$J@bL@(B ---
                   3288: @table @t
                   3289: @item nk_restriction.ost_sum(@var{Id}, @var{VL}, @var{DVL}, @var{W})
                   3290: :: $BOB$NK~$?$9(B($B@F<!(B/$BHs@F<!(B)$B:9J,J}Dx<07O$rJV$9(B.
                   3291: @end table
                   3292:
                   3293: @comment --- $B0z?t$N4JC1$J@bL@(B ---
                   3294: @table @var
                   3295: @item Id
                   3296: $B%$%G%"%k$N@8@.85$N%j%9%H(B
                   3297: @item VL
                   3298: $BJQ?t$N%j%9%H(B
                   3299: @item DVL
                   3300: $BJQ?t$N%j%9%H(B(@var{VL} $B$KBP1~$9$k:9J,:nMQAG$NJ}$NJQ?t(B)
                   3301: @item W
                   3302: $B=E$_%Y%/%H%k$rI=$9%j%9%H(B
                   3303: @end table
                   3304:
                   3305: @comment --- $B$3$3$G4X?t$N>\$7$$@bL@(B ---
                   3306: @comment --- @itemize$B!A(B@end itemize $B$O2U>r=q$-(B ---
                   3307: @comment --- @bullet $B$O9uE@IU$-(B ---
                   3308: @itemize @bullet
                   3309: @item Oaku-Shiraki-Takayama (2003) $B$NBh(B6$B@a$N%"%k%4%j%:%`$N<BAu(B.
                   3310: @item $B%*%W%7%g%s(B inhomo $B$,(B 0 $B$G$J$$$H$-(B, $BHs@F<!ItJ,$rM?$($k>pJs$bJV$9(B.
                   3311: @end itemize
                   3312:
                   3313: $B0J2<$O(B, Oaku-Shiraki-Takayama (2003) $B$NNc(B6.5$B$NHs@F<!ItJ,$^$G7W;;$7$?$b$N$G$"$k(B.
                   3314: @iftex
                   3315: @tex
                   3316: $ \sum_{k=a}^b {n \choose k} $
                   3317: @end tex
                   3318: $B$NHsOB4X?t$NK~$?$9%[%m%N%_%C%/%$%G%"%k$O(B
                   3319: @tex
                   3320: $ I = \langle (n-k+1)E_n-(n+1), (k+1)E_k-(n-k) \rangle $
                   3321: @end tex
                   3322: $B$G$"$k$+$i(B, $B$3$l$rF~NO$H$7$F<!$N$h$&$K7W;;$r9T$&(B.
                   3323: @end iftex
                   3324: @ifinfo
                   3325: \sum_{k=a}^b n_C_k
                   3326: $B$NHsOB4X?t$NK~$?$9%[%m%N%_%C%/%$%G%"%k$O(B
                   3327: I = < (n-k+1)E_n-(n+1), (k+1)E_k-(n-k) >
                   3328: $B$G$"$k$+$i(B, $B$3$l$rF~NO$H$7$F<!$N$h$&$K7W;;$r9T$&(B.
                   3329: @end ifinfo
                   3330: @example
                   3331: [1871] Id=[(n-k+1)*en-(n+1), (k+1)*ek-(n-k)]$
                   3332: [1872] VL=[k,n]$
                   3333: [1873] DVL=[ek,en]$
                   3334: [1874] W=[1,0]$
                   3335: [1875] nk_restriction.ost_sum(Id,VL,DVL,W|inhomo=1);
                   3336: -- nd_weyl_gr :0.006667sec(0.004057sec)
                   3337: -- weyl_minipoly :0sec(0.001163sec)
                   3338: -- generic_bfct_and_gr :0.01sec(0.007085sec)
                   3339: generic bfct : [[1,1],[s,1]]
                   3340: S0 : 0
                   3341: B_{S0} length : 1
                   3342: -- fctr(BF) + base :0.003333sec(0.001785sec)
                   3343: -- restriction_ideal_internal :0sec(0.002336sec)
                   3344: [[(en-2)*n+en-2],[[[[ek-1,[(-en+1)*n-en+1,1]]],1]]]
                   3345: @end example
                   3346:
1.51      nakayama 3347: @subsection @code{nk_restriction.module_restriction}
                   3348: @comment --- $B:w0zMQ%-!<%o!<%I(B
                   3349: @findex nk_restriction.module_restriction
                   3350:
                   3351: @comment --- $B4X?t$N4JC1$J@bL@(B ---
                   3352: @table @t
                   3353: @item nk_restriction.module_restriction(@var{M}, @var{VL}, @var{DVL}, @var{W})
1.52    ! nakayama 3354: :: D $B2C72(B D^r/@var{M} (@var{M} $B$O(B D^r $B$NItJ,2C72(B) $B$N=E$_%Y%/%H%k(B @var{W} $B$K$D$$$F$N@)8B2C72$rJV$9(B.
1.51      nakayama 3355: @end table
                   3356:
                   3357: @comment --- $B0z?t$N4JC1$J@bL@(B ---
                   3358: @table @var
1.52    ! nakayama 3359: @item M
        !          3360: D $B<+M32C72(B D^r $B$NItJ,2C72(B
1.51      nakayama 3361: @item VL
                   3362: $BJQ?t$N%j%9%H(B
                   3363: @item DVL
                   3364: $BJQ?t$N%j%9%H(B(@var{VL} $B$KBP1~$9$kHyJ,:nMQAG$NJ}$NJQ?t(B)
                   3365: @item W
                   3366: $B=E$_%Y%/%H%k$rI=$9%j%9%H(B
                   3367: @end table
                   3368:
                   3369: @itemize @bullet
                   3370: @item
                   3371: @var{W} $B$NMWAG$OHsIi@0?t$G(B, 0 $BHVL\$NMWAG$+$iO"B3$7$F@5$N@0?t$,F~$i$J$1$l$P$J$i$J$$(B.
                   3372: @comment{($B$9$J$o$A!"(B@code{[1,1,0,0,0]} $B$O(B OK $B$@$,!"(B @code{[1,0,1,0,0]} $B$O%@%a(B)}
                   3373: $B8=:_$N$H$3$m(B, 1 $BJQ?t$K$D$$$F$@$1@)8B$r$H$k$h$&$K$7$+<BAu$7$F$$$J$$$?$a(B,
                   3374: @var{W} $B$O(B 0 $BHVL\$NMWAG$@$1@5$N@0?t$,F~$k(B.
                   3375: @item
                   3376: $B@5$N=E$_$r;}$DJQ?t$K$D$$$F$N@)8B$r9T$&(B.
                   3377: $BNc$($P(B, @var{VL} @code{=[x,y,z]}, @var{W} @code{=[1,0,0]} $B$G$"$l$P(B
                   3378: x $B$K$D$$$F@)8B$r9T$&(B.
                   3379: @end itemize
                   3380:
1.52    ! nakayama 3381: $B0J2<$O(B, D $B<+M32C72(B
1.51      nakayama 3382: @iftex
1.52    ! nakayama 3383: @tex $D^2$ @end tex
        !          3384: $B$NItJ,2C72(B
1.51      nakayama 3385: @tex
                   3386: $M = D \cdot \{(\partial_x, \partial_y), (\partial_y, \partial_x), (x,y) \}$
                   3387: @end tex
1.52    ! nakayama 3388: $B$r$H$j(B, D $B2C72(B
        !          3389: @tex $D^2 / M$ @end tex
        !          3390: $B$N(B
        !          3391: @tex $x$ @end tex
        !          3392: @end iftex
1.51      nakayama 3393: @ifinfo
1.52    ! nakayama 3394: D^2 $B$NItJ,2C72(B M = D . @{ (dx, dy), (dy, dx), (x, y) @}
        !          3395: $B$r$H$j(B, D $B2C72(B D^2 / M $B$N(B x
1.51      nakayama 3396: @end ifinfo
1.52    ! nakayama 3397: $B$D$$$F$N@)8B2C72$r7W;;$7$?Nc$G$"$k(B.
1.51      nakayama 3398: @example
                   3399: [2691] nk_restriction.module_restriction([[dx,dy],[dy,dx],[x,y]], [x,y], [dx,dy], [1,0]);
                   3400: ....
                   3401: bfunction :
                   3402: s
                   3403: [[1,1],[s,1]]
                   3404: integer roots :
                   3405: [0,0]
                   3406: Generators:
                   3407: [e1,e2]
                   3408: Relations:
                   3409: [-8*e2*dy,4*e2*dy^2,-4*e2*dy^3,4*e1*y*dy-4*e1,-4*e1*dy^2,-4*e2,-e2*y*dy^2+2*e2*dy,-e1*y*dy+e1,e1*y*dy-e1]
                   3410: [[0,-1],[-dy^2,0],[y*dy-1,0]]
                   3411: @end example
                   3412: $B@)8B2C72$O(B
1.52    ! nakayama 3413: @iftex
1.51      nakayama 3414: @tex $(0, -1), (-\partial_y^2, 0), (y \partial_y -1 , 0)$ @end tex
1.52    ! nakayama 3415: @end iftex
        !          3416: @ifinfo
        !          3417: (0, -1), (-dy^2, 0), (y, dy-1, 0)
        !          3418: @end ifinfo
1.51      nakayama 3419: $B$G@8@.$5$l$k$3$H$,$o$+$k(B.
                   3420:
                   3421: @subsection @code{nk_restriction.module_integration}
                   3422: @comment --- $B:w0zMQ%-!<%o!<%I(B
                   3423: @findex nk_restriction.module_integration
                   3424:
                   3425: @comment --- $B4X?t$N4JC1$J@bL@(B ---
                   3426: @table @t
                   3427: @item nk_restriction.module_integration(@var{M}, @var{VL}, @var{DVL}, @var{W})
1.52    ! nakayama 3428: :: D $B2C72(B D^r/M (@var{M} $B$O(B D^r $B$NItJ,2C72(B) $B$N=E$_%Y%/%H%k(B @var{W} $B$K$D$$$F$N@QJ,2C72$rJV$9(B.
1.51      nakayama 3429: @end table
                   3430:
                   3431: @comment --- $B0z?t$N4JC1$J@bL@(B ---
                   3432: @table @var
1.52    ! nakayama 3433: @item M
        !          3434: D $B<+M32C72(B D^r $B$NItJ,2C72(B
1.51      nakayama 3435: @item VL
                   3436: $BJQ?t$N%j%9%H(B
                   3437: @item DVL
                   3438: $BJQ?t$N%j%9%H(B(@var{VL} $B$KBP1~$9$kHyJ,:nMQAG$NJ}$NJQ?t(B)
                   3439: @item W
                   3440: $B=E$_%Y%/%H%k$rI=$9%j%9%H(B
                   3441: @end table
                   3442:
                   3443: @itemize @bullet
                   3444: @item
                   3445: @var{W} $B$NMWAG$OHsIi@0?t$G(B, 0 $BHVL\$NMWAG$+$iO"B3$7$F@5$N@0?t$,F~$i$J$1$l$P$J$i$J$$(B.
                   3446: @comment{($B$9$J$o$A!"(B@code{[1,1,0,0,0]} $B$O(B OK $B$@$,!"(B @code{[1,0,1,0,0]} $B$O%@%a(B)}
                   3447: $B8=:_$N$H$3$m(B, 1 $BJQ?t$K$D$$$F$@$1@QJ,$r$H$k$h$&$K$7$+<BAu$7$F$$$J$$$?$a(B,
                   3448: @var{W} $B$O(B 0 $BHVL\$NMWAG$@$1@5$N@0?t$,F~$k(B.
                   3449: @item
                   3450: $B@5$N=E$_$r;}$DJQ?t$K$D$$$F$N@QJ,$r9T$&(B.
                   3451: $BNc$($P(B, @var{VL} @code{=[x,y,z]}, @var{W} @code{=[1,0,0]} $B$G$"$l$P(B
                   3452: x $B$K$D$$$F@QJ,$r9T$&(B.
                   3453: @end itemize
                   3454:
1.52    ! nakayama 3455: $B0J2<$O(B, D $B<+M32C72(B
1.51      nakayama 3456: @iftex
1.52    ! nakayama 3457: @tex $D^2$ @end tex
        !          3458: $B$NItJ,2C72(B
        !          3459: @tex $M = D \cdot \{(x, y), (y, x), (\partial_x, \partial_y) \}$ @end tex
        !          3460: $B$r$H$j(B, D $B2C72(B
        !          3461: @tex $D^2/M$ @end tex
1.51      nakayama 3462: $B$N(B
1.52    ! nakayama 3463: @tex $x$ @end tex
        !          3464: @end iftex
1.51      nakayama 3465: @ifinfo
1.52    ! nakayama 3466: D^2 $B$NItJ,2C72(B M = D . @{ (x, y), (y, x), (dx, dy) @} $B$r$H$j(B,
        !          3467: D $B2C72(B D^2 / M $B$N(B x
1.51      nakayama 3468: @end ifinfo
1.52    ! nakayama 3469: $B$K$D$$$F$N@QJ,2C72$r7W;;$7$?Nc$G$"$k(B.
1.51      nakayama 3470: @example
                   3471: [2702] nk_restriction.module_integration([[x,y],[y,x],[dx,dy]], [x,y], [dx,dy], [1,0]);
                   3472: ...
                   3473: bfunction :
                   3474: s
                   3475: [[1,1],[s,1]]
                   3476: integer roots :
                   3477: [0,0]
                   3478: Generators:
                   3479: [e1,e2]
                   3480: Relations:
                   3481: [-8*e2*y,-4*e2*y^2,-4*e2*y^3,-4*e1*y*dy-8*e1,-4*e1*y^2,-4*e2,-e2*y^2*dy-4*e2*y,e1*y*dy+2*e1,e1*y*dy+2*e1]
                   3482: [[0,-1],[y*dy+2,0],[-y^2,0]]
                   3483: @end example
                   3484: $B@QJ,2C72$O(B
1.52    ! nakayama 3485: @iftex
1.51      nakayama 3486: @tex $(0, -1), (y \partial_y + 2, 0), (-y^2, 0)$ @end tex
1.52    ! nakayama 3487: @end iftex
        !          3488: @ifinfo
        !          3489: (0, -1), (y dy + 2, 0), (-y^2, 0)
        !          3490: @end ifinfo
1.51      nakayama 3491: $B$G@8@.$5$l$k$3$H$,$o$+$k(B.
1.44      nisiyama 3492:
1.30      takayama 3493: @noindent
                   3494: ChangeLog
                   3495: @itemize @bullet
                   3496: @item  $B$3$l$i$N4X?t$O(B OpenXM/src/asir-contrib/packages/src/nk_restriction.rr $B$GDj5A$5$l$F$$$k(B. nk_restriction.rr, 1.1--1.6 $B$r8+$h(B.
1.39      nisiyama 3497: @item 2010-02-05 $B$K(B 3 $B$D$N(B option (@code{inhomo}, @code{param}, @code{s0}) $B$,DI2C$5$l$?(B. 1.7--1.9 $B$r8+$h(B.
                   3498: @item 2010-05 $B$+$i(B 2010-07 $B$K$+$1$F(B 2 $B$D$N(B option (@code{ht}, @code{ord}) $B$H(B
                   3499: $B?7$?$J4X?t(B trans_inhomo() $B$,DI2C$5$l$?(B. 1.10--1.13 $B$r8+$h(B.
1.44      nisiyama 3500: @item 2011-08 $B$K(B ost_sum() $B$,DI2C$5$l$?(B. 1.20 $B$r8+$h(B.
1.51      nakayama 3501: @item 2016-05 $B$K(B module_integration(), module_restriction() $B$,DI2C$5$l$?(B.
1.30      takayama 3502: @end itemize
                   3503:
1.37      takayama 3504: @node $B$=$NB>(B($BL$J,N`(B),,, $B<B83E*;EMM$N4X?t(B
                   3505: @section $B$=$NB>(B($BL$J,N`(B)
                   3506:
                   3507: @node tk_pfn.rkn,,, $B<B83E*;EMM$N4X?t(B
                   3508: @subsection @code{tk_pfn.rkn}
                   3509: @findex tk_pfn.rkn
                   3510:
                   3511: @comment --- $B4X?t$N4JC1$J@bL@(B ---
                   3512: @comment --- @itemx $B$OJ#?t$KBP$7$F@bL@$r0l$D$D$1$k>l9g$K;H$&(B ---
                   3513: @table @t
                   3514: @item tk_pfn.rkn(@var{F},@var{X},@var{Y},@var{Xs},@var{Ys},@var{Ht},@var{H})
                   3515: :: Pfaffian $BJ}Dx<0$KBP$9$k(B Runge-Kutta $BK!(B
                   3516: @end table
                   3517:
                   3518: @table @var
                   3519: @item return
                   3520: $B%j%9%H(B  $BFHN)JQ?t$H2r$NAH(B
                   3521: @item F, X, Y, Xs, Ys, Ht, H
                   3522: @var{F} $B$O(B Pfaffian $BJ}Dx<0$N78?t9TNs%j%9%H(B.
                   3523: @var{X} $B$OFHN)JQ?t%j%9%H(B.
                   3524: @var{Y} $B$O=>B0JQ?t%j%9%H(B.
                   3525: @var{Xs} $BFHN)JQ?t$N=PH/CM%j%9%H(B.
                   3526: @var{Ys} $B$O=PH/;~$N=>B0JQ?t$NCM%j%9%H(B.
                   3527: @var{Xt} $B$ODd;_$9$kFHN)JQ?t$NCM%j%9%H(B.
                   3528: @var{H} $B$OHy>/?t(B.
                   3529: @end table
                   3530:
                   3531: @itemize @bullet
                   3532: @item $B$3$N4X?t$OO"N)(BPfaffian$BJ}Dx<0(B dY/d X[i] = F[i] Y $B$r?tCME*$K2r$/(B.
                   3533: @item $BG$0U$N(B holonomic system $B$O(B Pfaffian $BJ}Dx<0$KJQ49$G$-$k(B ([SST, Chap 1]).$B!!JQ49$K$O(B yang.rr $B%Q%C%1!<%8$rMQ$$$k(B.
                   3534: @item d F[i]/d X[j] + F[i] F[j] = d F[j]/d X[i] + F[j] F[i] = 0 $B$,G$0U$N(B i, j $B$KBP$7$F@.N)$7$F$$$k$3$H$,2r$,B8:_$9$kI,MW==J,>r7o$G$"$k(B. $B$3$N>r7o$,@.N)$7$J$$$H$-$K$3$N4X?t$rMQ$$$F2r$r7W;;$7$F$b$=$N2r$O56J*$G$"$k(B.
                   3535: @item X[i] $B$,F0$/HO0O$O<B?t$G$J$$$H$$$1$J$$(B.
                   3536: @item Xs[i] <= X[i] <= Xt[i] $B$^$?$O(B Xt[i] <= X[i] <= Xs[i] $B$G$"$k(B.
                   3537: @item $B0z?t$NM?$(J}$NNc$O%=!<%9%3!<%I(B (@code{OpenXM/lib/asir-contrib/tk_pfn.rr} )$B$N(B @code{tk_pfn.test1}, @code{tk_pfn.test2} $B$r;2>H(B.
                   3538: @item $B2<$NNc$N=PNO$O(B X=(1,3) $B$G$NCM$,(B Y=(-8,2,-6) $B$G$"$k$3$H$r0UL#$9$k(B.
                   3539: @item $B;29M(B. taka_runge_kutta.rr, yang.rr
                   3540: @end itemize
                   3541:
                   3542: @example
                   3543: [1355] import("tk_pfn.rr");
                   3544: [1590]  tk_pfn.test1();
                   3545: Value at (3,0.1)[8.99,6,-0.2]
                   3546: Value at (1,3)[-8,2,-6]
                   3547: [[[1,3],-8,2,-6],
                   3548:  [[1,2.9],-7.41,2,-5.8],
                   3549:  --- snip ---
                   3550:  [[3,0.1],8.99,6,-0.2]]
                   3551: @end example
                   3552:
                   3553:
                   3554: @comment --- ChangeLog $B$r=q$/(B. $BF05!(B. $B%=!<%9%3!<%I$N0LCV(B. $BJQ99F|;~(B $B$J$I(B CVS$B%5!<%P$r8+$k$?$a(B
                   3555: @comment --- openxm $B$N30It$+$i$N4sM?$b=R$Y$k(B. Credit.
                   3556: @noindent
                   3557: ChangeLog
                   3558: @itemize @bullet
                   3559: @item $B$3$N4X?t$O(B 2009-12 $B$+$i(B 2010-01 $B$K$+$1$F:G=i$NHG$,=q$+$l$?(B.
                   3560: @item @code{OpenXM/src/asir-contrib/packages/src/tk_pfn.rr} 1.1, 1.2
                   3561: @item $B$3$N%b%8%e!<%k$NA0?H$O(B @code{tk_pf2.rr} $B$G$"$k(B. $B$3$l$OFHN)JQ?t$,(B 2 $B8D$N>l9g$G$"$k(B.
                   3562: @end itemize
1.29      nakayama 3563:
1.40      takayama 3564:
                   3565: @node tk_pfn.graph,,, $B<B83E*;EMM$N4X?t(B
                   3566: @subsection @code{tk_pfn.graph}
                   3567: @findex tk_pfn.graph
                   3568:
                   3569: @comment --- $B4X?t$N4JC1$J@bL@(B ---
                   3570: @comment --- @itemx $B$OJ#?t$KBP$7$F@bL@$r0l$D$D$1$k>l9g$K;H$&(B ---
                   3571: @table @t
                   3572: @item tk_pfn.graph(@var{Pf},@var{Dom},@var{Iv},@var{Step})
                   3573: :: 2$BJQ?t(B Pfaffian $BJ}Dx<0$r(B Runge-Kutta $BK!$G2r$$$F%0%i%UI=<($9$k(B.
                   3574: @end table
                   3575:
                   3576: @table @var
                   3577: @item return
1.41      takayama 3578: $B%j%9%H(B  $B%j%9%H$NMWAG$O0J2<$N7A<0(B [[x$B$NCM(B,y$B$NCM(B],Y_1$B$NCM(B,Y_2$B$NCM(B, ...].
                   3579: [x$B$NCM(B, y$B$NCM(B] $B$O(B [0,0],[0.2,0],[0.4,0], ... , [0,0.2],[0.2,0.2], ... $B$N$h$&$K(B
                   3580: y $B$NCM$,30B&%k!<%W(B, x $B$NCM$,FbB&%k!<%W$N7A<0$GA}$($k(B.
1.40      takayama 3581: @item Pf, Dom, Iv, Step
                   3582: @var{Pf} $B$O(B Pfaffian $BJ}Dx<0$N78?t9TNs%j%9%H(B.  $BFHN)JQ?t$O(B x, y $B$G8GDj(B.
                   3583: @var{Dom} $B%j%9%H(B. $B2r$/$Y$-NN0h(B.
                   3584: @var{Iv} $B%j%9%H(B. $BNN0h$N:8C<$G$N=i4|CM(B.
                   3585: @var{Step} $B9o$_I}(B.
                   3586: @end table
                   3587:
                   3588: @itemize @bullet
                   3589: @item tk_pf2.rr, mt_graph.rr $B$r(B import $B$7$F$*$/I,MW$,$"$k(B.
                   3590: @item $B$3$N4X?t$OO"N)(BPfaffian$BJ}Dx<0(B dY/dx = Pf[0] Y, dY/dy = Pf[1] Y $B$r?tCME*$K2r$$$F%0%i%UI=<($9$k(B.
                   3591: @item @var{Dom} $B$O(B [[xmin,xmax],[ymin,ymax]] $B$N7A<0(B.
                   3592: @item $BNc$O%=!<%9%3!<%I(B (@code{OpenXM/lib/asir-contrib/tk_pfn.rr} )$B$N(B @code{tk_pfn.testgraph1()}, @code{tk_pfn.testgraph2()} $B$r;2>H(B.
                   3593: @item option $B$H$7$F$O(B fit=1 $B$,$"$k(B. Z$B<4$rE,59D4@0$9$k(B.
1.41      takayama 3594: @item @var{Dom} $B$NC<$O%0%i%UI=<($N;~$K0lIt%+%C%H$5$l$k$N$GCm0U(B.
1.40      takayama 3595: @end itemize
                   3596:
                   3597: @example
                   3598: [1355] import("tk_pf2.rr"); import("mt_graph.rr"); import("tk_pfn.rr");
1.41      takayama 3599: [1590] tk_pfn.testgraph1();
1.40      takayama 3600:
                   3601: $B$3$3$G(B testgraph1() $B$O0J2<$N$H$*$j(B.
                   3602: def testgraph1() {
                   3603:   /* tk_bess2.bess2pf(1/2); */
                   3604:   Pf=  [[[ 0, (1)/(x), 0 ],
                   3605:          [ -x, (2*x^2+1)/(x), -2*x ],
                   3606:          [ -y, 0, 0 ]],
                   3607:         [[ 0, 0, (1)/(y) ],
                   3608:          [ -x, 0, 0 ],
                   3609:          [ -x, (1/2)/(x), (-1/2)/(y) ]]];
                   3610:   /* tk_bess2.bess2Iv(1/2,[0.5,1.5]); */
                   3611:   Iv = [0.105994,-0.651603,-0.760628];
                   3612:   Dom=[[0.5,1.5],[1.5,9]];
                   3613:   Step = 0.5;
1.41      takayama 3614:   return tk_pfn.graph(Pf,Dom,Iv,Step | fit=1);
1.40      takayama 3615: }
                   3616:
                   3617:
                   3618: @end example
                   3619:
                   3620:
                   3621: @comment --- ChangeLog $B$r=q$/(B. $BF05!(B. $B%=!<%9%3!<%I$N0LCV(B. $BJQ99F|;~(B $B$J$I(B CVS$B%5!<%P$r8+$k$?$a(B
                   3622: @comment --- openxm $B$N30It$+$i$N4sM?$b=R$Y$k(B. Credit.
                   3623: @noindent
                   3624: ChangeLog
                   3625: @itemize @bullet
                   3626: @item $B$3$N4X?t$O(B 2010-08 $B$K:G=i$NHG$,=q$+$l$?(B.
                   3627: @item @code{OpenXM/src/asir-contrib/packages/src/tk_pfn.rr} 1.8
                   3628: @end itemize
                   3629:
1.41      takayama 3630: @node tk_rk.runge_kutta_4,,, $B<B83E*;EMM$N4X?t(B
                   3631: @subsection @code{tk_rk.runge_kutta_4}
                   3632: @findex tk_rk.runge_kutta_4
                   3633:
                   3634: @comment --- $B4X?t$N4JC1$J@bL@(B ---
                   3635: @comment --- @itemx $B$OJ#?t$KBP$7$F@bL@$r0l$D$D$1$k>l9g$K;H$&(B ---
                   3636: @table @t
                   3637: @item tk_rk.runge_kutta_4(@var{Eq},@var{X},@var{Y},@var{X0},@var{Y0},@var{Terminal},@var{Step})
                   3638: :: 4$B<!$N(B Runge-Kutta $BK!$K$h$kHyJ,J}Dx<0$N?tCM6a;w2r(B
                   3639: @end table
                   3640:
                   3641: @table @var
                   3642: @item return
                   3643: $B%j%9%H(B  $B%j%9%H$NMWAG$O0J2<$N7A<0(B [@var{X}$B$NCM(B,Y_1$B$NCM(B,Y_2$B$NCM(B, ...].
                   3644:  @var{X} $B$NCM$O8:$C$F$$$/(B. $B$h$C$F%j%9%H$N@hF,$,(B @var{Terminal} $BIU6a$G$N(B @var{Y} $B$NCM(B.
                   3645: @item Eq, X, Y, Step
                   3646: @var{Eq} $B$O(B $BJ}Dx<0$N1&JU(B. $B%j%9%H(B. Y[0]'=Eq[0], Y[1]'=Eq[1], ... $B$G$"$k(B.
                   3647: @var{X} $BFHN)JQ?tL>(B.
                   3648: @var{Y} $B%j%9%H(B. $B=>B0JQ?t$N%j%9%H(B.
                   3649: @var{Step} $B9o$_I}(B.
                   3650: @item X0, Y0, Terminal
                   3651: @var{X0} $B=PH/E@$N(B @var{X} $B$NCM(B.
                   3652: @var{Y0} $B=PH/E@$G$N(B @var{Y} $B$N=i4|CM(B.
                   3653: @var{Terminal} @var{X} $B$N=*CeE@(B.
                   3654: @end table
                   3655:
                   3656: @itemize @bullet
                   3657: @item taka_runge_kutta.rr $B$r(B import $B$7$F$*$/I,MW$,$"$k(B.
                   3658: @item $B$3$N4X?t$OO"N)>oHyJ,J}Dx<0(B Y[0]'=Eq[0], Y[1]'=Eq[1], ... $B$r?tCME*$K2r$/(B.
                   3659: @item $BNc$O%=!<%9%3!<%I(B (@code{OpenXM/lib/asir-contrib/src/taka_runge_kutta.rr} )$B$N(B
                   3660: @code{tk_rk.test4()} $B$r;2>H(B.
                   3661: @end itemize
                   3662:
                   3663: @example
                   3664: [1355] import("taka_runge_kutta.rr");
                   3665: [1590] tk_rk.test4();
                   3666:
                   3667: $B$3$3$G(B test4() $B$O0J2<$N$H$*$j(B. $B?6F0$NJ}Dx<0(B, y0'=y1, y1'=-y0 (y0''+y0=0). $BEz$O(B y0=cos(x)
                   3668: taka_plot_auto $B$O2<J}8~$G(B y $B$,@5(B.
                   3669:
                   3670: def test4() {
                   3671:   A=runge_kutta_4([y1,-y0],x,[y0,y1],0,[1,0],3.14*2,0.1);
                   3672:   taka_plot_auto(A);
                   3673:   return(A);
                   3674: }
                   3675:
                   3676: @end example
                   3677:
                   3678:
                   3679: @comment --- ChangeLog $B$r=q$/(B. $BF05!(B. $B%=!<%9%3!<%I$N0LCV(B. $BJQ99F|;~(B $B$J$I(B CVS$B%5!<%P$r8+$k$?$a(B
                   3680: @comment --- openxm $B$N30It$+$i$N4sM?$b=R$Y$k(B. Credit.
                   3681: @noindent
                   3682: ChangeLog
                   3683: @itemize @bullet
                   3684: @item $B$3$N4X?t$O(B 2000 $BG/Be$NA0H>$K:G=i$NHG$,=q$+$l$?(B. 2010$BG/(B Pfaffian $B$N?tCM2r@O$N0Y$K:FEY@0Hw(B
                   3685: @item @code{OpenXM/src/asir-contrib/packages/src/taka_runge_kutta.rr} 1.17
                   3686: @end itemize
                   3687:
                   3688: @node tk_rk.runge_kutta_4_linear,,, $B<B83E*;EMM$N4X?t(B
                   3689: @subsection @code{tk_rk.runge_kutta_4_linear}
                   3690: @findex tk_rk.runge_kutta_4_linear
                   3691:
                   3692: @comment --- $B4X?t$N4JC1$J@bL@(B ---
                   3693: @comment --- @itemx $B$OJ#?t$KBP$7$F@bL@$r0l$D$D$1$k>l9g$K;H$&(B ---
                   3694: @table @t
                   3695: @item tk_rk.runge_kutta_4_linear(@var{P},@var{X},@var{Y},@var{X0},@var{Y0},@var{Terminal},@var{Step})
                   3696: :: 4$B<!$N(B Runge-Kutta $BK!$K$h$kHyJ,J}Dx<0$N?tCM6a;w2r(B. $B@~7AJ}Dx<0@lMQ(B.
                   3697: @end table
                   3698:
                   3699: @table @var
                   3700: @item return
                   3701: $B%j%9%H(B  $B%j%9%H$NMWAG$O0J2<$N7A<0(B [@var{X}$B$NCM(B,Y_1$B$NCM(B,Y_2$B$NCM(B, ...].
                   3702:  @var{X} $B$NCM$O8:$C$F$$$/(B. $B$h$C$F%j%9%H$N@hF,$,(B @var{Terminal} $BIU6a$G$N(B @var{Y} $B$NCM(B.
                   3703: @item P, X, Y, Step
                   3704: @var{P} $B$O(B $BJ}Dx<0$N1&JU(B. $B%j%9%H(B. Y'=P Y $B$G$"$k(B. $B=>B0JQ?t(B @var{Y} $B$OITMW(B.
                   3705: @var{X} $BFHN)JQ?tL>(B.
                   3706: @var{Y} $B%j%9%H(B. $B=>B0JQ?t$N%j%9%H(B. $B=>B0JQ?t$O<+F0@8@.$5$l$k(B. $B;H$o$l$F$$$J$$$N$G6u%j%9%H$G$h$$(B.
                   3707: @var{Step} $B9o$_I}(B.
                   3708: @item X0, Y0, Terminal
                   3709: @var{X0} $B=PH/E@$N(B @var{X} $B$NCM(B.
                   3710: @var{Y0} $B=PH/E@$G$N(B @var{Y} $B$N=i4|CM(B.
                   3711: @var{Terminal} @var{X} $B$N=*CeE@(B.
                   3712: @end table
                   3713:
                   3714: @itemize @bullet
                   3715: @item taka_runge_kutta.rr $B$r(B import $B$7$F$*$/I,MW$,$"$k(B.
                   3716: @end itemize
                   3717:
                   3718: @example
                   3719: [1355] import("taka_runge_kutta.rr");
                   3720: [1590] A=tk_rk.runge_kutta_4_linear([[0,1],[-1,0]],x,[ ], 0, [1,0], 3.14*2, 0.1);
                   3721: [1591] taka_plot_auto(A);
                   3722:
                   3723: $B?6F0$NJ}Dx<0(B, y0'=y1, y1'=-y0 (y0''+y0=0). $BEz$O(B y0=cos(x) $B$r2r$$$F$$$k(B.
                   3724: taka_plot_auto $B$O2<J}8~$G(B y $B$,@5(B.
                   3725:
                   3726: @end example
                   3727:
                   3728:
                   3729: @comment --- ChangeLog $B$r=q$/(B. $BF05!(B. $B%=!<%9%3!<%I$N0LCV(B. $BJQ99F|;~(B $B$J$I(B CVS$B%5!<%P$r8+$k$?$a(B
                   3730: @comment --- openxm $B$N30It$+$i$N4sM?$b=R$Y$k(B. Credit.
                   3731: @noindent
                   3732: ChangeLog
                   3733: @itemize @bullet
                   3734: @item 2010$BG/(B Pfaffian $B$N?tCM2r@O$N0Y$K:F@0Hw(B.
                   3735: @item @code{OpenXM/src/asir-contrib/packages/src/taka_runge_kutta.rr} 1.17
                   3736: @end itemize
                   3737:
1.40      takayama 3738:
                   3739:
1.38      takayama 3740: @node fj_simp.simplify,,, $B<B83E*;EMM$N4X?t(B
                   3741: @subsection @code{fj_simp.simplify}
                   3742: @findex fj_simp.simplify
                   3743:
                   3744: @comment --- $B4X?t$N4JC1$J@bL@(B ---
                   3745: @comment --- @itemx $B$OJ#?t$KBP$7$F@bL@$r0l$D$D$1$k>l9g$K;H$&(B ---
                   3746: @table @t
                   3747: @item fj_simp.simplify(@var{arg1})
                   3748: :: arg1 $B$r4JC12=$9$k(B.
                   3749: @end table
                   3750:
                   3751: @table @var
                   3752: @item return
                   3753: $BB?9`<0(B, $BM-M}<0(B $B$^$?$O(B quote
                   3754: @item arg1
                   3755: $BB?9`<0(B $B$^$?$O(B $BM-M}<0(B
                   3756: @end table
                   3757:
                   3758: @itemize @bullet
                   3759: @item
                   3760: $B8=:_$N%P!<%8%g%s$G$O(B fj_simp.simplify $B$G$J$/(B, $BC1$K(B simplify $B$H$h$V(B.
                   3761: @item
                   3762: $B$3$N4X?t$O(B
                   3763: Joel S. Cohen, Computer Algebra and Symbolic Computation,
                   3764: http://web.cs.du.edu/~jscohen/MathematicalMethods/index.htm
                   3765: $B$K5-=R$5$l$F$$$k(B Automatic simplification algorithm $B$H(B
                   3766: B.F.Caviness, R.J.Fateman, Simplification of Radical Expressions (1976)
                   3767: $B$K5-=R$5$l$F$$$k(B radcan $B%"%k%4%j%:%`$N<BAu$G$"$k(B.
                   3768: @item
                   3769: $BJ#AGB?CM4X?t$H$7$F$O(B (x*y)^a = x^a*x^b $B$O0lHL$K$O@.N)$7$J$$$N$G(B, $B7k2L$rJ#AG4X?t$K;H$&$H$-$O(B
                   3770: $BCm0U$,I,MW$G$"$k(B. (x^a = exp(a*log(x)) $B$J$N$G(B)
                   3771: @end itemize
                   3772:
                   3773: @example
                   3774: load("fj_simplify.rr");
                   3775: [1434] simplify((x^(1/2))^3);
                   3776: ((x)^(3/2))
                   3777: [1435] simplify((2^(1/2))^2);
                   3778: 2
                   3779: [1436] simplify((2+2^(1/2))^3);
                   3780: 14*((2)^(1/2))+20
                   3781: [1437] simplify(exp(x)*exp(-x+y));
                   3782: ((@@e)^(y))
                   3783: @end example
                   3784:
                   3785: @table @t
                   3786: @item $B;2>H(B
                   3787: @ref{quote}
                   3788: @end table
                   3789:
                   3790: @noindent
                   3791: ChangeLog
                   3792: @itemize @bullet
                   3793: @item
                   3794: $B>-MhE*$K$O(B module $B2=$7$F(B fj_simp module $B$K4^$a$kM=Dj(B.
                   3795: poly_simplify $B$+$i(B fj_simp.simplify $B$r8F$V(B.
                   3796: @item
                   3797: Todo: exp $B0J30$NFC<l4X?t$K$D$$$F$N(Bsimplification $B$N5!G=(B.
                   3798: @item
                   3799: $B$3$N4X?t$O(B 2010.01 $B$K(B M.Fujimoto $B$K$h$j:G=i$NHG$,=q$+$l$?(B.
                   3800: OpenXM/src/asir-contrib/packages/src/fj_simplify.rr
                   3801: @end itemize
                   3802:
1.46      takayama 3803: @node tk_jack.zonal,,, $B<B83E*;EMM$N4X?t(B
                   3804: @subsection @code{tk_jack.zonal}
                   3805: @findex tk_jack.zonal
                   3806:
                   3807: @comment --- $B4X?t$N4JC1$J@bL@(B ---
                   3808: @comment --- @itemx $B$OJ#?t$KBP$7$F@bL@$r0l$D$D$1$k>l9g$K;H$&(B ---
                   3809: @table @t
                   3810: @item tk_jack.zonel(@var{p},@var{n})
                   3811: :: $BJ,3d(B p $B$KBP$9$k(B n $BJQ?t$N(B zonal $BB?9`<0$r=PNO$9$k(B.
                   3812: @end table
                   3813:
                   3814: @table @var
                   3815: @item return
                   3816: $BB?9`<0(B. x_1, x_2, ... $B$,JQ?t(B.
                   3817: @item p
                   3818: $B?t$N%j%9%H(B. p=[p0,p1,...] $B$N;~(B p0>=p1>=...>0.
                   3819: @item n
                   3820: $B<+A3?t(B
                   3821: @end table
                   3822:
                   3823: @itemize @bullet
                   3824: @item
                   3825: $B$3$N4X?t$O(B
                   3826: Koev-Edelman $B$K$h$k(B Pieri $B7?8x<0$rMQ$$$?(B Jack symmetric function $B$N7W;;(B
                   3827: $B%"%k%4%j%:%`$N<BAu$G$"$k(B.
                   3828: $B>\$7$/$O(B Wikipedia $B1Q8lHG(B Jack symmetric function $B$N9`$r;2>H(B.
                   3829: @item zonal(P,N) = jack(P,N,2) $B$G$"$k(B.
                   3830: @end itemize
                   3831:
                   3832: @example
                   3833: load("tk_jack.rr");
                   3834: [1434] tk_jack.zonal([3,2,1],3);
                   3835: (112*x_3*x_2^2+112*x_3^2*x_2)*x_1^3+(112*x_3*x_2^3+168*x_3^2*x_2^2+112*x_3^3*x_2)*x_1^2+(112*x_3^2*x_2^3+112*x_3^3*x_2^2)*x_1
                   3836: [1435] tk_jack.zonal([1,1],3);
                   3837: (2*x_2+2*x_3)*x_1+2*x_3*x_2
                   3838: [1436]  tk_jack.jack([1,1],3,2);
                   3839: (2*x_2+2*x_3)*x_1+2*x_3*x_2
                   3840: @end example
                   3841:
                   3842: @table @t
                   3843: @item $B;2>H(B
                   3844: @end table
                   3845:
                   3846: @noindent
                   3847: ChangeLog
                   3848: @itemize @bullet
                   3849: @item
                   3850: $B$3$N4X?t$O(B wishart $BJ,I[$K=>$&BP>N9TNs$NBh0l8GM-CM$,(B x $B0J2<$G$"$k3NN($N7W;;$r(B
                   3851: holonomic gradient method $B$G$d$k$?$a$K$=$N=i4|CM$r7W;;$9$k(B C $B$N%W%m%0%i%`$,(B
                   3852: $BI,MW$G$"$C$?(B. $B$=$l$r(B debug $B$9$k$?$a$K$H$j$"$($:=q$$$?$b$N(B.
                   3853: @item $B:GE,2=$r$^$@$^$@$5$\$C$F$k(B.
                   3854: @end itemize
                   3855:
1.49      takayama 3856: @node ot_hgm_ahg.cbase,,, $B<B83E*;EMM$N4X?t(B
                   3857: @subsection @code{ot_hgm_ahg.cbase}
                   3858: @findex ot_hgm_ahg.cbase
                   3859:
                   3860: @table @t
                   3861: @item cbase(@var{A})
                   3862: ::  @var{A} $B$GDj5A$5$l$k(B A-$BD64v2?J}Dx<07O$N(B Pfaffian $B$N4pDl$r5a$a$k(B.
                   3863: @end table
                   3864:
                   3865: @table @var
                   3866: @item return
                   3867: Pfaffian$B$N4pDl(B($BHyJ,:nMQAG$N%b%N%_%"%k(B)$B$N%j%9%H(B
                   3868: @item A
                   3869: $B@0?t$r@.J,$H$9$k9TNs(B (maximal rank $B$N$b$N(B)$B$rI=$9%j%9%H(B
                   3870: @end table
                   3871:
                   3872: @itemize @bullet
                   3873: @item A-$BD64v2?%$%G%"%k$N(B Q(x)[dx] $B$K$*$1$kI8=`4pDl$O(B Pfaffian $B$N4pDl$H$J$k$,(B, $B5U$O$+$J$i$:$7$b??$G$O$J$$(B.  $B8D?t$O$b$A$m$sF1$8$G$"$k(B.
                   3874: @item
                   3875: $B%"%k%4%j%:%`$O(B
                   3876: T.Hibi, K.Nishiyama, N.Takayama, Pfaffian Systems of A-Hypergeometric Equations I, Bases of Twisted Cohomology Groups, arxiv:1212.6103
                   3877: $B$K$h$k(B.
                   3878: $B$5$i$K%Q%i%a!<%?(B b $B$r?t$KFC<l2=$9$k3NN(;;K!$rMQ$$$F$$$k(B.
                   3879: @end itemize
                   3880:
                   3881: @example
                   3882: [2190] import("ot_hgm_ahg.rr");
                   3883: 1
                   3884: [2191] ot_hgm_ahg.cbase([[1,1,1,1],[0,1,2,3]]);
                   3885: We use a probabilistic algorithm to determine the base.[dx2^2,dx3*dx2,dx3^2]
                   3886:
                   3887: [dx3,dx4,1]
                   3888: @end example
                   3889:
                   3890: @table @t
                   3891: @item $B;2>H(B
                   3892: @ref{get_mat2}
                   3893: @end table
                   3894:
                   3895: @noindent
                   3896: ChangeLog
                   3897: @itemize @bullet
                   3898: @item
                   3899: $B$3$N4X?t$O(B 2012  $B$+$i(B 2014-$B=U5Y$_$K$+$1$F$+$+$l$?(B.
                   3900: @item version 1.1 $B0JA0$NHG$O(B h-mle/A-hg/Prog  ($B8&5f%0%k!<%W$N6&M-%U%)%k%@(B) $B$K$"$j(B.
                   3901: @end itemize
                   3902:
                   3903: @node ot_hgm_ahg.get_mat2,,, $B<B83E*;EMM$N4X?t(B
                   3904: @subsection @code{ot_hgm_ahg.get_mat2}
                   3905: @findex ot_hgm_ahg.get_mat2
                   3906: @comment get_mat2
                   3907: @table @t
                   3908: @item get_mat2(@var{A},@var{W},@var{Std},@var{Mset})
                   3909: ::  @var{A} $B$GDj5A$5$l$k(B A-$BD64v2?J}Dx<07O(B H_A $B$N(B Pfaffian $B$N4pDl$r5a$a$k$?$a$N(B Sylvester $BK!(B $B$rE,MQ$9$k$?$a$N9TNs$r@8@.$9$k(B.
                   3910: @end table
                   3911:
                   3912: @table @var
                   3913: @item return
                   3914: $B%j%9%H(B
                   3915: @item A
                   3916: $B@0?t$r@.J,$H$9$k9TNs(B (maximal rank $B$N$b$N(B)$B$rI=$9%j%9%H(B
                   3917: @item W
                   3918: $B%j%9%H(B. toric ideal $B$N%0%l%V%J!<4pDl$r7W;;$9$k$?$a$N(B weight vector.
                   3919: $BB?J,$J$s$G$b$$$$$O$:(B.
                   3920: @item Std
                   3921: $B%j%9%H(B. Pfaffian $B$N4pDl(B.  cbase(A) $B$N=PNO$rMQ$$$k(B.
                   3922: @item Mset
                   3923: Sylvester $B7?9TNs$r:n$k$?$a$NHyJ,:nMQAG$N%b%N%_%"%k$N%j%9%H(B.
                   3924: @end table
                   3925:
                   3926: @itemize @bullet
                   3927: @item $B=PNO$r(B @var{P} $B$KBeF~$9$k$H(B,
                   3928: @var{P}[0]*@var{P}[2] - @var{P}[1]*@var{Std} $B$,(B modulo  H_A $B$G(B 0 $B$H$J$k(B.
                   3929: @var{P}[0] $B$H(B @var{P}[2] $B$r7k9g$7$?9TNs$,(B, sylvester $B9TNs(B ($BO@J8$N5-9f$G$N(B F').
                   3930: @var{P}[2], @var{Std} $B$,(B index $B%b%N%_%"%k$G$"$k(B.
                   3931: $BO@J8$G$N5-9f$G$O(B @var{P}[2] $B$O(B M_t,  @var{Std} $B$O(B S.
                   3932: @item
                   3933: $B%"%k%4%j%:%`$O(B
                   3934: K.Ohara, N.Takayama, Pfaffian Systems of A-Hypergeometric Equations II, Holonomic Gradient Method
                   3935: $B$K$h$k(B.  $BO@J8$N9TNs(B F'.
                   3936: @end itemize
                   3937:
                   3938: @example
                   3939: [2190] import("ot_hgm_ahg.rr");
                   3940: 1
                   3941: [2191] A=[[1,1,1,1],[0,1,2,3]]$
                   3942: Std=ot_hgm_ahg.cbase(A)$
                   3943: W=[[dx1,1,dx2,1,dx3,1,dx4,1]]$
                   3944: Mset=[1,dx1,dx2,dx3,dx4]$
                   3945: [2192] ot_hgm_ahg.get_mat2(A,W,Std,Mset);
                   3946:
                   3947: $B>JN,(B
                   3948: @end example
                   3949:
                   3950: @table @t
                   3951: @item $B;2>H(B
                   3952: @ref{cbase}
                   3953: @end table
                   3954:
                   3955: @noindent
                   3956: ChangeLog
                   3957: @itemize @bullet
                   3958: @item
                   3959: $B$3$N4X?t$O(B 2012  $B$+$i(B 2014-$B=U5Y$_$K$+$1$F$+$+$l$?(B.
                   3960: @item version 1.1 $B0JA0$NHG$O(B h-mle/A-hg/Prog  ($B8&5f%0%k!<%W$N6&M-%U%)%k%@(B) $B$K$"$j(B.
                   3961: @item
                   3962: $B%=!<%9(B ot_hgm_ahg.rr $B$N(B test3(), test3b(), test4(), test5(), test6(), test6c() $BEy$KMxMQNc$,$"$k(B.
                   3963: @item
                   3964: test3b() $B$G(B @var{Mset} $B$r0l<!<0A4It$K$7$?$b$N$,(B, $BO@J8$NNc(B.
                   3965: @end itemize
                   3966:
                   3967: @comment -------------------
                   3968: @comment  hgm_ahg_contiguity
                   3969: @comment -------------------
                   3970: @node ot_hgm_ahg.hgm_ahg_contiguity,,, $B<B83E*;EMM$N4X?t(B
                   3971: @subsection @code{ot_hgm_ahg.hgm_ahg_contiguity}
                   3972: @findex ot_hgm_ahg.hgm_ahg_contiguity
                   3973:
                   3974: @table @t
                   3975: @item hgm_ahg_contiguity(@var{A},@var{StdMon},@var{Line},@var{X0},@var{InitVal},@var{Start},@var{End})
                   3976: ::  @var{A} $B$GDj5A$5$l$k(B A-$BD64v2?J}Dx<07O$N(Bcontiguity relation
                   3977: $B$r(B Sylvester matrix $B$rMQ$$$F7W;;$7(B, $B$=$l$rMQ$$$FD64v2?4X?t$NCM$r5a$a$k(B.
                   3978: @end table
                   3979:
                   3980: @table @var
                   3981: @item return
                   3982: $B4pDl$rD64v2?4X?t$K:nMQ$5$;$?%Y%/%H%k$NCM(B F(End;X0) ??
                   3983: @item A
                   3984: $B@0?t$r@.J,$H$9$k9TNs(B (maximal rank $B$N$b$N(B)$B$rI=$9%j%9%H(B.
                   3985: @item StdMon
                   3986: $B%j%9%H(B.  Pfaffian $B$N4pDl$rM?$($kHyJ,:nMQAG$N%b%N%_%"%k$N%j%9%H(B.
                   3987: @item Line
                   3988: $B%j%9%H(B  [ContiDir,Beta,Z].
                   3989: @item X0
                   3990: $B%j%9%H(B. x $BJQ?t$NCM(B.
                   3991: @item InitVal
                   3992: $B%j%9%H(B. $B4pDl$rD64v2?4X?t$K:nMQ$5$;$?%Y%/%H%k$N=i4|CM(B F(Start;X0)
                   3993: @item Start
                   3994: $B%j%9%H(B.   Z $B%Q%i%a!<%?$N=i4|CM(B??
                   3995: @item End
                   3996: $B%j%9%H(B.   Z $B%Q%i%a!<%?$N=*C<CM(B??
                   3997: @end table
                   3998:
                   3999: @itemize @bullet
                   4000: @item Todo, $B$3$N4X?t$N%$%s%?%U%'!<%9$OJQ99$5$l$kM=Dj(B.
                   4001: @item  X0 $B$OM-M}?t$N%j%9%H(B.
                   4002: @item ContiDir $B$O(B End-Start $B$HF1$8J}8~(B.
                   4003: @item Beta.  A$BD64v2?4X?t$N(B B $B%Q%i%a!<%?$N=i4|CM(B ??
                   4004: @item Z.  ContiDir $B$G$N0l<!85(B contiguity $B$rI=8=$9$k$?$a$NITDj85$NL>A0(B.
                   4005: @item $B%=!<%9Cf$NMxMQNc(B. test_fd_conti(), test_c111_conti()
                   4006: @item
                   4007: $B%"%k%4%j%:%`$*$h$SMxE@$O(B
                   4008: K.Ohara, N.Takayama, Pfaffian Systems of A-Hypergeometric Equations II, Holonomic Gradient Method
                   4009: $B;2>H(B.
                   4010: @end itemize
                   4011:
                   4012: @example
                   4013: [2190] import("ot_hgm_ahg.rr");
                   4014: 1
                   4015: [2191] ot_hgm_ahg.test_fd_conti();
                   4016: (Todo, $B0z?t$,$I$&$J$k$+$NNc$r2C$($k(B.)
                   4017: @end example
                   4018:
                   4019: @table @t
                   4020: @item $B;2>H(B
                   4021: @ref{get_mat2}
                   4022: @ref{hgm_ahg_expected_value_contiguity}
                   4023: @ref{hgm_ahg}
                   4024: @end table
                   4025:
                   4026: @noindent
                   4027: ChangeLog
                   4028: @itemize @bullet
                   4029: @item
                   4030: $B$3$N4X?t$O(B 2014-07-11 $B$K:G=i$NHG$,(B 1.10$BHG(B ot_hgm_ahg.rr $B$K(B commit $B$5$l$?(B.
                   4031: @item $B%$%s%?%U%'!<%9$,99?7$5$l$?HG$O(B, 1.??$BHG(B.
                   4032: @end itemize
                   4033:
                   4034: @comment -------------------
                   4035: @comment  tk_hgpoly.optip
                   4036: @comment -------------------
                   4037: @node tk_hgpoly.optip,,, $B<B83E*;EMM$N4X?t(B
                   4038: @subsection @code{tk_hgpoly.optip}
                   4039: @findex tk_hgpoly.optip
                   4040:
                   4041: @table @t
                   4042: @item hgpoly.optip(@var{A},@var{B},@var{W})
                   4043: ::  $B@0?t7W2hLdBj$r%0%l%V%J!<4pDl$rMQ$$$F2r$/(B.
                   4044: @end table
                   4045:
                   4046: @table @var
                   4047: @item return
                   4048: $B%j%9%H(B.
                   4049: @item A
                   4050: $BHsIi@0?t$r@.J,$H$9$k9TNs(B (maximal rank $B$N$b$N(B)$B$rI=$9%j%9%H(B
                   4051: @item B
                   4052: $BHsIi@0?t$r@.J,$H$9$k%Y%/%H%k$rI=$9%j%9%H(B
                   4053: @item W
                   4054: $BHsIi@0?t$r@.J,$H$9$k%Y%/%H%k$rI=$9%j%9%H(B
                   4055: @end table
                   4056:
                   4057: @itemize @bullet
                   4058: @item  @var{A} U = @var{B} $B$rK~$?$9HsIi$N@0?t%Y%/%H%k(B U $B$NCf$G(B,
                   4059: $BFb@Q(B @var{W} U $B$r:G>.2=$9$k(B U $B$rLa$9(B.
                   4060: @end itemize
                   4061:
                   4062: @example
                   4063: [0] import("tk_hgpoly.rr");
                   4064: [2191] tk_hgpoly.optip([[1,1,1,1],[0,1,2,3]],[20,40],[1,1,1,0]);
                   4065: [6,1,0,13]
                   4066: @end example
                   4067:
                   4068: @table @t
                   4069: @item $B;2>H(B
                   4070: @ref{feasible}
                   4071: @end table
                   4072:
                   4073: @noindent
                   4074: ChangeLog
                   4075: @itemize @bullet
                   4076: @item
                   4077: $B$3$N4X?t$O(B   2014-12-12 $B$K(B commit $B$5$l$?(B.
                   4078: $B85HG$O(B h-mle/A-hg/Prog
                   4079: @end itemize
                   4080:
                   4081: @comment -------------------
                   4082: @comment  tk_hgpoly.hgpoly
                   4083: @comment -------------------
                   4084: @node tk_hgpoly.hgpoly,,, $B<B83E*;EMM$N4X?t(B
                   4085: @subsection @code{tk_hgpoly.hgpoly}
                   4086: @findex tk_hgpoly.hgpoly
                   4087: @table @t
                   4088: @item hgpoly.hgpoly(@var{A},@var{B})
                   4089: ::  @var{A}, @var{B} $B$GDj5A$5$l$kD64v2?B?9`<0$r7W;;$9$k(B.
                   4090: @end table
                   4091:
                   4092: @table @var
                   4093: @item return
                   4094: $B%j%9%H(B.
                   4095: @item A
                   4096: $BHsIi@0?t(B(todo, $B:FEY3NG'(B)$B$r@.J,$H$9$k9TNs(B (maximal rank $B$N$b$N(B)$B$rI=$9%j%9%H(B
                   4097: @item B
                   4098: $BHsIi@0?t$r@.J,$H$9$k%j%9%H(B.
                   4099: @end table
                   4100:
                   4101: @itemize @bullet
                   4102: @item  $BLa$jCM$r(B F $B$H$9$k$H$-(B, F[0] $B$,D64v2?B?9`<0(B. $BJQ?t$O(B x_1, x_2, ...
                   4103: F[1] $B$O(B F[0] $B$NJ,;6I=8=B?9`<0(B.
                   4104: @end itemize
                   4105:
                   4106: @example
                   4107: [0] import("tk_hgpoly.rr");
                   4108: [2191] tk_hgpoly.hgpoly([[1,1,1,1],[0,1,2,3]],[2,2]);
                   4109: [x_3*x_1+1/2*x_2^2,(1/2)*<<0,2,0,0>>+(1)*<<1,0,1,0>>]
                   4110: @end example
                   4111:
                   4112:
                   4113: @noindent
                   4114: ChangeLog
                   4115: @itemize @bullet
                   4116: @item
                   4117: $B$3$N4X?t$O(B   2014-12-12 $B$K(B commit $B$5$l$?(B.
                   4118: @end itemize
                   4119:
                   4120: @comment -------------------
                   4121: @comment  tk_fd.abc2ahg
                   4122: @comment -------------------
                   4123: @node tk_fd.abc2ahg,,, $B<B83E*;EMM$N4X?t(B
                   4124: @subsection @code{tk_fd.abc2ahg}
                   4125: @findex tk_fd.abc2ahg
                   4126: @table @t
                   4127: @item tk_fd.abc2ahg(@var{A},@var{B},@var{C})
                   4128: ::  F_D(@var{A}, @var{B},@var{C}) $B$r2r$K$b$D(B A-$BD64v2?J}Dx<07O$r5a$a$k(B.
                   4129: @end table
                   4130:
                   4131: @table @var
                   4132: @item return
                   4133: $B%j%9%H(B.
                   4134: @item A
                   4135: $B?t(B
                   4136: @item B
                   4137: $B?t$N%j%9%H(B
                   4138: @item C
                   4139: $B?t(B
                   4140: @end table
                   4141:
                   4142: @itemize @bullet
                   4143: @item $BLa$jCM%j%9%H$NBh#0@.J,$O(B A-$BD64v2?J}Dx<07O$rDj5A$9$k9TNs(B.
                   4144: $BBh#1@.J,$O(BA-$BD64v2?J}Dx<07O$N%Q%i%a!<%?&B(B.
                   4145: @end itemize
                   4146:
                   4147: @example
                   4148: [2191] tk_fd.abc2ahg(-3,[-4,-5],3);
                   4149:
                   4150: [[[0,0,0,1,1,1],[1,0,0,1,0,0],[0,1,0,0,1,0],[0,0,1,0,0,1]],[11,5,4,5]]
                   4151: @end example
                   4152:
                   4153: @table @t
                   4154: @item $B;2>H(B
                   4155: @ref{abc2marginal}
                   4156: @ref{marginal2abc}
                   4157: @end table
                   4158:
                   4159: @noindent
                   4160: ChangeLog
                   4161: @itemize @bullet
                   4162: @item
                   4163: $B$3$N4X?t$O(B   2014-12-13 $B$K(B tk_fd.rr $B$KDI2C$5$l$?(B.
                   4164: @end itemize
                   4165:
                   4166: @comment -------------------
                   4167: @comment  tk_fd.ahvec_abc
                   4168: @comment -------------------
                   4169: @node tk_fd.ahvec_abc,,, $B<B83E*;EMM$N4X?t(B
                   4170: @subsection @code{tk_fd.ahvec_abc}
                   4171: @findex tk_fd.ahvec_abc
                   4172: @table @t
                   4173: @item tk_fd.ahvec_abc(@var{A},@var{B},@var{C},@var{Y} | all=1)
                   4174: ::   abc2marginal(@var{A}, @var{B},@var{C})  $B$r<~JUOB$K$b$D(B (2,m+1) $BJ,3dI=A4BN$K$D$$$F$N@55,2=Dj?t(B Z, $B$*$h$S(B Z $B$NJQ?t(B Y[1][0], ..., Y[1][m]
                   4175: (2$BHVL\$N9T(B)$B$K$D$$$F$NJPHyJ,$r7W;;$9$k(B.
                   4176: @end table
                   4177:
                   4178: @table @var
                   4179: @item return
                   4180: $B%j%9%H(B @var{Ans}
                   4181: @item A
                   4182: $B?t(B
                   4183: @item B
                   4184: $B?t$N%j%9%H(B. $BD9$5$O(B m.
                   4185: @item C
                   4186: $B?t(B
                   4187: @item Y
                   4188: (2,m+1) $BJQ?tCM$r$"$i$o$9%j%9%H$N%j%9%H(B.
                   4189: @end table
                   4190:
                   4191: @itemize @bullet
                   4192: @item
                   4193: @var{A}, @var{B}, @var{C}, $B$K8=$l$k?t$O@0?t$rM?$($k(B.
                   4194: @var{Y} $B$N@.J,$OM-M}?t$rM?$($k(B.
                   4195: @item
                   4196: @var{Ans}[2]*@var{Ans}[1] $B$,(B Z.
                   4197: @var{Ans}[2]*@var{Ans}[0][I] $B$,(B Z $B$N(B Y[1][I] $B$K$D$$$F$NJPHyJ,(B.
                   4198: @item
                   4199: $BO@J8(B
                   4200: 1.Y.Goto, Contiguity relations of Lauricella's F_D revisited,  arxiv:1412.3256
                   4201: $B$GF3=P$5$l$F$$$k(B
                   4202: contiguity relation $B$rMQ$$$F7W;;$9$k(B.
                   4203: @end itemize
                   4204:
                   4205: @example
                   4206: [2449] marginal2abc([3,12],[6,3,3,3]);
                   4207: [-3,[-3,-3,-3],4]
                   4208:
                   4209: [2450] tk_fd.ahvec_abc(-3,[-3,-3,-3],4,[[1,1/2,1/3,1/4],[1,1,1,1]]);
                   4210: [[ 24041/1152 143551/11520 16973/1280 78827/5760 ],1/7776]
                   4211:
                   4212: [2451] expectation_abc(-3,[-3,-3,-3],4,[[1,1/2,1/3,1/4],[1,1,1,1]]);
                   4213: [721230/173593,430653/173593,458271/173593,67566/24799]
                   4214: @end example
                   4215:
                   4216: @table @t
                   4217: @item $B;2>H(B
                   4218: @ref{expectation_abc}
                   4219: @end table
                   4220:
                   4221: @noindent
                   4222: ChangeLog
                   4223: @itemize @bullet
                   4224: @item
                   4225: $B$3$N4X?t$O(B   2014-$B2F$K3+H/$5$l$?(B.
                   4226: @end itemize
                   4227:
                   4228:
1.50      takayama 4229: @node pari,,, $B<B83E*;EMM$N4X?t(B
                   4230: @subsection @code{pari}, @code{setbprec},@code{setround},@code{todouble},@code{mpfr_gamma},@code{mpfr_floor},@code{mpfr_round},
                   4231: @findex pari
                   4232: @findex setbprec
                   4233: @findex setround
                   4234: @findex todouble
                   4235: @findex mpfr_gamma
                   4236: @findex mpfr_floor
                   4237: @findex mpfr_round
                   4238:
                   4239: @comment --- $B4X?t$N4JC1$J@bL@(B ---
                   4240: @comment --- @itemx $B$OJ#?t$KBP$7$F@bL@$r0l$D$D$1$k>l9g$K;H$&(B ---
                   4241: @table @t
                   4242: @item pari(@var{arg1},@var{arg2},...)
                   4243: ::  MPFR $B$G(B pari $B$N4X?t$r(B emulate $B$9$k$+(B ox_pari $B%5!<%P!<$r8F$S=P$9(B.
                   4244: @itemx setbprec(@var{arg1})
                   4245: @itemx setround(@var{arg1})
                   4246:    $B4]$a$NJ}K!$N;XDj(B. mpfr $B=`5r(B.
                   4247: @itemx todouble(@var{arg1})
                   4248: :: bigfloat $B7?$r(B double $B$KJQ49$9$k(B.
                   4249: @itemx mpfr_gamma(@var{arg1})
                   4250: :: gamma $B4X?t$N7W;;(B.
                   4251: @itemx mpfr_floor(@var{arg1})
                   4252: ::  floor $B$N7W;;(B.
                   4253: @itemx mpfr_round(@var{arg1})
                   4254: :: $B4]$a$N7W;;(B.
                   4255: @end table
                   4256:
                   4257: @table @var
                   4258: @item return
                   4259: $B8e=R(B.
                   4260: @item arg1, arg2
                   4261: $B8e=R(B.
                   4262: @end table
                   4263:
                   4264: @itemize @bullet
                   4265: @item 20150807 $B0J9_$N(B asir $B$G$O(B, bigfloat $B$,(B pari $B$G$O$J$/(B mpfr $B$rMQ$$$F7W;;$5$l$k(B.
                   4266: Todo, pari $B$O(B ox_pari $B$r8F$S=P$9$,(B, $B$^$@(B ox_pari $B$KL$<BAu$N5!G=$,B?$/$"$k(B.
                   4267: $B6h4V1i;;$X$NBP1~$O9T$C$F$$$J$$(B.
                   4268: @item
                   4269: pari(floor,@var{arg1}),
                   4270: pari(round,@var{arg1}),
                   4271: pari(gamma,@var{arg1})
                   4272: $B$O(B mpfr $B$G(B pari $B$r(B emulate $B$7$F$$$k$N$G(B, $BF0:n$,0[$J$k(B.
                   4273: $BFC$K(B gamma $B$OJ#AG?t$N0z?t$r<u$1<h$i$J$$(B.
                   4274: pari $B$N(B floor $B$O7e?t$,B-$j$J$/$J$k$H%(%i!<$G=*N;$7$?$,(B,
                   4275: $B$3$N(B floor $B$G$O(B setprec $B$G;XDj$7$?7e?t0JFb$J$i@5$7$/(B floor $B$rLa$9(B.
                   4276: Todo, ox_pari  $B$r;XDj$7$F8F$S=P$9J}K!(B.
                   4277: @end itemize
                   4278:
                   4279: @example
                   4280: [219] ctrl("bigfloat",1)$
                   4281: [220] setprec(100)$
                   4282: [221] pari(floor,1111111111111.1+1/10);
                   4283: 1111111111111
                   4284: @end example
                   4285:
                   4286: @table @t
                   4287: @item $B;2>H(B
                   4288: @ref{pari}
                   4289: @end table
                   4290:
                   4291: @comment --- ChangeLog $B$r=q$/(B. $BF05!(B. $B%=!<%9%3!<%I$N0LCV(B. $BJQ99F|;~(B $B$J$I(B CVS$B%5!<%P$r8+$k$?$a(B
                   4292: @comment --- openxm $B$N30It$+$i$N4sM?$b=R$Y$k(B. Credit.
                   4293: @noindent
                   4294: ChangeLog
                   4295: @itemize @bullet
                   4296: @item $B$3$l$i$NBgJQ99$O(B 2015-08-03 $B$h$j(B 08-07 $B$N(B asir $B9g=I$G$*$3$J$o$l$?(B.
                   4297: $B$^$@:n6HCf(B.  Todo, asirgui $B$X$NBP1~(B. debug, ...
                   4298: @item $BJQ99$r$&$1$?%=!<%9%3!<%I$O(B asir2000/builtin/bfaux.c,
                   4299: asir2000/engine/bf.c, asir2000/builtin/parif.c $BEyB??t(B.
                   4300: @end itemize
                   4301:
1.19      takayama 4302: @comment ****************************************************************
1.34      ohara    4303: @comment --- $B"~"~"~"~(B  $B0J2<B>$N4X?t$K$D$$$F??;w$7$F5-=R$9$k(B. $B"~"~"~"~(B
1.3       takayama 4304: @comment $B?7$7$$4X?t$N@bL@$r=q$/$?$a$N%F%s%W%l!<%H$G$"$k(B. $B>C$9$J(B.
1.34      ohara    4305: @comment --- $B"~"~"~"~(B  $B4X?t(B syz_pqr, xyz_stu $B$N@bL@(B $B"~"~"~"~(B
1.4       takayama 4306: @comment --- $BJ#?t$N4X?t$r$^$H$a$F@bL@$9$kNc(B ---
                   4307: @node xyz_pqr,,, $B<B83E*;EMM$N4X?t(B
                   4308: @subsection @code{xyz_pqr}, @code{syz_stu}
                   4309: @findex xyz_pqr
                   4310: @findex xyz_stu
                   4311:
1.3       takayama 4312: @comment --- $B4X?t$N4JC1$J@bL@(B ---
                   4313: @comment --- @itemx $B$OJ#?t$KBP$7$F@bL@$r0l$D$D$1$k>l9g$K;H$&(B ---
                   4314: @table @t
1.1       takayama 4315: @item xyz_pqr(@var{arg1},@var{arg2}[,@var{flag}])
                   4316: @itemx xyz_stu(@var{arg1},@var{arg2})
                   4317: :: xyz $B$K4X$9$kA`:n(B.
                   4318: @end table
                   4319:
                   4320: @table @var
                   4321: @item return
                   4322: $B@0?t(B
                   4323: @item arg1, arg2
                   4324: $B@0?t(B
                   4325: @item flag
                   4326: 0 $B$^$?$O(B 1
                   4327: @end table
                   4328:
                   4329: @itemize @bullet
1.3       takayama 4330: @item $B$3$N9`L\$O?7$7$$4X?t$N@bL@$r=q$/$?$a$N%F%s%W%l!<%H$G$"$k(B. $B>C$9$J(B.
1.1       takayama 4331: @item
                   4332: @code{xyz_pqr()} $B$O(B, @var{arg1}, @var{arg2} $B$r(B pqr $B$9$k(B.
                   4333: @item
                   4334: @var{flag} $B$,(B 0 $B$G$J$$$H$-(B, $B%b%8%e%i7W;;$r9T$&(B.
                   4335: @item
                   4336: @code{xyz_stu()} $B$O(B stu $B%"%k%4%j%:%`$rMQ$$$k(B.
                   4337: @end itemize
                   4338:
                   4339: @example
                   4340: [219] xyz_pqr(1,2);
                   4341: 3
                   4342: [220] xyz_pqr(1,2,1);
                   4343: 3
                   4344: 0
                   4345: [221] xyz_stu(1,2);
                   4346: 3
                   4347: @end example
                   4348:
                   4349: @table @t
                   4350: @item $B;2>H(B
                   4351: @ref{xyz_abc}
                   4352: @end table
                   4353:
1.3       takayama 4354: @comment --- ChangeLog $B$r=q$/(B. $BF05!(B. $B%=!<%9%3!<%I$N0LCV(B. $BJQ99F|;~(B $B$J$I(B CVS$B%5!<%P$r8+$k$?$a(B
                   4355: @comment --- openxm $B$N30It$+$i$N4sM?$b=R$Y$k(B. Credit.
1.1       takayama 4356: @noindent
                   4357: ChangeLog
                   4358: @itemize @bullet
                   4359: @item $B$3$N4X?t$O(B 2004-3-1 $B$+$i(B 2004-3-14 $B$K$+$1$F(B $B%"%k%4%j%:%`(B xyz ($BO@J8(B
                   4360:  http://www.afo.org/xyz.pdf ) $B$rMQ$$$F=q$-D>$5$l$?(B.
                   4361:  $BJQ99$r$&$1$?%=!<%9%3!<%I$O(B xxxyy.rr, ppp.c $B$G$"$k(B.
                   4362: @item $B$3$N4X?t$O(B 2000 $B:"$K$O$8$a$F$N%P!<%8%g%s$,=q$+$l$?(B. $B%=!<%9$O(B ppp.c $B$G$"$k(B.
                   4363: @end itemize
                   4364:
                   4365: @comment --- $B$*$^$8$J$$(B ---
                   4366: @node Index,,, Top
                   4367: @unnumbered Index
                   4368: @printindex fn
                   4369: @printindex cp
                   4370: @iftex
                   4371: @vfill @eject
                   4372: @end iftex
                   4373: @summarycontents
                   4374: @contents
                   4375: @bye
                   4376: @comment --- $B$*$^$8$J$$=*$j(B ---

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