[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.44

1.44    ! nisiyama    1: %% $OpenXM: OpenXM/src/asir-doc/exp/exp-ja.texi,v 1.43 2011/12/08 06:40:52 nisiyama 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.41      takayama   41: @subtitle 2010 $BG/(B 9 $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.34      ohara     141: @end menu
1.23      takayama  142:
1.34      ohara     143: @node $B%/%*!<%H(B,,, $B<B83E*;EMM$N4X?t(B
                    144: @section $B%/%*!<%H(B
1.1       takayama  145:
1.34      ohara     146: @comment --- $B"~"~"~"~(B  $B4X?t(B quotetotex, quotetotex_env $B$N@bL@(B $B"~"~"~"~(B
1.1       takayama  147: @comment --- $B8D!9$N4X?t$N@bL@$N3+;O(B ---
                    148: @comment --- section $BL>$r@53N$K(B ---
1.34      ohara     149: @node quotetotex quotetotex_env,,, $B%/%*!<%H(B
1.2       takayama  150: @subsection @code{quotetotex}, @code{quotetotex_env}
1.1       takayama  151: @comment --- $B:w0zMQ%-!<%o!<%I(B
1.2       takayama  152: @findex quotetotex
                    153: @findex quotetotex_env
1.1       takayama  154:
                    155: @comment --- $B4X?t$N4JC1$J@bL@(B ---
                    156: @table @t
1.34      ohara     157: @item quotetotex(@var{q})
1.2       takayama  158: :: @var{q} $B$r(B latex $B7A<0$GI=8=$7$?J8;zNs$KJQ49$9$k(B.
                    159: @item quotetotex_env(@var{key},@var{value})
                    160: :: quotetotex $B$NF0:n$r@)8f$9$k%Q%i%a!<%?$rJQ99$9$k(B.
                    161: @item quotetotex_env()
                    162: :: quotetotex $B$NF0:n$r@)8f$9$k%Q%i%a!<%?$N8=:_CM$rLa$9(B.
                    163: @item quotetotex_env(0)
                    164: :: quotetotex $B$NF0:n$r@)8f$9$k%Q%i%a!<%?$r%G%U%)!<%k%HCM$KLa$9(B.
1.1       takayama  165: @end table
                    166:
                    167: @comment --- $B0z?t$N4JC1$J@bL@(B ---
                    168: @table @var
                    169: @item return
1.2       takayama  170: $BJ8;zNs(B(quotetotex) $B$^$?$O(B $B%j%9%H$^$?$O%*%V%8%'%/%H(B(quotetotex_env)
                    171: @item q
                    172: quote
                    173: @item key
                    174: $BJ8;zNs(B
                    175: @item value
                    176: $B%*%V%8%'%/%H(B
1.1       takayama  177: @end table
                    178:
                    179: @comment --- $B$3$3$G4X?t$N>\$7$$@bL@(B ---
                    180: @comment --- @itemize$B!A(B@end itemize $B$O2U>r=q$-(B ---
                    181: @comment --- @bullet $B$O9uE@IU$-(B ---
                    182: @itemize @bullet
                    183: @item
1.2       takayama  184: quotetotex $B$O(B @var{q} $B$r(B latex $B7A<0$GI=8=$7$?J8;zNs$KJQ49$9$k(B.
1.34      ohara     185: @item
1.2       takayama  186: $B0J2<(B quotetotex_env $B$N%Q%i%a!<%?$N0UL#$r@bL@$9$k(B.
1.34      ohara     187: @item
1.2       takayama  188: conv_rule: 3 $B%S%C%H$rMQ$$$FJQ49%k!<%k$r;XDj$9$k(B.
                    189: 0$B%S%C%HL\$O(B symbol_table $B$K$h$kJQ49$r9T$&$+(B,
                    190: 1$B%S%C%HL\$OE:;zJQ49$r9T$&$+(B,
1.3       takayama  191: 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  192: $B$r0UL#$9$k(B.
                    193: $B$?$H$($P(B conv_rule $B$H$7$F(B 3 $B$r;XDj$9$k$H(B,
                    194: 0$B%S%C%HL\(B, 1 $B%S%C%HL\$,(B 1 $B$H$J$k$N$G(B
                    195: symbol_table $B$K$h$kJQ49$r9T$$(B, $BE:;zJQ49$r$*$3$J$&(B.
                    196: $BE:;zJQ49$O?t;z$H1Q;z$N6-L\$*$h$S(B _ $B5-9f$r6h@Z$j$H$9$k(B.
                    197: symbol_table $B$K$h$kJQ49$,:G=i$KE,MQ$5$l$k(B.
                    198: alpha, beta, $BEy$O<+F0E*$r%.%j%7%cJ8;z$KJQ49$9$k%F!<%V%k$O(B
                    199: $BFbB"$:$_(B.
1.34      ohara     200: @item
1.5       takayama  201:   dp_vars_prefix: $BJ,;6I=8=B?9`<0$O(B
1.34      ohara     202:   @iftex
                    203:   @tex
1.5       takayama  204:   $x_0, x_1, \cdots$
1.34      ohara     205:   @end tex
                    206:   @end iftex
                    207:   @ifinfo
                    208:   x0, x1, ...
                    209:   @end ifinfo
1.5       takayama  210:   $B$NB?9`<0$H$7$F(B latex $B7A<0$KJQ49$5$l$k$,$3$N(B
                    211:   x $B$NItJ,$rJQ99$9$k(B.
1.34      ohara     212: @item
1.5       takayama  213:   dp_vars_origin: $B%$%s%G%C%/%9$N;O$^$j$NCM$r;XDj$9$k(B.
                    214:   $B%G%U%)!<%k%H$O(B 0.
1.1       takayama  215: @item
1.2       takayama  216: dp_vars_hweyl: $BJ,;6I=8=B?9`<0$r%o%$%kBe?t$N85$H$_$J$7$F(B
1.3       takayama  217: latex $B7A<0$KJQ49$9$k(B.
1.34      ohara     218: $B6v?t8DJQ?t$,$"$k$H$-$O(B $B:G=i$NH>J,$r(B
                    219: @iftex
                    220: @tex
1.2       takayama  221: $x_0, x_1, \cdots$
1.34      ohara     222: @end tex
                    223: $B$K8eH>$NH>J,$r(B
                    224: @tex
1.2       takayama  225: $\partial_0, \partial_1, \cdots$
1.34      ohara     226: @end tex
                    227: @end iftex
                    228: @ifinfo
                    229: x0, x1, ... $B$K8eH>$NH>J,$r(B dx0, dx1, ...
                    230: @end ifinfo
1.2       takayama  231: $B$KJQ49$9$k(B.
                    232: $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  233: @item
                    234:   dp_dvars_prefix: dp_vars_hweyl $B$,(B 1 $B$N;~$K8eH>ItJ,$N(B prefix $B$r;XDj$9$k(B.
                    235:   $B%G%U%)!<%k%H$O(B @tex $\partial$ @end tex
                    236: @item
                    237:   dp_dvars_origin: dp_vars_hweyl $B$,(B 1 $B$N;~$N%$%s%G%C%/%9$N;O$^$j$NCM(B.
1.34      ohara     238: @item
1.2       takayama  239: conv_func: $B%f!<%6Dj5A$NJQ494X?t$r$h$V(B.
1.1       takayama  240: @end itemize
                    241:
                    242: @comment --- @example$B!A(B@end example $B$O<B9TNc$NI=<((B ---
                    243: @example
1.2       takayama  244: [3] quotetotex(quote(1/(x+1)));
                    245: \frac@{ 1@} @{ (  @{x@}+ 1)@}
                    246: [4]  quotetotex(objtoquote(diff(x^x,x)));
                    247:    @{x@}^@{  @{x@}- 1@}   @{x@}+  \log( @{x@})   @{x@}^@{ @{x@}@}
                    248: [5] quotetotex_env("conv_rule",3);
                    249: [6] quotetotex(objtoquote( (alpha2beta+x_i_j)^2));
                    250:   @{\alpha@}_@{2,\beta@}^@{ 2@} +   2  @{x@}_@{i,j@}  @{\alpha@}_@{2,\beta@}+  @{x@}_@{i,j@}^@{ 2@}
1.1       takayama  251: @end example
                    252:
                    253: @comment --- $B;2>H(B($B%j%s%/(B)$B$r=q$/(B ---
                    254: @table @t
                    255: @item $B;2>H(B
1.2       takayama  256: @ref{objtoquote}
1.3       takayama  257: print_tex_form(contrib)
1.1       takayama  258: @end table
                    259:
                    260: @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
                    261: @noindent
                    262: ChangeLog
                    263: @itemize @bullet
1.34      ohara     264: @item
                    265:  $B$3$N4X?t$O(B 2004$BG/(B2$B7nKv$+$i(B3$B7n$K$+$1$F(B asir $B$r(B
                    266:  knoppix $BHG(B texmacs $B$KBP1~$5$;$k$?$a$K=q$+$l$?(B.
1.5       takayama  267:  Asir-contrib $B$N(B print_tex_form $B$,$=$N867?$G$"$j(B, $B$=$l$r8zN(2=$7$^$?(B
                    268:  $B=PNO7A<0$r2~A1$7$?(B.
                    269:  OpenXM/src/kxx/ox_texmacs.c, OpenXM/src/texmacs $B$b;2>H(B.
1.34      ohara     270: @item
                    271:  OpenXM/src/asir-contrib/packages/src/noro_print.rr 1.1--1.8,
1.5       takayama  272:  noro_print_default.rr 1.1--1.3 $B$b;2>H(B.
1.34      ohara     273: @item
1.5       takayama  274:  $BJQ99$r<u$1$?%U%!%$%k$O(B OpenXM_contrib2/asir2000 $B$N2<$N<!$N%U%!%$%k(B.
1.3       takayama  275:   builtin/strobj.c 1.14--1.43,
                    276:   include/ca.h 1.46, io/cexpr.c 1.18, io/pexpr.c 1.32, io.sexpr.c 1.29,
                    277:   parse/arith.c 1.12, parse/parse.h 1.28--1.29,
                    278:   parse/quote.c 1.7--1.8, 1.12.
1.34      ohara     279: @item
1.3       takayama  280:   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     281: @item
1.5       takayama  282:   dp_dvars_prefix, *_origin $B$O(B builtin/strobj.c 1.46 $B$GF3F~$5$l$?(B.
                    283: @item
                    284:   Todo: quotetoterminalform ($BJ,;6I=8=B?9`<0$N8+0W$$=PNO(B).
1.3       takayama  285: @end itemize
                    286:
                    287:
                    288:
1.34      ohara     289: @comment --- $B"~"~"~"~(B  $B4X?t(B objtoquote $B$N@bL@(B $B"~"~"~"~(B
                    290: @node objtoquote,,, $B%/%*!<%H(B
1.3       takayama  291: @subsection @code{objtoquote}
                    292: @findex objtoquote
                    293:
                    294: @comment --- $B4X?t$N4JC1$J@bL@(B ---
                    295: @table @t
                    296: @item objtoquote(@var{ob})
                    297: :: $B%*%V%8%'%/%H$H(B quote $B7?$N%G!<%?$KJQ49$9$k(B.
                    298: @end table
                    299:
                    300: @table @var
                    301: @item return
                    302: quote
                    303: @item ob
                    304: $B%*%V%8%'%/%H(B
                    305: @end table
                    306:
                    307: @itemize @bullet
                    308: @item
                    309: @code{objtoquote(ob)} $B$O(B, @var{ob} $B$r(B quote $B7?$N%G!<%?$KJQ49$9$k(B.
                    310: @end itemize
                    311:
                    312: @example
                    313: [1150] quotetolist(quote(1+2));
                    314: [b_op,+,[internal,1],[internal,2]]
                    315: [1151] quotetolist(objtoquote(1+x));
                    316: [b_op,+,[internal,x],[internal,1]]3
                    317: @end example
                    318:
                    319: @table @t
                    320: @item $B;2>H(B
                    321: @ref{quotetotex} @ref{quotetolist}
                    322: @end table
                    323:
                    324: @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
                    325: @noindent
                    326: ChangeLog
                    327: @itemize @bullet
                    328: @item $B$3$N4X?t$O(B quotetotex $B$NA0=hM}$r$9$k$?$a$K=q$+$l$?(B.
                    329: @item asir-contrib $B$N4X?t(B quote_to_quote $B$b;2>H(B.
                    330: @item OpenXM_contrib2/asir2000/builtin/print.c 1.16.
                    331: @end itemize
                    332:
                    333:
1.34      ohara     334: @node flatten_quote,,, $B%/%*!<%H(B
                    335: @subsection @code{flatten_quote}
                    336: @findex flatten_quote
1.3       takayama  337:
                    338: @comment --- $B4X?t$N4JC1$J@bL@(B ---
                    339: @table @t
1.34      ohara     340: @item flatten_quote(@var{q},@var{op})
                    341: :: quote $B$N3g8L$r$H$j$5$k(B.
1.3       takayama  342: @end table
                    343:
                    344: @table @var
                    345: @item return
1.34      ohara     346: Quote
                    347: @item q
                    348: Quote
                    349: @item op
                    350: $B1i;;;R$rI=$9J8;zNs(B.
1.3       takayama  351: @end table
                    352:
                    353: @itemize @bullet
                    354: @item
1.34      ohara     355: Quote $B7?$N%G!<%?$OLZ9=B$$r$7$F$$$k(B
                    356: ( quotetolist $B;2>H(B ).
                    357: @code{quote_flatten()} $B$O(B, @var{q} $B$NCf$K$"$i$l$k1i;;;R(B @var{op}
                    358: $B$N;R6!%N!<%I$rJ?Ey$K$9$k(B.
                    359: $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.
                    360: $B$?$H$($P(B (1+2)+(3+4) $B$H$$$&I=8=$r(B 1+2+3+4 $B$KJQ49$9$k(B.
                    361: @item
                    362:  $B8=:_$N<BAu$G$O(B n-ary $B$N1i;;;R$ODj5A$5$l$F$$$J$$$N$G(B,
                    363:  1+2+3 $B$O<B$O(B 1+(2+3) $B$HI=8=$5$l$F$$$k(B.
                    364:  $B$D$^$j(B + $B1i;;;R$O1&7k9gE*$G$"$k(B.
                    365: @item  R=0; for (I=0; I<N; I++) R = R+ P[I]; $B$J$kB-$7;;$r7+$jJV$9$H(B,
                    366:   + $B$O:87k9gE*$K$J$k(B. $B1&7k9gE*$KJQ49$9$k$K$O(B flatten_quote $B$r8F$V(B.
                    367: @item $BL>A0$O(B quote_flatten $B$G$J$/(B flatten_quote $B$G$"$k(B.
1.3       takayama  368: @end itemize
                    369:
                    370: @example
1.34      ohara     371: [1288] flatten_quote(quote((1+2)+(3+4*(x+3))),"+");
                    372: quote(1+2+3+4*(x+3))
                    373: [1289] flatten_quote(quote( (x*y)*(p*3)-(x*y)*z),"*");
                    374: quote(x*y*p*3-x*y*z)
                    375: [1290] quotetolist(quote(1+2+3));
                    376: [b_op,+,[b_op,+,[internal,1],[internal,2]],[internal,3]]
1.3       takayama  377: @end example
                    378:
1.34      ohara     379: @table @t
                    380: @item $B;2>H(B
                    381: @ref{quotetolist}, @ref{print_tex_form}(contrib)
                    382: @end table
                    383:
                    384: @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  385: @noindent
                    386: ChangeLog
                    387: @itemize @bullet
1.34      ohara     388: @item
                    389:  $B$3$N4X?t$O(B 2004-7-7 $B$+$i(B 2004-7-8 $B$K$+$1$F(B
                    390:  quote $B$K4X$9$kA`:n$r8&5f$9$k$?$a$K<B83E*$K=q$+$l$?(B.
                    391:  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
                    392:  $B1~MQ(B.
                    393: @item
                    394:  $BJQ99$r$&$1$?%=!<%9%3!<%I$O(B
                    395:  builtin/strobj.c 1.47,
                    396:  parse/eval.c 1.35,
                    397:  parse/parse.h 1.31,
                    398:  parse/quote.c 1.14--1.16.
1.3       takayama  399: @end itemize
                    400:
                    401:
1.34      ohara     402: @node quote_to_funargs,,, $B%/%*!<%H(B
                    403: @subsection @code{quote_to_funargs}, @code{funargs_to_quote}, @code{remove_paren}
                    404: @findex quote_to_funargs
                    405: @findex funargs_to_quote
                    406: @findex remove_paren
1.3       takayama  407:
                    408: @table @t
1.34      ohara     409: @item quote_to_funargs(@var{q})
                    410: ::  quote $B$r(B funarg $B7A<0(B($B%j%9%H(B) $B$X(B.
                    411: @item funargs_to_quote(@var{f})
                    412: ::  funarg $B7A<0$r(B quote $B$X(B.
                    413: @item get_function_name(@var{f})
                    414: ::  funarg $B7A<0$N(B op $B$rJ8;zNs$X(B.
                    415: @item remove_paren(@var{q})
                    416: ::  $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  417: @end table
                    418:
                    419: @table @var
                    420: @item return
1.34      ohara     421: quote(funargs_to_quote, remove_paren) $B$+(B $B%j%9%H(B(quote_to_funargs)
                    422: @item q
                    423: quote
                    424: @item f
                    425: $B%j%9%H(B
1.3       takayama  426: @end table
                    427:
                    428: @itemize @bullet
                    429: @item
1.34      ohara     430:  @code{quote_to_funargs} $B$O(B quote $B7?$N%G!<%?(B ($BFbItE*$K$O(B FNODE) $B$r(B
                    431: quote $B$X$NI|852DG=$J7A$G%j%9%H$XJQ49$9$k(B.
                    432: @code{quotetolist} $B$O(B quote $B$r%j%9%H$XJQ49$9$k$,(B, $B0lIt$N>pJs$r<N$F$k$?$a(B
                    433: $B$b$H$N(B quote $B$NI|85$O$G$-$J$$(B.
                    434: @item
                    435:  @code{quote_to_funargs} $B$NLa$jCM$O(B [fid, op, arg1, arg2, ...]
                    436: $B$J$k7A<0$r$7$F$$$k(B.
                    437: $B$3$3$G(B op $B$O(B node $B$NL>A0$G$"$j(B,
                    438: $B4X?t(B @code{get_function_name} $B$rMQ$$$F?M4V$,FI$a$k7A<0(B
                    439: $B$G<h$j$@$;$k(B.
                    440: $B$?$H$($P(B @code{get_function_name(quote_to_funargs(quote(1+2))[1])}
                    441: $B$O(B "+" $B$rLa$9(B.
1.3       takayama  442: @item
1.34      ohara     443:  $BL>A0(B@code{get_function_name} $B$O$=$N$&$AJQ99$5$l$k$@$m$&(B.
1.3       takayama  444: @item
1.34      ohara     445:  $B2<$NNc$G(B
                    446:  quote_to_funargs(FA[2]);
                    447: [34,[b_op,+,[internal,x],[internal,1]]]
                    448: $B$H$J$k(B.
                    449: 34 $B$O(B @code{I_PAREN} $B$r0UL#$9$k(B.
                    450: $B?t$H0UL#$NBP1~I=$O(B @code{OpenXM/src/asir-contrib/packages/src/noro_simplify.rr}
                    451: $B$^$?$O(B @code{OpenXM_contrib2/asir2000/parse/parse.h} $B$r8+$h(B.
                    452: $B0J2<$N(B fid $B$,(B 0, 1, 2, ... $B$KBP1~$E$1$i$l$F$$$k(B.
                    453:         I_BOP, I_COP, I_AND, I_OR, I_NOT, I_CE,
                    454:         I_PRESELF, I_POSTSELF,
                    455:         I_FUNC, I_FUNC_OPT, I_IFUNC, I_MAP, I_RECMAP, I_PFDERIV,
                    456:         I_ANS, I_PVAR, I_ASSPVAR,
                    457:         I_FORMULA, I_LIST, I_STR, I_NEWCOMP, I_CAR, I_CDR, I_CAST,
                    458:         I_INDEX, I_EV, I_TIMER, I_GF2NGEN, I_GFPNGEN, I_GFSNGEN,
                    459:         I_LOP, I_OPT, I_GETOPT, I_POINT, I_PAREN, I_MINUS,
                    460:         I_NARYOP
1.3       takayama  461: @end itemize
                    462:
1.34      ohara     463: $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.
                    464: @example
                    465: [0] ctrl("print_quote",1) $
                    466:
                    467: [1] Q=quote((x+1)+(x+2));
                    468: [b_op,+,[u_op,(),[b_op,+,[internal,x],[internal,1]]],
                    469:         [u_op,(),[b_op,+,[internal,x],[internal,2]]]]
                    470:
                    471: [2] FA=quote_to_funargs(Q);
                    472: [0,<...quoted...>,
                    473:   [u_op,(),[b_op,+,[internal,x],[internal,1]]],
                    474:   [u_op,(),[b_op,+,[internal,x],[internal,2]]]]
                    475:
                    476: [3] FA2=quote_to_funargs(FA[2])[1];
                    477: [b_op,+,[internal,x],[internal,1]]
                    478:
                    479: [4] FA3=quote_to_funargs(FA[3])[1];
                    480: [b_op,+,[internal,x],[internal,2]]
                    481:
                    482: [5] funargs_to_quote([FA[0],FA[1],FA2,FA3]);
                    483: [b_op,+,[b_op,+,[internal,x],[internal,1]],
                    484:         [b_op,+,[internal,x],[internal,2]]]
                    485: @end example
                    486:
                    487: $B<!$NNc$O(B OpenXM/asir-contrib $BHG$N(B asir $B$G<B9T(B.
                    488: @example
                    489: [1287] load("noro_simplify.rr");
                    490: 1
                    491: [1293] noro_simplify.remove_paren(quote( f(1-(x))));
                    492: quote(f(1-x))
                    493: @end example
1.3       takayama  494:
1.34      ohara     495: funargs_to_quote $B$rMQ$$$F4{B8$N(B quote $B$N;R6!$rCV$-49$($F(B
                    496: $B?7$7$$(B quote $B$r$D$/$j=P$;$k(B.
                    497: @example
                    498: [1184] R=quote_to_funargs(quote(a+(b+c)));
                    499: [0,<...quoted...>,<...quoted...>,<...quoted...>]
                    500: [1185] T=quote_to_funargs(quote(1+2));
                    501: [0,<...quoted...>,<...quoted...>,<...quoted...>]
                    502: [1186] funargs_to_quote([0,R[1],R[2],T[2]]);
                    503: quote(a+1)
1.3       takayama  504: @end example
                    505:
1.34      ohara     506: @table @t
                    507: @item $B;2>H(B
                    508: @ref{quotetolist}
                    509: @end table
                    510:
1.3       takayama  511:
                    512: @noindent
                    513: ChangeLog
                    514: @itemize @bullet
1.34      ohara     515: @item
                    516:  $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
                    517:  $B$N<B83E*4X?t$G$"$k(B.
                    518:  $BJQ99$r$&$1$?%=!<%9%3!<%I$OB?4t$K$o$?$k$N$G$^$@=q$+$J$$(B.
                    519: @item
                    520:  $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.
                    521: @item
                    522:  2004-6-26 $B$N7W;;Be?t%;%_%J!<$K$*$$$F(B, $BCf@n$5$s$,(B simplifier $B$K$D$$$F$$$m$$$mLdBjDs5/(B
                    523: $B$r$7$?(B ($B7W;;Be?t%;%_%J!<%S%G%*;2>H(B).
                    524: @item parse/quote.c $B$N(B {\tt strcut fid_spec fid_spec_tab[] }
                    525: $B$NItJ,$K=q$$$F$"$k7A<0$K(B @code{funargs_to_quote} $B$OJQ49$9$k(B.
1.3       takayama  526: @end itemize
                    527:
                    528:
1.34      ohara     529: @node eval_quote,,, $B%/%*!<%H(B
                    530: @subsection @code{eval_quote}
                    531: @findex eval_quote
1.3       takayama  532:
                    533: @comment --- $B4X?t$N4JC1$J@bL@(B ---
                    534: @comment --- @itemx $B$OJ#?t$KBP$7$F@bL@$r0l$D$D$1$k>l9g$K;H$&(B ---
                    535: @table @t
1.34      ohara     536: @item eval_quote(@var{Q});
                    537: :: quote $B7?%G!<%?(B @var{Q} $B$r(B asir $B$N%*%V%8%'%/%H$KJQ49$9$k(B.
1.3       takayama  538: @end table
                    539:
                    540: @table @var
                    541: @item return
1.34      ohara     542: $B%*%V%8%'%/%H(B
                    543: @item Q
                    544: quote$B7?(B
                    545: @end table
                    546:
                    547: @itemize @bullet
                    548: @item quote $B7?%G!<%?(B @var{Q} $B$r(B asir $B$N%*%V%8%'%/%H$KJQ49$9$k(B.
                    549: @item $B5U4X?t$O(B @code{objtoquote}
                    550: @end itemize
                    551:
                    552: @example
                    553: ctrl("print_quote",2);
                    554: A=quote((x-1)^2+(x-1)+3);
                    555:      $B=PNO(B: ((((x)-(1))^(2))+((x)-(1)))+(3)
                    556: eval_quote(A);
                    557:      $B=PNO(B: x^2-x+3
                    558: print_input_form(A);     /* asir-contrib */
                    559:      $B=PNO(B: quote((x-1)^2+(x-1)+3)
1.11      ohara     560: @end example
1.3       takayama  561:
1.34      ohara     562: @table @t
                    563: @item $B;2>H(B
                    564: @ref{objtoquote}, @ref{quotetolist}, @ref{eval_string},
                    565: @ref{quote_to_funargs}, @ref{funargs_to_quote}
                    566: @end table
1.3       takayama  567:
                    568: @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     569: @comment --- openxm $B$N30It$+$i$N4sM?$b=R$Y$k(B. Credit.
1.3       takayama  570: @noindent
                    571: ChangeLog
                    572: @itemize @bullet
1.34      ohara     573: @item  -----$B$^$@=q$$$F$J$$(B.
1.1       takayama  574: @end itemize
                    575:
1.34      ohara     576:
                    577: @node nqt_match,,, $B%/%*!<%H(B
                    578: @subsection @code{nqt_match}
                    579: @findex nqt_match
1.1       takayama  580:
                    581: @comment --- $B4X?t$N4JC1$J@bL@(B ---
                    582: @comment --- @itemx $B$OJ#?t$KBP$7$F@bL@$r0l$D$D$1$k>l9g$K;H$&(B ---
                    583: @table @t
1.34      ohara     584: @item nqt_match(@var{Expr},@var{Pattern}[,@var{Mode}])
                    585: :: @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  586: @end table
                    587:
1.34      ohara     588: @table @var
                    589: @item return
                    590: $B@0?t(B
                    591: @item Expr
                    592: quote$B7?(B
                    593: @item Pattern
                    594: quote$B7?(B
                    595: @item Mode
                    596: $B@0?t(B
                    597: @end table
1.3       takayama  598:
                    599: @itemize @bullet
1.34      ohara     600: @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.
                    601: @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.
                    602: @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.
                    603: @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
                    604: fnode$BI8=`7A$H(B @var{Pattern} $B$rHf3S$9$k(B.
1.3       takayama  605: @end itemize
                    606:
1.34      ohara     607: @example
                    608: ctrl("print_quote",2);
                    609: A=quote((x-y)*(x+y));
                    610: nqt_match(A,quote(P*Q));
                    611: [P,Q]
                    612:     $B=PNO(B:  [x-y, x+y]
                    613: nqt_match(A,quote(P*Q),1);
                    614:     $B%^%C%A$7$J$$(B.
                    615: nqt_match(A,quote(P*Q),2);
                    616:     $B%^%C%A$7$J$$(B.
                    617: qt_normalize(A,1);
                    618:     $B=PNO(B:  ((x)^(2))+((x)*(y))+((-1)*((y)^(2)))+((-1)*(y)*(x))
                    619: qt_normalize(A,2);
                    620:     $B=PNO(B:  ((x)*(x))+((x)*(y))+((-1)*(y)*(x))+((-1)*(y)*(y))
                    621: @end example
                    622:
                    623: @table @t
                    624: @item $B;2>H(B
                    625: @ref{nqt_match_rewrite},
                    626: @ref{qt_rewrite}
                    627: @end table
1.3       takayama  628:
                    629: @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     630: @comment --- openxm $B$N30It$+$i$N4sM?$b=R$Y$k(B. Credit.
1.3       takayama  631: @noindent
                    632: ChangeLog
                    633: @itemize @bullet
1.34      ohara     634: @item  ----- $B$^$@=q$$$F$J$$(B.
1.3       takayama  635: @end itemize
                    636:
1.4       takayama  637:
1.34      ohara     638: @node nqt_match_rewrite,,, $B%/%*!<%H(B
                    639: @subsection @code{nqt_match_rewrite}
                    640: @findex nqt_match_rewrite
1.4       takayama  641:
                    642: @comment --- $B4X?t$N4JC1$J@bL@(B ---
                    643: @comment --- @itemx $B$OJ#?t$KBP$7$F@bL@$r0l$D$D$1$k>l9g$K;H$&(B ---
                    644: @table @t
1.34      ohara     645: @item nqt_match_rewrite(@var{Expr},@var{Rule},@var{Mode})
                    646: :: @var{Expr} $B$r(B @var{Rule} $B$K=>$$=q$-49$($k(B.
1.4       takayama  647: @end table
                    648:
                    649: @table @var
                    650: @item return
1.34      ohara     651: quote$B7?(B
                    652: @item Expr
                    653: quote$B7?(B
                    654: @item Rule
                    655: [@var{Pattern},@var{Action}] $B$+$^$?$O(B
                    656: [@var{Pattern},@var{Condition},@var{Action}].
                    657: $B$3$l$i$NMWAG$O$9$Y$F(B quote$B7?(B.
                    658: @item Mode
                    659: $B@0?t(B
1.4       takayama  660: @end table
                    661:
                    662: @itemize @bullet
1.34      ohara     663: @item @var{Expr} $B$r(B @var{Rule} $B$K=>$$=q$-49$($k(B. @var{Pattern} $B$KE,9g$7$J$$>l9g$O(B
                    664: @var{Exprt} $B<+BN$rLa$9(B.
                    665: @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  666: @end itemize
                    667:
1.34      ohara     668: @comment %%Doc: cfep/tests/2006-03-12-qt.rr
1.4       takayama  669: @example
1.34      ohara     670: ctrl("print_quote",2);
                    671: nqt_match_rewrite(`x*y*z,[`X*Y,`X+Y],1);
                    672:    $B=PNO(B: (x)+((y)*(z))
                    673: A=`x*x;
                    674: nqt_match_rewrite(A,[`X*Y,`X+Y],1);
                    675:    $B=PNO(B: x^2   ($B%^%C%A$7$F$$$J$$(B)
                    676: nqt_match_rewrite(A,[`X*Y,`X+Y],2);
                    677:    $B=PNO(B: 2*x
                    678:
                    679: $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.
                    680: quotetolist(qt_normalize(`x*x,0));
                    681:     $B=PNO(B:  [b_op,^,[internal,x],[internal,2]]
                    682: quotetolist(qt_normalize(`x*x,1));
                    683:     $B=PNO(B:  [b_op,^,[internal,x],[internal,2]]
                    684: quotetolist(qt_normalize(`x*x,2));
                    685:     $B=PNO(B:  [n_op,*,[internal,x],[internal,x]]
1.4       takayama  686: @end example
                    687:
                    688: @table @t
                    689: @item $B;2>H(B
1.34      ohara     690: @ref{nqt_match},
                    691: @ref{qt_rewrite},
                    692: @ref{qt_normalize}
1.4       takayama  693: @end table
                    694:
                    695: @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
                    696: @comment --- openxm $B$N30It$+$i$N4sM?$b=R$Y$k(B. Credit.
                    697: @noindent
                    698: ChangeLog
                    699: @itemize @bullet
1.34      ohara     700: @item   -----$B$^$@=q$$$F$J$$(B.
1.4       takayama  701: @end itemize
                    702:
1.34      ohara     703:
                    704:
                    705: @node qt_normalize,,, $B%/%*!<%H(B
                    706: @subsection @code{qt_normalize}
                    707: @findex qt_normalize
1.6       takayama  708:
                    709: @comment --- $B4X?t$N4JC1$J@bL@(B ---
                    710: @comment --- @itemx $B$OJ#?t$KBP$7$F@bL@$r0l$D$D$1$k>l9g$K;H$&(B ---
                    711: @table @t
1.34      ohara     712: @item qt_normalize(@var{Expr}[,@var{Mode}])
                    713: :: @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  714: @end table
                    715:
                    716: @table @var
                    717: @item return
1.34      ohara     718: quote$B7?(B
                    719: @item Expr
                    720: quote$B7?(B
                    721: @item Mode
                    722: $B@0?t(B
1.6       takayama  723: @end table
                    724:
1.34      ohara     725: fnode$B$O(B quote$B7?$N<BBN$G$"$k(B.
                    726: fnode $B$OLZ$G$"$j(B, $B7?(B id $B$*$h$S;R6!$+$i$J$k(B.
                    727: $B7?$*$h$S;R6!$r<h$j=P$94X?t$,(B funargs_to_quote $B$G$"$k(B.
                    728: $B$^$?(B fnode $B$r%j%9%H$KJQ49$9$k4X?t$,(B quotetolist $B$G$"$k(B.
                    729:
                    730: fnode $B$NI8=`7A$O%Q%?!<%s%^%C%A%s%0(B, $B=q$-49$($rMF0W$K$*$3$J$&$?$a$KF3F~$5$l$?(B.
                    731: 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.
                    732: @example
                    733:  fn           = formula | functor(nf [,...]) | sum_of_monom
                    734:      fnode $B$NI8=`7A(B.  functor $B$O4X?t$h$S$@$7$_$?$$$J$b$N(B.
                    735:  sum_of_monom = monom [+ ...]
                    736:      $B%b%N%_%"%k$NOB(B
                    737:  monom        = [formula *] nfpow [* ...]
                    738:      $B%b%N%_%"%k(B
                    739:  nfpow        = nf | nf^(nf)
                    740:      $BQQ>hItJ,$NI8=`7A(B
                    741:  formula      = Risa object
                    742: @end example
                    743:
                    744:
1.6       takayama  745: @itemize @bullet
1.34      ohara     746: @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.
                    747: @item $BE83+$O:F5"E*$G$"$k(B.
                    748: @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
                    749: (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
                    750: $B;R6!$r;}$F$k(B n-ary operator $B$KJQ49$5$l$k(B.
                    751: @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.
                    752: @item @var{Mode}=0. $BE83+$7$J$$(B. $B$3$l$,4{Dj$NF0:n(B.
                    753: @item @var{Mode}=1. $BE83+$9$k(B. $B$?$@$7(B x*x $BEy$r(B x^2 $BEy$KJQ49(B
                    754: @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  755: @end itemize
                    756:
1.34      ohara     757: @var{Mode} $B$N0c$$$K$D$$$F$O0J2<$NNc$b;29M$K(B.
                    758: @comment %%cfep/tests/2006-03-12-qt.rr
1.6       takayama  759: @example
1.34      ohara     760: ctrl("print_quote",2);
                    761: A=quote((x-y)*(x+y));
                    762:    $B=PNO(B:  ((x)-(y))*((x)+(y))
                    763: B=qt_normalize(A,0);
                    764:    $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.
                    765: quotetolist(B);
                    766:    $B=PNO(B: [n_op,*,[n_op,+,[internal,x],[n_op,*,[internal,-1],[internal,y]]],[n_op,+,[internal,x],[internal,y]]]
1.6       takayama  767:
1.34      ohara     768: B=qt_normalize(A,1);
                    769:    $B=PNO(B: ((x)^(2))+((x)*(y))+((-1)*((y)^(2)))+((-1)*(y)*(x))
                    770:            Mode=1. $BE83+$9$k(B. +, * $B$O(B n_op (nary-op) $B$X(B. $B6R$r$^$H$a$k(B.
                    771: quotetolist(B);
                    772:    $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  773:
1.34      ohara     774: qt_normalize(A,2);
                    775:    $B=PNO(B: ((x)*(x))+((x)*(y))+((-1)*(y)*(x))+((-1)*(y)*(y))
                    776:            Mode=2. $BE83+$9$k(B. +, * $B$O(B n_op (nary-op) $B$X(B. $B6R$O;H$o$J$$(B.
                    777: quotetolist(B);
                    778:    $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  779:
1.34      ohara     780: qt_normalize(`x^2,2);
                    781:    $B=PNO(B: (x)*(x)
                    782:        Mode=2. $B6R$O;H$o$J$$(B. n-ary $B$N(B * $B$X(B.
1.6       takayama  783: @end example
                    784:
                    785: @table @t
                    786: @item $B;2>H(B
1.34      ohara     787: @ref{nqt_match},
                    788: @ref{nqt_match_rewrite},
                    789: @ref{quotetolist},
                    790: @ref{quote_to_funargs}
1.6       takayama  791: @end table
                    792:
                    793: @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     794: @comment --- openxm $B$N30It$+$i$N4sM?$b=R$Y$k(B. Credit.
1.6       takayama  795: @noindent
                    796: ChangeLog
                    797: @itemize @bullet
1.34      ohara     798: @item -----$B$^$@=q$$$F$J$$(B.
1.6       takayama  799: @end itemize
                    800:
1.34      ohara     801:
                    802: @node qt_set_coef,,, $B%/%*!<%H(B
                    803: @subsection @code{qt_set_coef}
                    804: @findex qt_set_coef
1.6       takayama  805:
                    806: @comment --- $B4X?t$N4JC1$J@bL@(B ---
1.34      ohara     807: @comment --- @itemx $B$OJ#?t$KBP$7$F@bL@$r0l$D$D$1$k>l9g$K;H$&(B ---
1.6       takayama  808: @table @t
1.34      ohara     809: @item qt_set_coef(@var{ParamList})
                    810: :: $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
                    811: $BHs2D49B?9`<0$r07$&(B.
1.6       takayama  812: @end table
                    813:
                    814: @table @var
                    815: @item return
1.34      ohara     816: $B%j%9%H(B
                    817: @item  ParamList
                    818: $B%j%9%H(B
1.6       takayama  819: @end table
                    820:
                    821: @itemize @bullet
1.34      ohara     822: @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
                    823: $BHs2D49B?9`<0$r07$&(B.
                    824: @item $B$3$N@k8@$r$7$J$$$H78?tBN$r?t$H$9$kHs2D49B?9`<0$H$7$F7W;;$9$k(B.
                    825: @item qt_normalize $B$*$h$S$=$N5!G=$rMQ$$$k4X?t$,$3$N5!G=$N1F6A$r<u$1$k(B.
                    826: @item qt_comp $B4X?t$,$3$N5!G=$N1F6A$r<u$1$k(B.
1.6       takayama  827: @end itemize
                    828:
                    829: @example
1.34      ohara     830: ctrl("print_quote",2);
                    831: qt_set_coef([a]);
                    832: B=qt_normalize(quote((a*x+a)^2),2);
                    833:      $B=PNO(B: ((a^2)*(x)*(x))+((2*a^2)*(x))+(a^2)
                    834: qt_normalize(B+B,2);
                    835:      $B=PNO(B: ((2*a^2)*(x)*(x))+((4*a^2)*(x))+(2*a^2)
1.6       takayama  836: @end example
                    837:
                    838: @table @t
                    839: @item $B;2>H(B
1.34      ohara     840: @ref{qt_normalize}
1.6       takayama  841: @end table
                    842:
                    843: @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     844: @comment --- openxm $B$N30It$+$i$N4sM?$b=R$Y$k(B. Credit.
1.6       takayama  845: @noindent
                    846: ChangeLog
                    847: @itemize @bullet
1.34      ohara     848: @item -----$B$^$@=q$$$F$J$$(B.
1.6       takayama  849: @end itemize
                    850:
1.34      ohara     851:
                    852: @node qt_set_ord,,, $B%/%*!<%H(B
                    853: @subsection @code{qt_set_ord}
                    854: @findex qt_set_ord
1.6       takayama  855:
                    856: @comment --- $B4X?t$N4JC1$J@bL@(B ---
1.34      ohara     857: @comment --- @itemx $B$OJ#?t$KBP$7$F@bL@$r0l$D$D$1$k>l9g$K;H$&(B ---
1.6       takayama  858: @table @t
1.34      ohara     859: @item qt_set_ord(@var{VarList})
                    860: :: @var{VarList} $B$rJQ?t=g=x$H$9$k(B.
1.6       takayama  861: @end table
                    862:
                    863: @table @var
                    864: @item return
1.34      ohara     865: $B%j%9%H(B
                    866: @item VarList
                    867: $B%j%9%H(B
1.6       takayama  868: @end table
                    869:
                    870: @itemize @bullet
1.34      ohara     871: @item @var{VarList} $B$r<-=q<0$KMQ$$$?JQ?t=g=x$r0J2<;HMQ$9$k(B.
                    872: @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.
                    873: @var{VarList} $B$K8=$l$J$$JQ?t$K$D$$$F$O$3$N=g=x$,E,MQ$5$l$k(B.
                    874: @item qt_normalize $B$*$h$S$=$N5!G=$rMQ$$$k4X?t$,$3$N5!G=$N1F6A$r<u$1$k(B.
                    875: @item qt_comp $B4X?t$,$3$N5!G=$N1F6A$r<u$1$k(B.
1.6       takayama  876: @end itemize
                    877:
                    878: @example
1.34      ohara     879: ctrl("print_quote",2);
                    880: qt_normalize(quote(x+y),2);
                    881:      $B=PNO(B: (x)+(y)
                    882: qt_set_ord([y,x]);
                    883:      $B=PNO(B: [y,x,z,u,v,w,p,q,r,s,t,a,b,c,d,e,f,g, $B0J2<>JN,(B ]
                    884: qt_normalize(quote(x+y),2);
                    885:      $B=PNO(B: (y)+(x)
1.6       takayama  886: @end example
                    887:
                    888: @table @t
                    889: @item $B;2>H(B
1.34      ohara     890: @ref{qt_normalize},
                    891: @ref{nqt_comp}
1.6       takayama  892: @end table
                    893:
                    894: @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     895: @comment --- openxm $B$N30It$+$i$N4sM?$b=R$Y$k(B. Credit.
1.6       takayama  896: @noindent
                    897: ChangeLog
                    898: @itemize @bullet
1.34      ohara     899: @item -----$B$^$@=q$$$F$J$$(B.
1.6       takayama  900: @end itemize
                    901:
1.8       takayama  902:
1.34      ohara     903: @node qt_set_weight,,, $B%/%*!<%H(B
                    904: @subsection @code{qt_set_weight}
                    905: @findex qt_set_weight
1.8       takayama  906:
1.34      ohara     907: @comment --- $B4X?t$N4JC1$J@bL@(B ---
                    908: @comment --- @itemx $B$OJ#?t$KBP$7$F@bL@$r0l$D$D$1$k>l9g$K;H$&(B ---
1.8       takayama  909: @table @t
1.34      ohara     910: @item qt_set_weight(@var{WeightVector})
                    911: :: $BJQ?t$K$D$$$F(B weight $B%Y%/%H%k$r@_Dj$9$k(B.
1.8       takayama  912: @end table
                    913:
                    914: @table @var
                    915: @item return
1.34      ohara     916: $B%j%9%H(B
                    917: @item WeightVector
                    918: $B%j%9%H(B
1.8       takayama  919: @end table
                    920:
1.34      ohara     921: fnode f $B$N(B weight w(f) $B$O<!$N<0$G7W;;$9$k(B.
                    922: @example
                    923:  f $B$,MU$N>l9g$O86B'(B 0. qt_weight_vector $B$G(B weight $B$,M?$($i$l$F$$$kITDj85$K(B
                    924:  $B$D$$$F$O$=$NCM(B.
                    925:
                    926:  f $B$,(Bnode$B$N>l9g$O<!$N5,B'$G:F5"E*$K$-$a$k(B.
                    927:    w(f+g) = max(w(f),w(g))
                    928:    w(f g) = w(f) + w(g)
                    929:    w(f^n) = n w(f)
                    930:    $B4X?t$K$D$$$F$O(B? -----$B$^$@=q$$$F$J$$(B.
                    931: @end example
                    932:
1.8       takayama  933: @itemize @bullet
1.34      ohara     934: @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.
                    935: @var{WeightVector} $B$K8=$l$J$$JQ?t$K$D$$$F$N(B weight $B$O(B 0 $B$H$J$k(B.
                    936: @item qt_normalize $B$*$h$S$=$N5!G=$rMQ$$$k4X?t$,$3$N5!G=$N1F6A$r<u$1$k(B.
                    937: qt_normalize $B$G$NE83+$G$O(B, $B$3$N=g=x$rMQ$$$F9`$,%=!<%H$5$l$k(B.
                    938: @item qt_comp $B$*$h$S$=$N5!G=$rMQ$$$k4X?t$,$3$N5!G=$N1F6A$r<u$1$k(B.
                    939: @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  940: @end itemize
                    941:
                    942: @example
1.34      ohara     943: ctrl("print_quote",2);
                    944: qt_set_weight([[x,-1],[y,-1]]);
                    945:      $B7k2L(B: [[x,-1],[y,-1]]
                    946: qt_normalize(quote( 1+(x+y)+(x+y)^2),1);
                    947:      $B7k2L(B: (1)+(y)+(x)+((y)^(2))+((y)*(x))+((x)^(2))+((x)*(y))
1.8       takayama  948: @end example
                    949:
                    950: @table @t
                    951: @item $B;2>H(B
1.34      ohara     952: @ref{qt_normalize},
                    953: @ref{qt_set_ord},
                    954: @ref{qt_set_weight},
                    955: @ref{dp_gr_main}
1.8       takayama  956: @end table
                    957:
                    958: @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
                    959: @comment --- openxm $B$N30It$+$i$N4sM?$b=R$Y$k(B. Credit.
                    960: @noindent
                    961: ChangeLog
                    962: @itemize @bullet
1.34      ohara     963: @item -----$B$^$@=q$$$F$J$$(B.
1.8       takayama  964: @end itemize
                    965:
                    966:
1.34      ohara     967: @node nqt_comp,,, $B%/%*!<%H(B
                    968: @subsection @code{nqt_comp}
                    969: @findex nqt_comp
                    970:
                    971: @comment --- $B4X?t$N4JC1$J@bL@(B ---
                    972: @comment --- @itemx $B$OJ#?t$KBP$7$F@bL@$r0l$D$D$1$k>l9g$K;H$&(B ---
1.8       takayama  973: @table @t
1.34      ohara     974: @item nqt_cmp(@var{Expr1},@var{Exprt2})
                    975: :: @var{Expr1} $B$H(B @var{Expr2} $B$N=g=x$rHf3S$9$k(B.
1.8       takayama  976: @end table
                    977:
                    978: @table @var
                    979: @item return
1.34      ohara     980: $B@0?t(B
                    981: @item Expr1, Expr2
                    982: quote$B7?(B
1.8       takayama  983: @end table
                    984:
                    985: @itemize @bullet
1.34      ohara     986: @item @var{Expr1} $B$H(B @var{Expr2} $B$N=g=x$rHf3S$9$k(B.
                    987: @item @var{Expr1} > @var{Exprt2} $B$J$i(B 1.
                    988: @item @var{Expr1} < @var{Exprt2} $B$J$i(B -1.
                    989: @item @var{Expr1} = @var{Exprt2} ($B$*$J$8=g=x(B) $B$J$i(B 0.
1.8       takayama  990: @end itemize
                    991:
                    992: @example
1.34      ohara     993: ctrl("print_quote",2);
                    994: qt_set_ord([y,x]); qt_set_weight([[x,-1],[y,-1]]);
                    995: [nqt_comp(`x,`y), nqt_comp(`y,`x), nqt_comp(`x,`x)];
                    996:      $B=PNO(B: [-1,1,0]
1.8       takayama  997: @end example
                    998:
                    999: @table @t
                   1000: @item $B;2>H(B
1.34      ohara    1001: @ref{qt_normalize},
                   1002: @ref{qt_set_ord},
                   1003: @ref{qt_set_weight}
1.8       takayama 1004: @end table
                   1005:
                   1006: @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
                   1007: @comment --- openxm $B$N30It$+$i$N4sM?$b=R$Y$k(B. Credit.
                   1008: @noindent
                   1009: ChangeLog
                   1010: @itemize @bullet
1.34      ohara    1011: @item $B$^$@=q$$$F$J$$(B.
1.8       takayama 1012: @end itemize
1.34      ohara    1013: @comment ****************************************************************
1.8       takayama 1014:
1.34      ohara    1015: @node qt_is_var,,, $B%/%*!<%H(B
                   1016: @subsection @code{qt_is_var}, @code{qt_is_coef}
                   1017: @findex qt_is_var
                   1018: @findex qt_is_coef
1.9       takayama 1019:
                   1020: @comment --- $B4X?t$N4JC1$J@bL@(B ---
1.34      ohara    1021: @comment --- @itemx $B$OJ#?t$KBP$7$F@bL@$r0l$D$D$1$k>l9g$K;H$&(B ---
1.9       takayama 1022: @table @t
1.34      ohara    1023: @item qt_is_var(@var{Expr})
                   1024: :: @var{Expr} $B$,ITDj85$KBP1~$9$k(B quote $B$J$i(B 1 $B$rLa$9(B.
                   1025: @item qt_is_coef(@var{Expr})
                   1026: :: @var{Expr} $B$,78?t$NM-M}4X?tBN$KB0$9$k$H$-(B 1 $B$rLa$9(B.
1.9       takayama 1027: @end table
                   1028:
                   1029: @table @var
                   1030: @item return
                   1031: $B@0?t(B
1.34      ohara    1032: @item Expr
                   1033: quote$B7?(B
1.9       takayama 1034: @end table
                   1035:
                   1036: @itemize @bullet
1.34      ohara    1037: @item  @var{Expr} $B$,ITDj85$KBP1~$9$k(B quote $B$J$i(B 1 $B$rLa$9(B.
                   1038: $B$=$&$G$J$$$H$-(B 0 $B$rLa$9(B.
1.9       takayama 1039: @end itemize
                   1040:
                   1041: @example
1.34      ohara    1042: [qt_is_var(quote(x)), qt_is_var(quote(3/2))];
                   1043:      $B=PNO(B: [1,0]
1.9       takayama 1044: @end example
                   1045:
                   1046: @table @t
                   1047: @item $B;2>H(B
1.34      ohara    1048: @ref{qt_rewrite},
                   1049: @ref{nqt_match_rewrite}
1.9       takayama 1050: @end table
                   1051:
1.34      ohara    1052: @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
                   1053: @comment --- openxm $B$N30It$+$i$N4sM?$b=R$Y$k(B. Credit.
1.9       takayama 1054: @noindent
                   1055: ChangeLog
                   1056: @itemize @bullet
1.34      ohara    1057: @item -----$B$^$@=q$$$F$J$$(B.
1.9       takayama 1058: @end itemize
1.34      ohara    1059: @comment ****************************************************************
1.8       takayama 1060:
1.34      ohara    1061: @node qt_rewrite,,, $B%/%*!<%H(B
                   1062: @subsection @code{qt_rewrite}
                   1063: @findex qt_rewrite
1.12      takayama 1064:
                   1065: @comment --- $B4X?t$N4JC1$J@bL@(B ---
1.34      ohara    1066: @comment --- @itemx $B$OJ#?t$KBP$7$F@bL@$r0l$D$D$1$k>l9g$K;H$&(B ---
1.12      takayama 1067: @table @t
1.34      ohara    1068: @item qt_rewrite(@var{Expr},@var{Rules},@var{Mode})
                   1069: :: @var{Expr} $B$r5,B'=89g(B @var{Rules} $B$rMQ$$$F=q$-49$($k(B.
1.12      takayama 1070: @end table
                   1071:
                   1072: @table @var
                   1073: @item return
1.34      ohara    1074: quote$B7?(B
                   1075: @item Expr
                   1076: quote$B7?(B
                   1077: @item Rules
                   1078: $B%j%9%H(B
                   1079: @item Mode
1.12      takayama 1080: $B@0?t(B
                   1081: @end table
                   1082:
                   1083: @itemize @bullet
1.34      ohara    1084: @item $B%f!<%68@8l$rMQ$$$FDj5A$5$l$?4X?t(B.
                   1085: @code{import("noro_rewrite.rr")}  $B$7$F$*$/$3$H(B.
                   1086: (noro_rewrite.rr $B$,(B OpenXM/lib/asir-contrib $B$KB8:_$7$J$$>l9g(B
                   1087: $B%=!<%9$N(B OpenXM/src/asir-contrib/testing/noro/new_rewrite.rr $B$r%3%T!<(B)
                   1088: @item @var{Expr} $B$r5,B'=89g(B @var{Rules} $B$rMQ$$$F=q$-49$($k(B.
                   1089: @item $B5,B'$NE,MQ$O(B fnode$BLZ$KBP$7$F:F5"E*$G$"$k(B.
                   1090:  $B0lJ}(B @code{nqt_match_rewrite} $B$G$O%H%C%W%l%Y%k$N$_$K5,B'$,E,MQ$5$l$k(B.
                   1091: @item $B5,B'=89g(B @var{Rules} $B$N3FMWAG$N=q$-J}$O(B @code{nqt_match()} $B$N(B
                   1092: @var{Pattern} $B$HF1$8=q$-J}(B.
                   1093: $B$D$^$j(B [$B%Q%?!<%s(B, $B=q$-49$(7k2L(B] $B$^$?$O(B
                   1094: [$B%Q%?!<%s(B, $B>r7o(B, $B=q$-49$(7k2L(B].
                   1095: @item @var{Mode} $B$N0UL#$O(B @ref{qt_normalize} $B$N(B @var{Mode} $B$HF1MM(B.
                   1096: $B%Q%?!<%s%^%C%A(B, $B=q$-49$($O(B @var{Mode} $B$G(B @code{qt_normalize()}
                   1097: $B$5$l$F$+$i?k9T$5$l$k(B.
1.12      takayama 1098: @end itemize
                   1099:
1.34      ohara    1100: $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
                   1101:            $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,
                   1102:            $B=g=x$,Bg$-$/$J$k>l9g$N$_$K=q$-49$($k$Y$-$G$"$k(B.
                   1103: @example
                   1104: import("noro_rewrite.rr");
                   1105: R=[[`X*Y,`nqt_comp(Y*X,X*Y)>0, `Y*X]];
                   1106: qt_rewrite(`(x-y)^2,R,2);
                   1107:      $B=PNO(B: quote(x*x+-2*x*y+y*y)
                   1108: @end example
                   1109:
                   1110: $B30@QBe?t$N7W;;(B (asir-contrib $B$r%m!<%I$7$?>uBV(B).
                   1111: @example
                   1112: import("noro_rewrite.rr");
                   1113: Rext0=[quote(X*Y),quote(qt_is_var(X) && qt_is_var(Y) && nqt_comp(Y,X)>0),
                   1114:                   quote(-Y*X)];
                   1115: Rext1=[quote(X^N),quote(eval_quote(N)>=2),quote(0)];
                   1116: Rext2=[quote(X*X),quote(0)];
                   1117: Rext=[Rext0,Rext1,Rext2];
                   1118: qt_rewrite(quote( (x+2*y)*(x+4*y) ), Rext,1);
                   1119:      $B=PNO(B: 2*x*y
                   1120:
                   1121: qt_set_coef([a,b,c,d]);
                   1122: qt_rewrite(quote((a*x+b*y)*(c*x+d*y)), Rext,1);
                   1123:      $B=PNO(B: (d*a-c*b)*x*y
                   1124:
                   1125: @end example
                   1126:
                   1127: $BHyJ,$N7W;;(B (asir-contrib $B$r%m!<%I$7$?>uBV(B).
1.12      takayama 1128: @example
1.34      ohara    1129: import("noro_rewrite.rr");
                   1130: qt_set_coef([a,b]);
                   1131: Rd1=[`d(X+Y), `d(X)+d(Y)];
                   1132: Rd2=[`d(X*Y),`d(X)*Y+X*d(Y)];
                   1133: Rd3=[`d(N), `qt_is_coef(N), `0];
                   1134: Rd4=[`d(x),`1];
                   1135: Rd=[Rd1,Rd2,Rd3,Rd4];
                   1136: B=qt_rewrite( `d( (a*x+b)^3),Rd,2);
                   1137:      $B=PNO(B: quote(3*a^3*x*x+6*b*a^2*x+3*b^2*a)
                   1138: fctr(eval_quote(B));
                   1139:      $B=PNO(B: [[3,1],[a,1],[a*x+b,2]]
1.12      takayama 1140: @end example
                   1141:
                   1142: @table @t
                   1143: @item $B;2>H(B
1.34      ohara    1144: @ref{nqt_match},
                   1145: @ref{nqt_match_rewrite},
                   1146: @ref{qt_normalize}
1.12      takayama 1147: @end table
                   1148:
                   1149: @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    1150: @comment --- openxm $B$N30It$+$i$N4sM?$b=R$Y$k(B. Credit.
1.12      takayama 1151: @noindent
                   1152: ChangeLog
                   1153: @itemize @bullet
1.34      ohara    1154: @item qt $B7O$N4X?t$N867?$O(B OpenXM/src/asir-contrib/testing/tr.rr $B$G$"$k(B.
                   1155: $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
                   1156: qt $B7O$N4X?t$,3+H/$5$l$?(B.
                   1157: @item qt $B7O$N4X?t$K$D$$$F$N$=$NB>$N;29MJ88%(B:
                   1158:   OpenXM/doc/Papers/2005-rims-noro.tex $B$*$h$S(B
                   1159:   OpenXM/doc/Papers/2005-rims-noro.tm (TeXmacs$B$N5-;v(B).
                   1160: @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 1161: @end itemize
                   1162:
1.34      ohara    1163: @comment ****************************************************************
                   1164:
                   1165: @node $BJ8;zNs=hM}(B,,, $B<B83E*;EMM$N4X?t(B
                   1166: @section $BJ8;zNs=hM}(B
1.13      takayama 1167:
1.34      ohara    1168: @comment --- $B"~"~"~"~(B  $B4X?t(B copyright $B$N@bL@(B $B"~"~"~"~(B
                   1169: @node copyright,,, $BJ8;zNs=hM}(B
                   1170: @subsection @code{copyright}
                   1171: @findex copyright
1.13      takayama 1172:
                   1173: @comment --- $B4X?t$N4JC1$J@bL@(B ---
                   1174: @table @t
1.34      ohara    1175: @item copyright()
                   1176: :: Risa/Asir $B$N(B copyright $BI=<($rJ8;zNs$H$7$FLa$9(B.
1.13      takayama 1177: @end table
                   1178:
                   1179: @table @var
                   1180: @item return
1.34      ohara    1181: $BJ8;zNs(B
1.13      takayama 1182: @end table
                   1183:
                   1184: @itemize @bullet
                   1185: @item
1.34      ohara    1186: Risa/Asir $B$N(B copyright $BI=<($rJ8;zNs$H$7$FLa$9(B.
1.13      takayama 1187: @end itemize
                   1188:
                   1189: @example
1.34      ohara    1190: [1150] copyright();
                   1191: This is Risa/Asir, Version 20040312 (Kobe Distribution).
                   1192: Copyright (C) 1994-2000, all rights reserved, FUJITSU LABORATORIES LIMITED.
                   1193: Copyright 2000-2003, Risa/Asir committers, http://www.openxm.org/.
                   1194: GC 6.2(alpha6) copyright 1988-2003, H-J. Boehm, A. J. Demers, Xerox, SGI, HP.
                   1195: PARI 2.0.17, copyright 1989-1999, C. Batut, K. Belabas, D. Bernardi,
                   1196:    H. Cohen and M. Olivier.
1.13      takayama 1197: @end example
                   1198:
1.34      ohara    1199: @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 1200: @noindent
                   1201: ChangeLog
                   1202: @itemize @bullet
1.34      ohara    1203: @item $B$3$N4X?t$O(B texmacs $BMQ$K=q$+$l$?(B (2004-03).
                   1204: @item OpenXM_contrib2/asir2000 $B$N2<$N0J2<$N%U%!%$%k$r$_$h(B. builtin/miscf.c 1.21,
                   1205:       parse/glob.c 1.47.
                   1206: @end itemize
                   1207:
                   1208:
                   1209:
                   1210: @comment --- $B"~"~"~"~(B  $B4X?t(B string_to_tb, ... $B$N@bL@(B $B"~"~"~"~(B
                   1211: @comment --- $BJ#?t$N4X?t$r$^$H$a$F@bL@$9$kNc(B ---
                   1212: @node string_to_tb tb_to_string write_to_tb,,, $BJ8;zNs=hM}(B
                   1213: @subsection @code{string_to_tb}, @code{tb_to_string}, @code{write_to_tb}
                   1214: @findex string_to_tb
                   1215: @findex tb_to_string
                   1216: @findex write_to_tb
                   1217:
                   1218: @comment --- $B4X?t$N4JC1$J@bL@(B ---
                   1219: @comment --- @itemx $B$OJ#?t$KBP$7$F@bL@$r0l$D$D$1$k>l9g$K;H$&(B ---
                   1220: @table @t
                   1221: @item string_to_tb(@var{s})
                   1222: @itemx tb_to_string(@var{tb})
                   1223: @itemx write_to_tb(@var{s},@var{tb})
                   1224: :: $BJ8;zNs2DJQD9G[Ns7?(B(text buffer)$B$N%G!<%?$N=hM}(B
                   1225: @end table
                   1226:
                   1227: @table @var
                   1228: @item return
                   1229: $BJ8;zNs2DJQD9G[Ns7?(B(string_to_tb), $BJ8;zNs7?(B(tb_to_string)
                   1230: @item s
                   1231: $BJ8;zNs(B
                   1232: @item tb
                   1233: $BJ8;zNs2DJQD9G[Ns7?(B
                   1234: @end table
                   1235:
                   1236: @itemize @bullet
                   1237: @item
                   1238: @code{string_to_tb(@var{s})} $B$O(B, $BJ8;zNs(B @var{s} $B$r$O$8$a$NMWAG$H$9$k(B
                   1239: $BJ8;zNs2DJQD9G[Ns7?%*%V%8%'%/%H$r@8@.$9$k(B.
                   1240: @item
                   1241: @code{tb_to_string_(@var{tb})} $B$O(B,
                   1242: $BJ8;zNs2DJQD9G[Ns7?%*%V%8%'%/%H(B @var{tb} $B$+$iDL>o$NJ8;zNs%*%V%8%'%/%H$r@8@.$9$k(B.
                   1243: @item
                   1244: @code{write_to_tb(@var{s},@var{tb})} $B$O(B, $BJ8;zNs(B @var{s} $B$r(B
                   1245: $BJ8;zNs2DJQD9G[Ns7?%*%V%8%'%/%H(B @var{tb} $B$X=q$-=P$9(B.
                   1246: @item @var{SS} $B$rJ8;zNsJQ?t$H$9$k$H$-(B,
                   1247: @var{SS} += "$BJ8;zNs(B" $B$G(B @var{SS} $B$XJ8;zNs$r=q$-B-$7$F$$$/$3$H$,$G$-$k$,(B,
                   1248: $BL5BL$J%a%b%j$rBgNL$K>CHq$9$k(B.
                   1249: $BBe$j$K4X?t(B @code{write_to_tb} $B$rMQ$$$k$Y$-$G$"$k(B.
                   1250: $BJ8;zNs2DJQD9G[Ns7?%*%V%8%'%/%H$OJ8;zNs$N2DJQD9$NG[Ns$G$"$j%a%b%j4IM}$KM%$7$$(B
                   1251: $B%G!<%?9=B$$G$"$k(B.
                   1252: @end itemize
                   1253:
                   1254: @example
                   1255: [219] T=string_to_tb("");
                   1256:
                   1257: [220] write_to_tb("Hello",T);
                   1258: 0
                   1259: [221] write_to_tb(" world!",T);
                   1260: 0
                   1261: [222] tb_to_string(T);
                   1262: Hello world!
                   1263: @end example
                   1264:
                   1265:
                   1266: @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
                   1267: @noindent
                   1268: ChangeLog
                   1269: @itemize @bullet
                   1270: @item
                   1271:  $B$3$N4X?t$O(B 2004-3 $B$K(B print_tex_form $B$r8zN(2=$9$k$?$a$K=q$+$l$?(B.
                   1272: @item
                   1273:  OpenXM_contrib2/asir2000 $B$N2<$N0J2<$N%U%!%$%k$r8+$h(B.
                   1274: io/ox_asir.c 1.52, builtin/strobj.c 1.12--1.13, 1.16,
                   1275: engine/str.c 1.5, parse/quote.c 1.9.
1.13      takayama 1276: @item
1.34      ohara    1277:  rtostr $B$,(B text buffer $B7?$N%G!<%?$K4X$7$F$*$=$+$C$?(B. $BB.EY$N2~A1$O(B
                   1278:  asir2000/io/pexpr_body.c 1.2, asir2000/parse/lex.c 1.32.
1.14      takayama 1279: @end itemize
                   1280:
1.34      ohara    1281:
                   1282: @node set_print_function,,, $BJ8;zNs=hM}(B
                   1283: @subsection @code{set_print_function}
                   1284: @findex set_print_function
1.14      takayama 1285:
                   1286: @comment --- $B4X?t$N4JC1$J@bL@(B ---
                   1287: @table @t
1.34      ohara    1288: @item set_print_function([@var{fname}])
                   1289: :: $B2hLLI=<(MQ$N4X?t$rEPO?(B
1.14      takayama 1290: @end table
                   1291:
                   1292: @table @var
                   1293: @item return
1.34      ohara    1294: $B@0?t(B
                   1295: @item fname
                   1296: $BJ8;zNs(B
1.14      takayama 1297: @end table
                   1298:
                   1299: @itemize @bullet
1.34      ohara    1300: @item
                   1301: @code{set_print_function} $B$O(B @code{fname(F)} $B$rDL>o$N2hLLI=<(4X?t$NBe$o$j$K$h$V(B.
                   1302: @code $B0z?t$,$J$$>l9g$O2hLLI=<(4X?t$r%G%U%)!<%k%H$XLa$9(B.
                   1303: @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 1304: @end itemize
                   1305:
                   1306: @example
1.34      ohara    1307: [219] def my_output(F) @{
                   1308:            print("Out: ",0); print(rtostr(F));
                   1309:       @}
                   1310: [220] set_print_function("my_output");
                   1311: Out: 0
                   1312: [221]  1+2;
                   1313: Out: 3
1.14      takayama 1314: @end example
                   1315:
                   1316: @table @t
                   1317: @item $B;2>H(B
1.34      ohara    1318: @ref{rtostr}
1.14      takayama 1319: @end table
                   1320:
                   1321: @noindent
                   1322: ChangeLog
                   1323: @itemize @bullet
1.34      ohara    1324: @item $B$3$N4X?t$O(B 2001-9-4 $B$K(B asir-contrib $B$N$?$a$KF3F~$5$l$?(B.
                   1325:  $BJQ99$r$&$1$?%=!<%9%3!<%I$O(B builtin/print.c 1.11 $B$G$"$k(B.
1.12      takayama 1326: @end itemize
1.13      takayama 1327:
1.15      takayama 1328:
1.34      ohara    1329: @node sprintf,,, $BJ8;zNs=hM}(B
1.28      ohara    1330: @subsection @code{printf}, @code{fprintf}, @code{sprintf}
1.15      takayama 1331: @findex sprintf
                   1332:
                   1333: @table @t
1.27      ohara    1334: @item printf(@var{format}[,@var{args}])
1.28      ohara    1335: @item fprintf(@var{fd},@var{format}[,@var{args}])
1.15      takayama 1336: @item sprintf(@var{format}[,@var{args}])
                   1337: :: C $B$K;w$?%W%j%s%H4X?t(B
                   1338: @end table
                   1339:
                   1340: @table @var
                   1341: @item return
1.28      ohara    1342: $B@0?t(B(printf,fprintf), $BJ8;zNs(B(sprintf)
1.15      takayama 1343: @item format
                   1344: $BJ8;zNs(B
1.28      ohara    1345: @item fd
                   1346: $BHsIi@0?t(B($B%U%!%$%k5-=R;R(B)
1.15      takayama 1347: @item args
                   1348: $B%*%V%8%'%/%H(B
                   1349: @end table
                   1350:
                   1351: @itemize @bullet
                   1352: @item
1.27      ohara    1353: @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 1354: @item
1.28      ohara    1355: @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.
                   1356: @item
1.27      ohara    1357: @code{sprintf} $B$O7k2L$rJ8;zNs$GJV$7(B, $BI8=`=PNO$K$O=q$-=P$5$J$$(B.
                   1358: @item
                   1359: $B=q<0J8;zNs$NCf$G(B @code{%a} (any) $B$,MxMQ2DG=(B.
                   1360: @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    1361: @item
                   1362: $B%U%!%$%k5-=R;R$O(B, @code{open_file} $B4X?t$rMQ$$$FF@$k$3$H(B.
1.15      takayama 1363: @end itemize
                   1364:
                   1365: @example
1.27      ohara    1366: [0] printf("%a: rat = %a\n",10,x^2-1)$
                   1367: 10: rat = x^2-1
                   1368: [1] S=sprintf("%a: rat = %a",20,x^2-1)$
                   1369: [2] S;
                   1370: 20: rat = x^2-1
1.28      ohara    1371: [3] Fd=open_file("hoge.txt","w");
                   1372: 0
                   1373: [4] fprintf(Fd,"Poly=%a\n",(x-1)^3)$
                   1374: [5] close_file(Fd)$
                   1375: [6] quit;
                   1376:
                   1377: $ cat hoge.txt
                   1378: Poly=x^3-3*x^2+3*x-1
1.15      takayama 1379: @end example
                   1380:
                   1381: @table @t
                   1382: @item $B;2>H(B
1.28      ohara    1383: @ref{rtostr},@ref{open_file},@ref{close_file}
1.15      takayama 1384: @end table
                   1385:
                   1386: @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
                   1387: @comment --- openxm $B$N30It$+$i$N4sM?$b=R$Y$k(B. Credit.
                   1388: @noindent
                   1389: ChangeLog
                   1390: @itemize @bullet
1.34      ohara    1391: @item
1.27      ohara    1392:  $B4X?t(B sprintf$B$O(B 2004-7-13 $B$K%3%_%C%H$5$l$?(B.
1.15      takayama 1393:  $BJQ99$r$&$1$?%=!<%9%3!<%I$O(B builtin/strobj (1.50) $B$G$"$k(B.
1.34      ohara    1394: @item
1.27      ohara    1395:  $B4X?t(B printf$B$O(B 2007-11-8 $B$K%3%_%C%H$5$l$?(B.
                   1396:  $BJQ99$r$&$1$?%=!<%9%3!<%I$O(B builtin/print.c (1.23) $B$G$"$k(B.
1.34      ohara    1397: @item
1.28      ohara    1398:  $B4X?t(B fprintf$B$O(B 2008-11-18 $B$K%3%_%C%H$5$l$?(B.
                   1399:  $BJQ99$r$&$1$?%=!<%9%3!<%I$O(B builtin/file.c (1.25) $B$G$"$k(B.
1.34      ohara    1400: @item
1.15      takayama 1401:  @code{%a} $B$O(B Maple $B$N(B sprintf $B$N??;w$+(B.
                   1402: @end itemize
                   1403:
                   1404:
1.34      ohara    1405: @node $B%0%l%V%J!<4pDl(B,,, $B<B83E*;EMM$N4X?t(B
                   1406: @section $B%0%l%V%J!<4pDl(B
                   1407:
                   1408: @comment --- $B"~"~"~"~(B  $B4X?t(B dp_gr_main $B$N@bL@(B $B"~"~"~"~(B
                   1409: @comment --- $BJ#?t$N4X?t$r$^$H$a$F@bL@$9$kNc(B ---
                   1410: @node dp_gr_main,,, $B%0%l%V%J!<4pDl(B
                   1411: @subsection @code{dp_gr_main}
                   1412: @findex dp_gr_main
1.15      takayama 1413:
1.34      ohara    1414: @comment --- $B4X?t$N4JC1$J@bL@(B ---
                   1415: @comment --- @itemx $B$OJ#?t$KBP$7$F@bL@$r0l$D$D$1$k>l9g$K;H$&(B ---
1.15      takayama 1416: @table @t
1.34      ohara    1417: @item dp_gr_main(@var{f} | v=@var{vv}, order=@var{oo}, homo=@var{n}, matrix=@var{m}, block=@var{b}, sugarweight=@var{sw})
                   1418: :: dp_gr_main $B$N?7$7$$%$%s%?%U%'!<%9(B.
1.15      takayama 1419: @end table
                   1420:
                   1421: @table @var
                   1422: @item return
1.34      ohara    1423: $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 1424: @item f
1.34      ohara    1425: $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)
                   1426: @item vv
                   1427: $B%j%9%H(B  ($BJQ?t$N%j%9%H(B)
                   1428: @item oo
                   1429: $B%j%9%H(B  ($B=g=x$r$"$i$o$9%j%9%H(B)
                   1430: @item n
                   1431: 0 $B$+(B1 (homogenization $B$r$9$k$+(B)
                   1432: @item m
                   1433: $B=g=x$r(B matrix $B$GI=8=$9$k>l9g(B (cf. dp_ord).
                   1434: @item b
                   1435: ???
                   1436: @item sw
                   1437: Sugar strategy $B$rE,MQ$9$k$H$-$N(B weight vector. $BA4$F$NMWAG$OHsIi(B.
1.15      takayama 1438: @end table
                   1439:
                   1440: @itemize @bullet
                   1441: @item
1.34      ohara    1442:  @code{dp_gr_main(@var{f})} $B$O(B, @var{f} $B$N%0%l%V%J4pDl$r7W;;$9$k(B.
                   1443:  $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
                   1444:  $B7OE}$@$C$F$$$J$+$C$?(B.
                   1445:  dp_gr_main $B$N?7$7$$%$%s%?%U%'!<%9$G$O=g=x$r$"$kJ8K!$K=>$$;XDj$9$k(B.
                   1446: @comment  ~taka/this03/misc-2003/A2/dp
                   1447: @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.
                   1448: @example
                   1449:   order         : '[' orderElement @{ ',' orderElement @} ']'
                   1450:   orderElement   :  weightVec | builtinOrder
                   1451:   weightVec     : '[' weightElement @{ ',' weightElement @} ']'
                   1452:   builtiniOrder : '[' orderName  ',' setOfVariables ']'
                   1453:   weightElement :   NUMBER | setOfVariables ',' NUMBER
                   1454:   setOfVariables:  V | range(V,V)
                   1455:   orderName    : @@grlex | @@glex | @@lex
                   1456: @end example
                   1457: $B$3$3$G(B @code{V} $B$O(B $BJQ?tL>(B, @code{NUMBER} $B$O@0?t$r$"$o$i$9(B.
                   1458: $BNc(B1:  @code{v=[x,y,z,u,v], order=[[x,10,y,5,z,1],[@@grlex,range(x,v)]]}
                   1459: $B$O(B @code{x},@code{y},@code{z} $B$,$=$l$>$l(B weight 10, 5, 1 $B$r$b$D(B
                   1460: $B=g=x$GHf3S$7$?$"$H(B, @code{[x,y,z,u,v]} $B$K$D$$$F$N(B
                   1461: graded reverse lexicographic order $B$r(B tie-breaker $B$H$7$FMQ$$$k$3$H$r0UL#$9$k(B.
                   1462: $B;29M=q(B: B.Sturmfels: Gr\"obner Bases and Convex Polytopes (1995).
                   1463: M.Saito, B.Sturmfels, N.Takayama:
                   1464: Gr\"obner Deformations of Hypergeometric Differential Equations (2000).
                   1465: @item
                   1466:   $B=g=xMWAG(B (orderElement) $B$N;XDjJ}K!$O(B
                   1467:  (1) $BJQ?tL>$^$?$O(B range$B$G;XDj$5$l$?JQ?t$N=89g$H=E$_$NCM$N7+$jJV$7(B
                   1468:  (2) $B=E$_$NCM$rJQ?t%j%9%H$N=gHV$KJB$Y$kJ}K!(B
                   1469:  (3) $BJQ?tL>$^$?$O(B range$B$G;XDj$5$l$?JQ?t$N=89g$H=g=xL>$NAH(B
                   1470:  $B$N;0DL$j$N4pACE*J}K!$,$"$k(B.
                   1471:  $B;w$?;XDjJ}K!$,(B Macaulay, Singular, CoCoA, Kan/sm1 $BEy$N4DO@%7%9%F%`$G(B
                   1472:  $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
                   1473:  $B$5$i$K2~NI$r2C$($?$b$N$G=@Fp@-$,9b$$(B.
                   1474: @item
                   1475:   order $B$N(B tie-breaker $B$O(B grlex $B$,%G%U%)!<%k%H(B.
1.15      takayama 1476: @item
1.34      ohara    1477:   $BJ,;6I=8=B?9`<0$r0z?t$H$7$?$H$-$O7k2L$bJ,;6I=8=B?9`<0$H$7$FLa$k(B.
                   1478:   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 1479: @item
1.34      ohara    1480:   $B%*%W%7%g%s$NCM$O(B option_list $B%-!<%o!<%I$rMQ$$$F%j%9%H$GM?$($F$b$h$$(B.
                   1481:   $B2<$NNc$r;2>H(B.
1.15      takayama 1482: @end itemize
                   1483:
                   1484: @example
1.34      ohara    1485: [218] load("cyclic");
                   1486: [219] V=vars(cyclic(4));
                   1487: [c0,c1,c2,c3]
                   1488: [220]dp_gr_main(cyclic(4) | v=V, order=[[c0,10,c1,1],[c2,5],[@@grlex,range(c0,c3)]]);
                   1489: [ 10 1 0 0 ]
                   1490: [ 0 0 5 0 ]
                   1491: [ R R R R ]
                   1492: [(-c3^6+c3^2)*c2^2+c3^4-1,c3^2*c2^3+c3^3*c2^2-c2-c3,
                   1493:  (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,
                   1494:  c0+c1+c2+c3]
1.15      takayama 1495:
1.34      ohara    1496: [1151]  F=map(dp_ptod,katsura(4), vars(katsura(4)));
                   1497: [(1)*<<1,0,0,0,0>>+(2)*<<0,1,0,0,0>>+ ... ]
                   1498: [1152] dp_gr_main(F | order=[[range(x0,x3),1]]);
                   1499: [ 1 1 1 1 0 ]
                   1500: [ R R R R R ]
                   1501: [(47774098944)*<<0,0,0,0,13>>+ ... ]
1.15      takayama 1502:
1.34      ohara    1503: [1153] Opt=[["v",[x,y]], ["order",[[x,5,y,1]]]];
                   1504: [[v,[x,y]],[order,[[x,5,y,1]]]]
                   1505: [1154]  dp_gr_main([x^2+y^2-1,x*y-1] | option_list=Opt);
                   1506: [ 5 1 ]
                   1507: [ R R ]
                   1508: [-y^4+y^2-1,x+y^3-y]
                   1509: @end example
1.15      takayama 1510:
1.34      ohara    1511: @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
                   1512: @noindent
                   1513: ChangeLog
                   1514: @itemize @bullet
                   1515: @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.
                   1516: @item
                   1517:  @code{setOfVariables}$B$NI=8=$N$?$a$K(B range $B%*%V%8%'%/%H$,F3F~$5$l$?(B.
                   1518: @item
                   1519:   $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
                   1520:   $B7OE}$@$C$F$$$J$+$C$?(B.
                   1521:   dp_gr_main $B$N?7$7$$%$%s%?%U%'!<%9$G$O=g=x$r$"$kJ8K!$K=>$$;XDj$9$k(B.
                   1522: @item
                   1523:   OpenXM_contrib2/asir2000 $B$N2<$N<!$N3F%U%!%$%k$,=$@5$r$&$1$?(B.
                   1524: builtin/gr.c 1.56--1.57,
                   1525: builtin/dp-supp.c 1.27--1.31 (create_composite_order_spec),
                   1526: builtin/dp.c 1.46--1.48 (parse_gr_option),
                   1527: engine/Fgfs.c 1.20,
                   1528: engine/dist.c 1.27--1.28
                   1529: engine/nd.c 1.89,
                   1530: include/ca.h 1.42--1.43,
                   1531: io/pexpr.c 1.28,
                   1532: io/sexpr.c 1.26,
                   1533: parse/arith.c 1.11,
                   1534: parse/glob.c 1.44-1.45,
                   1535: parse/lex.c 1.29,
                   1536: parse/parse.h 1.23--1.26
                   1537: @item
                   1538:  Todo: return $B%-!<%o!<%I$GLa$jCM$N%G!<%?$r(B quote $B$N%j%9%H$K$G$-$k$h$&$K(B.
                   1539:   attribute, ring $B9=B$BN(B.
                   1540: @end itemize
                   1541:
                   1542: @comment --- $B"~"~"~"~(B  $B4X?t(B dp_gr_main $B$N@bL@(B $B"~"~"~"~(B
                   1543: @node dp_weyl_gr_main,,, $B%0%l%V%J!<4pDl(B
                   1544: @subsection @code{dp_weyl_gr_main}
                   1545: @findex dp_weyl_gr_main
                   1546:
                   1547: @comment --- $B4X?t$N4JC1$J@bL@(B ---
                   1548: @comment --- @itemx $B$OJ#?t$KBP$7$F@bL@$r0l$D$D$1$k>l9g$K;H$&(B ---
                   1549: @table @t
                   1550: @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})
                   1551: :: dp_weyl_gr_main $B$N?7$7$$%$%s%?%U%'!<%9(B.  dp_gr_main $B$HF1$87A<0$G$"$k(B.
                   1552: @end table
1.15      takayama 1553:
1.34      ohara    1554: @table @var
                   1555: @item return
                   1556: $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)
                   1557: @item f
                   1558: $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)
                   1559: @item vv
                   1560: $B%j%9%H(B  ($BJQ?t$N%j%9%H(B)
                   1561: @item oo
                   1562: $B%j%9%H(B  ($B=g=x$r$"$i$o$9%j%9%H(B)
                   1563: @item n
                   1564: 0 $B$+(B1 (homogenization $B$r$9$k$+(B). [$B%F%9%H$^$@(B]
                   1565: @item m
                   1566: $B=g=x$r(B matrix $B$GI=8=$9$k>l9g(B (cf. dp_ord). [$B%F%9%H$^$@(B]
                   1567: @item b
                   1568: ???
                   1569: @item sw
                   1570: Sugar strategy $B$rE,MQ$9$k$H$-$N(B weight vector. $BA4$F$NMWAG$OHsIi(B. [$B%F%9%H$^$@(B]
                   1571: @end table
1.15      takayama 1572:
1.34      ohara    1573: @itemize @bullet
                   1574: @item
                   1575:  @code{dp_weyl_gr_main(@var{f})} $B$O(B, @var{f} $B$N%0%l%V%J4pDl$r7W;;$9$k(B.
                   1576:  $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
                   1577:  $B7OE}$@$C$F$$$J$+$C$?(B.
                   1578:  dp_weyl_gr_main $B$N?7$7$$%$%s%?%U%'!<%9$G$O=g=x$r$"$kJ8K!$K=>$$;XDj$9$k(B.
                   1579:  $B;XDjJ}K!$K$D$$$F$O(B dp_gr_main $B$N%^%K%e%"%k$r;2>H(B.
                   1580: @item
                   1581:  $BJ,;6I=8=B?9`<0$N3F%b%N%_%"%k$ND9$5$,6v?t$N$H$-$O%o%$%kBe?t(B
                   1582:  K[x_1, ..., x_n, d_1, ..., d_n]
                   1583: $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
                   1584:  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.
                   1585:  $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.
                   1586: @item
                   1587:  $BJ,;6I=8=B?9`<0$N3F%b%N%_%"%k$ND9$5$,4q?t$N$H$-$OF1<!2=%o%$%kBe?t(B
                   1588:  K[x_1, ..., x_n, d_1, ..., d_n, h]
                   1589: $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
                   1590:  d_i x_i = x_i d_i + h^2
                   1591: $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.
                   1592:  $B>\$7$/$O(B dp_gr_main $B$G;2>H$7$?(B Saito, Sturmfels, Takayama $B$N652J=q$r$_$h(B.
                   1593: @end itemize
1.15      takayama 1594:
                   1595: @example
1.34      ohara    1596: [1220] F=sm1.gkz([ [[1,1,1,1],[0,1,3,4]], [0,0]]);  /* Command in asir-contrib*/
                   1597: [[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]]
                   1598: [1221] V=[x1,x2,x3,x4,dx1,dx2,dx3,dx4]$
                   1599: [1222] dp_weyl_gr_main(F[0] | v=V, order=[[dx1,1,dx2,1,dx3,1,dx4,1]]);
                   1600: ...
                   1601: [1238] FF=map(dp_ptod,F[0],V);
                   1602: [(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]
                   1603:
                   1604: [1244] FF=map(dp_ptod,F[0],V);
                   1605: [(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>>]
                   1606:
                   1607: dp_weyl_gr_main(FF | v=V, order=[[0,0,0,0,1,1,1,1]]);
                   1608:
                   1609: [1246] dp_weyl_gr_main(FF | v=V, order=[[dx1,1,dx2,1,dx3,1,dx4,1]]);
                   1610: [ 0 0 0 0 1 1 1 1 ]
                   1611: [ R R R R R R R R ]
                   1612:  ...
                   1613:
1.15      takayama 1614: @end example
                   1615:
1.34      ohara    1616: @table @t
                   1617: @item $B;2>H(B
                   1618: @ref{dp_gr_main}
                   1619: @end table
                   1620:
                   1621: @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
                   1622: @noindent
                   1623: ChangeLog
                   1624: @itemize @bullet
                   1625: @item dp_gr_main $B$N%$%s%?%U%'!<%9$,(B dp_weyl_gr_main $B$X$bF3F~$5$l$?(B.
                   1626: @item
                   1627:   OpenXM_contrib2/asir2000 $B$N2<$N<!$N3F%U%!%$%k$,=$@5$r$&$1$?(B.
                   1628: builtin/dp-supp.c 1.32--1.33
                   1629: builtin/dp.c 1.49--1.50
                   1630: @end itemize
                   1631:
                   1632: @comment --- $B"~"~"~"~(B  $B4X?t(B dp_initial_term $B$N@bL@(B $B"~"~"~"~(B
                   1633: @node dp_initial_term,,, $B%0%l%V%J!<4pDl(B
                   1634: @subsection @code{dp_initial_term}
                   1635: @findex dp_initial_term
                   1636:
                   1637: @comment --- $B4X?t$N4JC1$J@bL@(B ---
                   1638: @table @t
                   1639: @item dp_initial_term(@var{f} | v=@var{vv}, order=@var{oo})
                   1640: :: dp_initial_term $B$OM?$($i$l$?(B weight $B$KBP$9$k@hF,9`$NOB$rLa$9(B.
                   1641: @end table
                   1642:
                   1643: @table @var
                   1644: @item return
                   1645: $BJ,;6I=8=B?9`<0$^$?$OJ,;6I=8=B?9`<0$N%j%9%H(B.
                   1646: @item f
                   1647: $BJ,;6I=8=B?9`<0$+J,;6I=8=B?9`<0$N%j%9%H(B.
                   1648: @item vv
                   1649: $B%j%9%H(B  ($BJQ?t$N%j%9%H(B)
                   1650: @item oo
                   1651: $B%j%9%H(B  ($B=g=x$r$"$i$o$9%j%9%H(B)
                   1652: @end table
                   1653:
                   1654: @itemize @bullet
                   1655: @item
                   1656:  dp_initial_term $B$OM?$($i$l$?(B weight w $B$KBP$9$k@hF,9`$NOB$rLa$9(B.
                   1657:  $B$3$l$OB?$/$N652J=q$G(B @tex ${\rm in}_w(f)$ @end tex
                   1658:  $B$H=q$+$l$F$$$k(B.
                   1659: @item
                   1660:  $B=g=x$rI=$9%j%9%H$O(B dp_gr_main $B$GDj5A$7$?J8K!$K=>$&(B.
                   1661:  $B$3$N%j%9%H$N@hF,$,(B weight vector $B$GL5$$>l9g$O%(%i!<$H$J$k(B.
                   1662:  $B$?$H$($P(B order=[[@@lex,...]] $B$O%(%i!<$H$J$k(B.
                   1663: @item
                   1664:  $B7k2L$OM?$($i$l$?=g=x$K4X$7$F%=!<%H$5$l$F$k$o$1$G$O$J$$(B.
                   1665: @end itemize
                   1666:
1.19      takayama 1667: @example
1.34      ohara    1668: [1220] F=<<2,0,0>>+<<1,1,0>>+<<0,0,1>>;
                   1669: (1)*<<2,0,0>>+(1)*<<1,1,0>>+(1)*<<0,0,1>>
                   1670: [1220] dp_initial_term(F | order=[[1,1,1]]);
                   1671: [ 1 1 1 ]
                   1672: [ R R R ]
                   1673: (1)*<<2,0,0>>+(1)*<<1,1,0>>
                   1674: [1221] dp_initial_term(F | v=[x,y,z], order=[[x,1]]);
                   1675: [ 1 0 0 ]
                   1676: [ R R R ]
                   1677: (1)*<<2,0,0>>
1.19      takayama 1678: @end example
                   1679:
1.15      takayama 1680: @table @t
                   1681: @item $B;2>H(B
1.34      ohara    1682: @ref{dp_gr_main}, @ref{dp_weyl_gr_main}, @ref{dp_order}, @ref{dp_hm}
1.15      takayama 1683: @end table
                   1684:
1.34      ohara    1685: @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 1686: @noindent
                   1687: ChangeLog
                   1688: @itemize @bullet
1.34      ohara    1689: @item
                   1690:   OpenXM_contrib2/asir2000 $B$N2<$N<!$N3F%U%!%$%k$,=$@5$r$&$1$?(B.
                   1691: builtin/dp-supp.c 1.32
                   1692: builtin/dp.c 1.49
1.17      takayama 1693: @end itemize
                   1694:
1.34      ohara    1695: @comment --- $B"~"~"~"~(B  $B4X?t(B dp_order $B$N@bL@(B $B"~"~"~"~(B
                   1696: @node dp_order,,, $B%0%l%V%J!<4pDl(B
                   1697: @subsection @code{dp_order}
                   1698: @findex dp_order
1.17      takayama 1699:
                   1700: @comment --- $B4X?t$N4JC1$J@bL@(B ---
                   1701: @table @t
1.34      ohara    1702: @item dp_order(@var{f} | v=@var{vv}, order=@var{oo})
                   1703: :: dp_order $B$OM?$($i$l$?(B weight $B$KBP$9$k<!?t$N:GBgCM$rLa$9(B.
1.17      takayama 1704: @end table
                   1705:
                   1706: @table @var
                   1707: @item return
1.34      ohara    1708: $B?t$+?t$N%j%9%H(B
                   1709: @item f
                   1710: $BJ,;6I=8=B?9`<0$+J,;6I=8=B?9`<0$N%j%9%H(B.
                   1711: @item vv
                   1712: $B%j%9%H(B  ($BJQ?t$N%j%9%H(B)
                   1713: @item oo
                   1714: $B%j%9%H(B  ($B=g=x$r$"$i$o$9%j%9%H(B)
1.17      takayama 1715: @end table
                   1716:
                   1717: @itemize @bullet
                   1718: @item
1.34      ohara    1719:  $B=g=x$rI=$9%j%9%H$O(B dp_gr_main $B$GDj5A$7$?J8K!$K=>$&(B.
                   1720:  $B$3$N%j%9%H$N@hF,$,(B weight vector $B$GL5$$>l9g$O%(%i!<$H$J$k(B.
                   1721:  $B$?$H$($P(B order=[[@@lex,...]] $B$O%(%i!<$H$J$k(B.
                   1722: @item
                   1723:  dp_order $B$OM?$($i$l$?(B weight w $B$KBP$9$k<!?t$N:GBgCM$rLa$9(B.
                   1724:  $B$3$l$r(B @tex ${\rm ord}_w(f)$ @end tex
                   1725:  $B$H=q$/O@J8$d652J=q$b$"$k(B.
1.17      takayama 1726: @item
1.34      ohara    1727:  $B0z?t$,%j%9%H$N>l9g3FMWAG$N<!?t$,7W;;$5$l$k(B.
1.17      takayama 1728: @end itemize
                   1729:
                   1730: @example
1.34      ohara    1731: [1220] F=<<2,0,0>>+<<1,1,0>>+<<0,0,1>>;
                   1732: (1)*<<2,0,0>>+(1)*<<1,1,0>>+(1)*<<0,0,1>>
                   1733: [1222] dp_order(F | order=[[1,1,1]]);
                   1734: [ 1 1 1 ]
                   1735: [ R R R ]
                   1736: 2
                   1737: [1223] dp_order(F | v=[x,y,z], order=[[x,1]]);
                   1738: [ 1 0 0 ]
                   1739: [ R R R ]
1.17      takayama 1740: @end example
                   1741:
                   1742: @table @t
                   1743: @item $B;2>H(B
1.34      ohara    1744: @ref{dp_gr_main}, @ref{dp_weyl_gr_main}, @ref{dp_initial_term}, @ref{dp_hm}
1.17      takayama 1745: @end table
                   1746:
1.34      ohara    1747: @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 1748: @noindent
                   1749: ChangeLog
                   1750: @itemize @bullet
                   1751: @item
1.34      ohara    1752:   OpenXM_contrib2/asir2000 $B$N2<$N<!$N3F%U%!%$%k$,=$@5$r$&$1$?(B.
                   1753: builtin/dp-supp.c 1.32
                   1754: builtin/dp.c 1.49
1.15      takayama 1755: @end itemize
1.21      takayama 1756:
                   1757:
1.34      ohara    1758: @node nd_gr nd_gr_trace nd_weyl_gr nd_weyl_gr_trace (module),,, $B%0%l%V%J!<4pDl(B
                   1759: @subsection @code{nd_gr}, @code{nd_gr_trace} ($B2C72(B)
                   1760: @findex nd_gr (module)
                   1761: @findex nd_gr_trace (module)
                   1762: @findex nd_weyl_gr (module)
                   1763: @findex nd_weyl_gr_trace (module)
1.21      takayama 1764:
1.34      ohara    1765: @comment --- nd_gr, nd_gr_trace $B$K$*$1$k2C72$N%0%l%V%J!<4pDl7W;;(B ---
1.21      takayama 1766: @table @t
1.34      ohara    1767: @item  nd_gr(@var{gen},@var{vars},@var{char},@var{ord})
                   1768: @itemx  nd_gr_trace(@var{gen},@var{vars},@var{homo},@var{char},@var{ord})
                   1769: @item  nd_weyl_gr(@var{gen},@var{vars},@var{char},@var{ord})
                   1770: @itemx  nd_weyl_gr_trace(@var{gen},@var{vars},@var{homo},@var{char},@var{ord})
                   1771: :: $BItJ,2C72$N%0%l%V%J!<4pDl$N7W;;(B
1.21      takayama 1772: @end table
                   1773:
1.34      ohara    1774: @table @var
                   1775: @item gen
                   1776: $B%j%9%H$N%j%9%H(B
                   1777: @item ord
                   1778: @var{[IsPOT,Ord]} $B$J$k%j%9%H(B
                   1779: @item return
                   1780: $B%j%9%H$N%j%9%H(B
                   1781: @end table
1.21      takayama 1782:
                   1783: @itemize @bullet
1.34      ohara    1784: @item $BB?9`<04D$"$k$$$O%o%$%kBe?t>e$N<+M32C72$NItJ,2C72$N%0%l%V%J!<4pDl(B
                   1785: $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
                   1786: $B85$G$"$k%Y%/%H%k$H$_$J$9(B.
                   1787: @item @var{ord} $B$H$7$F(B @var{[IsPOT,Ord]} $B$H$$$&(B2$BMWAG%j%9%H$,;XDj$5$l$?(B
                   1788: $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
                   1789: $B$N%j%9%H$N%j%9%H$H$7$FM?$($kI,MW$,$"$k(B.
                   1790: @item @var{IsPOT} $B$,(B 1 $B$N>l9g(B, POT (position over term), 0 $B$N(B
                   1791: $B>l9g(B TOP (term over position) $B$GHf3S$9$k(B. $B4pAC4D$G$N9`Hf3S$O(B @var{Ord}
                   1792: $B$G9T$&(B.
                   1793: @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 1794: @end itemize
                   1795:
1.34      ohara    1796: @example
                   1797: [0] Gen=[[x,y,z],[y^2+x,x^2,z],[y^2,z^3+x,x+z]];
                   1798: [[x,y,z],[x+y^2,x^2,z],[y^2,x+z^3,x+z]]
                   1799: [1]  nd_gr(Gen,[x,y,z],0,[0,0]);
                   1800: [[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,
                   1801: -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
                   1802: +(-y^3+z*y^2-z*y)*x+z^4*y^2]]
                   1803: @end example
                   1804:
                   1805: @table @t
                   1806: @item $B;2>H(B
                   1807: @ref{nd_gr}, @ref{nd_gr_trace}
                   1808: @end table
                   1809:
                   1810: @node nd_gr nd_gr_trace nd_weyl_gr nd_weyl_gr_trace (option),,, $B%0%l%V%J!<4pDl(B
                   1811: @subsection @code{nd_gr}, @code{nd_gr_trace} (option)
                   1812: @findex nd_gr (option)
                   1813: @findex nd_gr_trace (option)
                   1814: @findex nd_weyl_gr (option)
                   1815: @findex nd_weyl_gr_trace (option)
                   1816:
                   1817: @comment --- nd_gr, nd_gr_trace $B$N%*%W%7%g%s(B ---
                   1818:
                   1819: @table @t
                   1820: @item  nd_gr(@var{...}[|@var{opt},@var{opt},@dots{}])
                   1821: @itemx  nd_gr_trace(@var{...}[|@var{opt},@var{opt},@dots{}])
                   1822: @itemx  nd_weyl_gr(@var{...}[|@var{opt},@var{opt},@dots{}])
                   1823: @itemx  nd_weyl_gr_trace(@var{...}[|@var{opt},@var{opt},@dots{}])
                   1824: :: $B%0%l%V%J!<4pDl7W;;$K4X$9$k<o!9$N%*%W%7%g%s$N@bL@(B
                   1825: @end table
                   1826:
                   1827: @table @var
                   1828: @item opt
                   1829: @var{key=value} $B$J$k%*%W%7%g%s@_Dj(B
                   1830: @item return
                   1831: $B%*%W%7%g%s$K$h$j0[$J$k(B
                   1832: @end table
                   1833:
                   1834: @itemize @bullet
                   1835: @item $B%0%l%V%J!<4pDl7W;;$r%*%W%7%g%s$K$h$j@)8f$9$k(B.
                   1836: @item $B8=>u$G$O<!$N(B 3 $B$D$N%*%W%7%g%s$r<u$1IU$1$k(B.
                   1837:
                   1838: @table @var
                   1839: @item gentrace
                   1840: @var{value} $B$,(B 0 $B$G$J$$$H$-(B, $B%0%l%V%J!<4pDl$N7W;;7P2a>pJs$r=PNO$9$k(B.
                   1841: @item gentsyz
                   1842: @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.
                   1843: @item nora
                   1844: @var{value} $B$,(B 0 $B$G$J$$$H$-(B, $B:G=*%9%F%C%W$GAj8_4JLs$r9T$o$J$$(B.
                   1845: @end table
                   1846:
                   1847: @item @var{gentrace} $B$,;XDj$5$l$?>l9g(B, $B=PNO$O(B,
                   1848: @var{[GB,Homo,Trace,IntRed,Ind,InputRed,SpairTrace]} $B$J$k%j%9%H$G$"$k(B. $B3FMWAG$N0UL#$O(B
                   1849: $B<!$NDL$j$G$"$k(B.
                   1850: @table @var
                   1851: @item GB
                   1852: $B%0%l%V%J!<4pDl(B
                   1853: @item Homo
                   1854: $BCf4V4pDl$,@F<!2=$5$l$F$$$k>l9g(B 1, $B$=$&$G$J$$>l9g(B 0.
                   1855: @item Trace
                   1856: $BA4Cf4V4pDl$KBP$9$k7W;;7P2a>pJs(B
                   1857: @item IntRed
                   1858: $BAj8_4JLs$KBP$9$k7W;;7P2a>pJs(B
                   1859: @item Ind
                   1860: $B4JLs%0%l%V%J!<4pDl$N3FMWAG$N(B, $BA4Cf4V4pDl$N$K$*$1$k%$%s%G%C%/%9(B
                   1861: @item InputRed
                   1862: $B3FF~NOB?9`<0$r%0%l%V%J!<4pDl$G4JLs$7$F>jM>(B 0 $B$rF@$k$^$G$N7W;;7P2a>pJs(B
                   1863: (@var{gensyz} $B$,;XDj$5$l$?>l9g(B)
                   1864: @item SpairTrace
                   1865: $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
                   1866: (syzygy $B2C72$N@8@.7O$NMWAG$N$_(B; @var{gensyz} $B$,;XDj$5$l$?>l9g(B)
                   1867: @end table
                   1868: @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
                   1869: $B4X?t$N9`$G@bL@$9$kM=Dj(B.
                   1870: @end itemize
1.21      takayama 1871:
                   1872: @example
1.34      ohara    1873: [0] C=[c3*c2*c1*c0-1,((c2+c3)*c1+c3*c2)*c0+c3*c2*c1,...]
                   1874: [1] D=nd_gr_trace(C,[c0,c1,c2,c3,c4],0,1,0|gentrace=1,gensyz=1)$
                   1875: [2] D[0];
                   1876: [c0+c1+c2+c3,-c1^2-2*c3*c1-c3^2,...]
                   1877: [3] D[2];
                   1878: [[[0,0,1],[1,1,1],[2,2,1],[3,3,1]],[4,[[1,2,(1)*<<0,0,0,0>>,1],...]
                   1879: [4] D[6];
                   1880: [[-1,[[1,0,(1)*<<0,0,2,4>>,1],[1,6,(-1)*<<1,0,0,0>>,1],...]
                   1881: @end example
1.21      takayama 1882:
1.34      ohara    1883: @table @t
                   1884: @item $B;2>H(B
                   1885: @ref{nd_gr}, @ref{nd_gr_trace}
                   1886: @end table
1.21      takayama 1887:
                   1888:
1.34      ohara    1889: @node $B%7%9%F%`(B,,, $B<B83E*;EMM$N4X?t(B
                   1890: @section $B%7%9%F%`(B
1.21      takayama 1891:
1.34      ohara    1892: @comment --- $B"~"~"~"~(B  $B4X?t(B syz_pqr, xyz_stu $B$N@bL@(B $B"~"~"~"~(B
                   1893: @comment --- $BJ#?t$N4X?t$r$^$H$a$F@bL@$9$kNc(B ---
                   1894: @node asir-install.sh,,, $B%7%9%F%`(B
                   1895: @subsection @code{asir-port.sh}, @code{asir-install.sh}
                   1896: @findex asir-port.sh
                   1897: @findex asir-install.sh
1.23      takayama 1898:
                   1899: @comment --- $B4X?t$N4JC1$J@bL@(B ---
                   1900: @comment --- @itemx $B$OJ#?t$KBP$7$F@bL@$r0l$D$D$1$k>l9g$K;H$&(B ---
                   1901: @table @t
1.34      ohara    1902: @item asir-install.sh
                   1903: @itemx asir-port.sh
                   1904: :: $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 1905: @end table
                   1906:
                   1907:
                   1908: @itemize @bullet
1.34      ohara    1909: @item
                   1910: asir-port.sh $B$O(B knoppix $B@lMQ$G$"$k(B.
                   1911: $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
                   1912:  ftp.math.kobe-u.ac.jp $B$h$j%@%&%s%m!<%I$7$F(B
                   1913: /home/knoppix/.asir-tmp $B$X%;!<%V$7$F(B, $B<B9T$9$k(B.
                   1914: .asirrc $B$*$h$S(B .TeXmacs/plugins/ox/progs/init-ox.scm $B$b%@%&%s%m!<%I$9$k(B.
                   1915: @item
                   1916: asir-install.sh $B$O(B Debian GNU Linux / openxm-binary*.deb $B@lMQ$G$"$k(B.
                   1917: asir-install.sh $B$O(B asir $B$r%@%&%s%m!<%I$7$F(B /usr/local/OpenXM/bin $B$*$h$S(B
                   1918: /usr/local/OpenXM/lib/asir $B$X%$%s%9%H!<%k$9$k(B.
1.23      takayama 1919: @end itemize
                   1920:
                   1921:
                   1922: @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
                   1923: @noindent
                   1924: ChangeLog
                   1925: @itemize @bullet
1.34      ohara    1926: @item
                   1927:  $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.
                   1928: @item
                   1929:   knoppix/math $B$OJ!2,Bg3X$N_@ED$5$s$,Cf?4$H$J$j3+H/$5$l$F$$$k(B.
                   1930: @item
                   1931:   OpenXM/misc/packages/Linux/Debian $B$N2<$NA4$F$N%U%!%$%k(B (2004-2-22 $B$+$i(B
                   1932:   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.)
                   1933:   OpenXM/src/asir-port $B$N2<$N<!$N3F%U%!%$%k(B.
                   1934:   Makefile 1.1--1.8, asir-install.sh 1.1--1.2, asir-port.sh 1.1--1.6.
1.23      takayama 1935: @end itemize
                   1936:
                   1937:
1.34      ohara    1938: @node asirgui.hnd,,, $B%7%9%F%`(B
                   1939: @subsection @code{asirgui.hnd}
                   1940: @findex asirgui.hnd
1.23      takayama 1941:
                   1942: @comment --- $B4X?t$N4JC1$J@bL@(B ---
                   1943: @comment --- @itemx $B$OJ#?t$KBP$7$F@bL@$r0l$D$D$1$k>l9g$K;H$&(B ---
                   1944: @table @t
1.34      ohara    1945: @item asirguid.hnd
                   1946: :: asirgui $B$N(B main window $B$N%O%s%I%kHV9f$rJ];}$9$k%U%!%$%k(B
1.23      takayama 1947: @end table
                   1948:
1.34      ohara    1949: @comment ****************************************************************
1.23      takayama 1950:
                   1951: @itemize @bullet
1.34      ohara    1952: @item asirgui (Windows $BHG(B) $B$r5/F0$9$k$H(B asirgui.exe $B$N$"$k%U%)%k%@$*$h$S(B $B4D6-JQ?t(B TEMP $B$,Dj5A$5$l$F$$$l$P$3$N%U%!%$%k$,:n@.$5$l$k(B.
1.35      takayama 1953: @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    1954: @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 1955: @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 1956: @end itemize
                   1957:
                   1958: @example
1.34      ohara    1959: // cl test.c user32.lib
                   1960:
                   1961: #include <windows.h>
                   1962: #include <stdlib.h>
                   1963: #include <stdio.h>
                   1964: #include <process.h>
                   1965:
                   1966: int main()
                   1967: @{
                   1968:
                   1969:        HWND hnd;
                   1970:        FILE *fp = fopen("c:/Program Files/asir/bin/asirgui.hnd","r");
                   1971:        fscanf(fp,"%d",&hnd);
                   1972:        fclose(fp);
                   1973:        while (1) @{
                   1974:                int c;
                   1975:                c = getchar();
                   1976:                if ( c == '#' ) break;
                   1977:                PostMessage(hnd,WM_CHAR,c,1);
                   1978:        @}
                   1979:        return 0;
                   1980: @}
1.23      takayama 1981: @end example
                   1982:
                   1983: @table @t
                   1984: @item $B;2>H(B
1.34      ohara    1985: @ref{xyz_abc}
1.23      takayama 1986: @end table
                   1987:
                   1988: @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
                   1989: @comment --- openxm $B$N30It$+$i$N4sM?$b=R$Y$k(B. Credit.
                   1990: @noindent
                   1991: ChangeLog
                   1992: @itemize @bullet
1.34      ohara    1993: @item $B$3$N5!G=$O(B 2006-12-5, 2007-02-13 $B$K2C$($i$l$?(B.
                   1994: @item @code{OpenXM_contrib2/windows/asir32gui/asir32gui.clw} 1.11
                   1995: @item @code{OpenXM_contrib2/windows/asir32gui/asir32guiview.cpp}  1.15, 1.1.6
1.37      takayama 1996: @item winfep $B$O(B 2010-01-20 $B:"$KBh0lHG$,(B commit $B$5$l$?(B.
                   1997: @item @code{OpenXM_contrib2/windows/winfep}  1.1
1.23      takayama 1998: @end itemize
                   1999:
                   2000:
1.34      ohara    2001: @comment ****************************************************************
                   2002:
                   2003: @node chdir,,, $B%7%9%F%`(B
                   2004: @subsection @code{chdir}, @code{pwd}
                   2005: @findex chdir
                   2006: @findex pwd
1.23      takayama 2007:
1.34      ohara    2008: @comment --- $B%G%#%l%/%H%jA`:n(B ---
1.23      takayama 2009: @table @t
1.34      ohara    2010: @item chdir(@var{directory})
                   2011: @item  pwd()
                   2012: :: $B%7%'%k%3%^%s%I(B cd $B$H(B pwd $B$KBP1~$9$kA`:n(B.
1.23      takayama 2013: @end table
                   2014:
                   2015: @table @var
                   2016: @item return
1.34      ohara    2017: $BJ8;zNs(B(@code{pwd}), $B@0?t(B(@code{chdir})
                   2018: @item dirctory
                   2019: $BJ8;zNs(B
1.23      takayama 2020: @end table
                   2021:
                   2022: @itemize @bullet
1.34      ohara    2023: @item
                   2024: @code{pwd} $B$O%+%l%s%H%G%#%l%/%H%j$rJ8;zNs$GJV$9(B.
                   2025: @item
                   2026: @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.
                   2027: @item
                   2028: $B$3$l$i$N4X?t$O(B UNIX $BHG$K$N$_<BAu$5$l$F$$$k(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.34      ohara    2096: @comment ****************************************************************
                   2097:
                   2098:
                   2099: @node $B8@8l(B,,, $B<B83E*;EMM$N4X?t(B
                   2100: @section $B8@8l(B
                   2101:
                   2102: @node get_struct_name,,, $B8@8l(B
                   2103: @subsection @code{get_struct_name}, @code{get_element_names}, @code{get_element_at}, @code{put_element_at}
                   2104: @findex get_struct_name
                   2105: @findex get_element_names
                   2106: @findex get_element_at
                   2107: @findex put_element_at
1.23      takayama 2108:
                   2109: @comment --- $B4X?t$N4JC1$J@bL@(B ---
                   2110: @comment --- @itemx $B$OJ#?t$KBP$7$F@bL@$r0l$D$D$1$k>l9g$K;H$&(B ---
                   2111: @table @t
1.34      ohara    2112: @item get_struct_name(@var{s})
                   2113: @itemx get_element_names(@var{s})
                   2114: @itemx get_element_at(@var{s},@var{key})
                   2115: @itemx put_element_at(@var{s},@var{key},@var{obj})
                   2116: :: $B9=B$BN(B @var{s} $B$KBP$9$kA`:n(B
1.23      takayama 2117: @end table
                   2118:
                   2119: @table @var
                   2120: @item return
1.34      ohara    2121: $BJ8;zNs(B (get_struct_name),
                   2122: $BJ8;zNs$N%j%9%H(B (get_element_names),
                   2123: $B%*%V%8%'%/%H(B (get_element_at),
                   2124: $B%*%V%8%'%/%H(B (put_element_at)
                   2125: @item s
                   2126: $B9=B$BN(B
                   2127: @item key
                   2128: $BJ8;zNs(B
                   2129: @item obj
                   2130: $B%*%V%8%'%/%H(B
1.23      takayama 2131: @end table
                   2132:
                   2133: @itemize @bullet
1.34      ohara    2134: @item
                   2135:  @code{get_struct_name(s)} $B$O(B, $B9=B$BN(B @var{s} $B$NL>A0$rLa$9(B.
                   2136: @item
                   2137:  @code{get_element_names(s)} $B$O(B, $B9=B$BN$N%a%s%P!<$NL>A0$N%j%9%H$rLa$9(B.
                   2138: @item
                   2139:  @code{get_element_at(s,key)} $B$O9=B$BN(B s $B$N%a%s%P!<(B key $B$NCM$rLa$9(B.
                   2140: @item
                   2141:  @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 2142: @end itemize
                   2143:
                   2144: @example
1.34      ohara    2145: [219]  struct point @{ x, y, color@};
                   2146: [220]  P = newstruct(point);
                   2147: @{0,0,0@}
                   2148: [221]  P->x = 10$ P->y=5$ P->color="red"$
                   2149: [222]  get_element_names(P);
                   2150: [x,y,color]
                   2151: [223] put_element_at(P,"color","blue");
                   2152: blue
                   2153: [224] P->color;
                   2154: bule
1.23      takayama 2155: @end example
                   2156:
                   2157: @table @t
                   2158: @item $B;2>H(B
1.34      ohara    2159: @ref{newstruct}, @ref{struct}
1.23      takayama 2160: @end table
                   2161:
                   2162: @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
                   2163: @comment --- openxm $B$N30It$+$i$N4sM?$b=R$Y$k(B. Credit.
                   2164: @noindent
                   2165: ChangeLog
                   2166: @itemize @bullet
1.34      ohara    2167: @item  $B9=B$BN$NDj5A$rCN$i$:$K9=B$BN$r07$&%f!<%64X?t$r=q$/$H$-$KJXMx(B.
                   2168:        asir-contrib $B$N(B noro_print.rr $B$r8+$h(B.
                   2169: @item  OpenXM_contrib2/asir2000/builtin/compobj.c 1.8.
1.23      takayama 2170: @end itemize
                   2171:
                   2172:
1.34      ohara    2173: @comment  mapat
                   2174: @node mapat,,, $B8@8l(B
                   2175: @subsection @code{mapat}
                   2176: @findex mapat
1.23      takayama 2177:
                   2178: @table @t
1.34      ohara    2179: @item mapat(@var{fname},@var{pos}[,@var{arg0}, @var{arg1}, ...])
                   2180: :: @var{pos} $B$KBP$9$k(B map $B4X?t(B
1.23      takayama 2181: @end table
                   2182:
                   2183: @table @var
                   2184: @item return
1.34      ohara    2185: $B%*%V%8%'%/%H(B
                   2186: @item pos
                   2187: $B@0?t(B
                   2188: @item arg0, arg1, arg2, ...
                   2189: $B%*%V%8%'%/%H(B
1.23      takayama 2190: @end table
                   2191:
                   2192: @itemize @bullet
1.34      ohara    2193: @item
                   2194: @code{map} $B4X?t$O(B 0 $BHVL\$N0z?t$KBP$7$F$7$+F0:n$7$J$$$,(B, @code{mapat}
                   2195: $B4X?t$O;XDj$7$?HV9f$N0z?t$KBP$7$F(B @code{map} $B4X?t$r<B9T$9$k(B.
                   2196: @item
                   2197: @code{mapat(fname,0,A0,A1,...)} $B$O(B
                   2198: @code{map(fname,A0,A1,...)} $B$KEy2A$G$"$k(B.
                   2199: @item
                   2200: $B<!$NI{:nMQ$,$"$k(B. $B$^$@=q$$$F$J$$(B.
1.23      takayama 2201: @end itemize
                   2202:
                   2203: @example
1.34      ohara    2204: [219] mapat(deg,1,x^2+y^3+x+y,[x,y]);
                   2205: [2,3]
                   2206: [220] mapat(subst,1,x+y+z,[x,y,z],2);
                   2207: [y+z+2,x+z+2,x+y+2]
1.23      takayama 2208: @end example
                   2209:
                   2210: @table @t
                   2211: @item $B;2>H(B
1.34      ohara    2212: @ref{map}
1.23      takayama 2213: @end table
                   2214:
                   2215: @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
                   2216: @comment --- openxm $B$N30It$+$i$N4sM?$b=R$Y$k(B. Credit.
                   2217: @noindent
                   2218: ChangeLog
                   2219: @itemize @bullet
1.34      ohara    2220: @item $B$3$N4X?t$O(B 2004-6-22 $B$K%3%_%C%H$5$l$?(B.
                   2221:  $BJQ99$r$&$1$?%=!<%9%3!<%I$O(B builtin/pf.c, subst.c $B$G$"$k(B.
1.23      takayama 2222: @end itemize
                   2223:
1.34      ohara    2224: @comment  list
                   2225: @node list,,, $B8@8l(B
                   2226: @subsection @code{list}
                   2227: @findex list
1.23      takayama 2228:
                   2229: @table @t
1.34      ohara    2230: @item list([@var{arg0}, @var{arg1}, ...])
                   2231: :: list $B$r@8@.$9$k(B.
1.23      takayama 2232: @end table
                   2233:
                   2234: @table @var
                   2235: @item return
                   2236: $B%j%9%H(B
1.34      ohara    2237: @item arg0, arg1, arg2, ...
                   2238: $B%*%V%8%'%/%H(B
1.23      takayama 2239: @end table
                   2240:
1.34      ohara    2241: @itemize @bullet
                   2242: @item
                   2243: @var{arg0}, @var{arg1}, ... $B$rMWAG$H$9$k%j%9%H$r@8@.$9$k(B.
1.23      takayama 2244: @end itemize
                   2245:
                   2246: @example
1.34      ohara    2247: [219] list(1,2,3);
                   2248: [1,2,3]
                   2249: [220] list(1,2,[3,4]);
                   2250: [1,2,[3,4]]
1.23      takayama 2251: @end example
                   2252:
                   2253: @table @t
                   2254: @item $B;2>H(B
1.34      ohara    2255: @ref{cons}
1.23      takayama 2256: @end table
                   2257:
                   2258: @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
                   2259: @comment --- openxm $B$N30It$+$i$N4sM?$b=R$Y$k(B. Credit.
                   2260: @noindent
                   2261: ChangeLog
                   2262: @itemize @bullet
1.34      ohara    2263: @item $B$3$N4X?t$O(B 2004-6-22 $B$K%3%_%C%H$5$l$?(B.
                   2264:  $BJQ99$r$&$1$?%=!<%9%3!<%I$O(B builtin/list.c $B$G$"$k(B.
1.23      takayama 2265: @end itemize
                   2266:
                   2267:
1.34      ohara    2268: @node assoc,,, $B8@8l(B
                   2269: @subsection @code{assoc}
                   2270: @findex assoc
1.23      takayama 2271:
                   2272: @comment --- $B4X?t$N4JC1$J@bL@(B ---
                   2273: @table @t
1.34      ohara    2274: @item assoc(@var{a},@var{b})
                   2275: :: $BO"A[%j%9%H$r$D$/$k(B
1.23      takayama 2276: @end table
                   2277:
                   2278: @table @var
                   2279: @item return
1.34      ohara    2280: List
                   2281: @item a
                   2282: List
                   2283: @item b
                   2284: List
1.23      takayama 2285: @end table
                   2286:
                   2287: @itemize @bullet
1.34      ohara    2288: @item $B%j%9%H(B @var{a}, @var{b} $B$h$j(B
                   2289: [[@var{a}[0],@var{b}[0]], [@var{a}[1],@var{b}[1]], ...]
                   2290: $B$J$k?7$7$$%j%9%H$r@8@.$9$k(B.
1.23      takayama 2291: @end itemize
                   2292:
1.34      ohara    2293: $B2<$NNc$G$O(B @code{A} $B$KF0J*$NL>A0$,(B,
                   2294: @code{B} $B$KB-$NK\?t$,F~$C$F$$$k(B.
                   2295: @code{assoc(A,B)} $B$GF0J*$HB-$NK\?t$r%Z%"$K$7$?%j%9%H$r@8@.$9$k(B.
                   2296:
1.23      takayama 2297: @example
1.34      ohara    2298: [1192]  A=["dog","cat","snake"];
                   2299: [dog,cat,snake]
                   2300: [1193] B=[4,4,0];
                   2301: [4,4,0]
                   2302: [1194] assoc(A,B);
                   2303: [[dog,4],[cat,4],[snake,0]]
1.23      takayama 2304: @end example
                   2305:
                   2306: @table @t
                   2307: @item $B;2>H(B
1.34      ohara    2308: @ref{cons}, @ref{append}
1.23      takayama 2309: @end table
                   2310:
                   2311: @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
                   2312: @noindent
                   2313: ChangeLog
                   2314: @itemize @bullet
1.34      ohara    2315: @item
                   2316:  $B$3$N4X?t$O(B 2004-6-28 $B$K=q$+$l$?(B.
                   2317:  $BJQ99$r$&$1$?%=!<%9%3!<%I$O(B
                   2318:  builtin/list.c 1.9
                   2319:  parse/eval.c 1.35,
                   2320:  parse/parse.h 1.31,
                   2321:  parse/quote.c 1.14--1.16.
1.23      takayama 2322: @end itemize
                   2323:
1.34      ohara    2324:
                   2325: @node set_secure_flag,,, $B8@8l(B
                   2326: @subsection @code{set_secure_flag}, @code{set_secure_mode}
                   2327: @findex set_secure_flag
                   2328: @findex set_secure_mode
1.23      takayama 2329:
                   2330: @comment --- $B4X?t$N4JC1$J@bL@(B ---
                   2331: @comment --- @itemx $B$OJ#?t$KBP$7$F@bL@$r0l$D$D$1$k>l9g$K;H$&(B ---
                   2332: @table @t
1.34      ohara    2333: @item set_secure_flag(@var{fname},@var{m})
                   2334: @itemx set_secure_mode(@var{m})
                   2335: :: $B4X?t$N<B9T8"8B$r@_Dj$9$k(B.  (web $B%5!<%S%9MQ(B)
1.23      takayama 2336: @end table
                   2337:
                   2338: @table @var
                   2339: @item return
                   2340: $B@0?t(B
1.34      ohara    2341: @item fname
                   2342: $BJ8;zNs(B
                   2343: @item m
                   2344: $B@0?t(B
1.23      takayama 2345: @end table
                   2346:
                   2347: @itemize @bullet
1.34      ohara    2348: @item @code{set_secure_flag}, @code{set_secure_mode} $B$O(B
                   2349: asir $B$r(B web $B%5!<%PEy$G8x3+$9$k$?$a$K2C$($i$l$?4X?t(B.
                   2350: @code{set_secure_flag} $B$G8x3+$9$k4X?t$r;XDj$9$k(B.
                   2351: @code{secure_mode} $B$,(B 1 $B$N>l9g$O(B @code{set_secure_flag} $B$G;XDj$5$l$?(B
                   2352: $B4X?t$7$+<B9T$G$-$J$$(B.
                   2353: $B4X?t$N<B9TESCf$G$O(B @code{secure_mode} $B$,(B 0 $B$H$J$C$F$$$k$N$G(B,
                   2354: $BG$0U$N4X?t$r<B9T$G$-$k(B.
                   2355: $B$^$?%(%i!<$N;~Ey$O(B, @code{secure_mode} $B$O(B 1 $B$K<+F0E*$KI|5"$9$k(B.
                   2356: $B$?$@$7(B @code{def} $B$O<B9T$G$-$J$$(B.
                   2357: $B8x3+$9$k4X?t$G$O(B, $B$=$N=hM}Cf$OG$0U$N4X?t$,<B9T$G$-$k$N$G(B,
                   2358: security $B$K==J,Cm0U$7$?<BAu$r$9$kI,MW$,$"$k(B.
                   2359: @item
                   2360: @code{set_secure_flag} $B$O(B, @var{fname} $B$N(B secure flag $B$r(B @var{m}
                   2361: $B$K$9$k(B.
                   2362: $B8x3+$9$kL?Na$O(B 1 $B$K@_Dj$9$k(B.
                   2363: @item
                   2364: @var{set_secure_mode(1)} $B$G(B @code{secure_mode} $B$,(B 1 $B$H$J$j(B,
                   2365: $B8x3+$5$l$?4X?t$7$+<B9T$G$-$J$/$J$k(B.
                   2366: quit $BEy$b<B9T$G$-$J$$$N$GCm0U(B.
                   2367: @item  @code{ timer } $B$N0z?t$H$7$F(B secure_flag $B$r@_Dj$7$F$$$J$$4X?t$r(B
                   2368: $B;XDj$7$F<B9T$7$F$b%(%i!<$,I=<($5$l$J$$(B.
                   2369: $B$3$N$H$-$O(B, @code{ ctrl("error_in_timer",1) } $B$r<B9T$7$F$*$/(B.
1.23      takayama 2370: @end itemize
                   2371:
                   2372: @example
1.34      ohara    2373: [1194] set_secure_flag("print_input_form_",1);
                   2374: 1
                   2375: [1195] set_secure_flag("fctr",1);
                   2376: 1
                   2377: [220] set_secure_mode(1);
                   2378: 1
                   2379: [1197] fctr((x-1)^3);
                   2380: [[1,1],[x-1,3]]
                   2381: [1198] fctr(shell("ls"));
                   2382: evalf : shell not permitted
                   2383: return to toplevel
1.23      takayama 2384: @end example
                   2385:
                   2386: @table @t
                   2387: @item $B;2>H(B
1.34      ohara    2388: @ref{timer}
1.23      takayama 2389: @end table
                   2390:
                   2391: @noindent
                   2392: ChangeLog
                   2393: @itemize @bullet
1.34      ohara    2394: @item @code{set_secure_flag}, @code{set_secure_mode} $B$O(B asir $B$r(B
                   2395: web $B%5!<%PEy$G8x3+$9$k$?$a$K2C$($i$l$?4X?t(B.
                   2396: sm1 $B$NF1MM$J4X?t(B RestrictedMode $B$G:NMQ$5$l$?J}K!$rMQ$$$F$$$k(B.
                   2397: $B$D$^$j(B, @code{set_secure_flag} $B$G8x3+$9$k4X?t$r;XDj$9$k(B.
                   2398: @code{secure_mode} $B$,(B 1 $B$N>l9g$O(B @code{set_secure_flag} $B$G;XDj$5$l$?(B
                   2399: $B4X?t$7$+<B9T$G$-$J$$(B.
                   2400: v$B4X?t$N<B9TESCf$G$O(B @code{secure_mode} $B$,(B 0 $B$H$J$C$F$$$k$N$G(B,
                   2401: $BG$0U$N4X?t$r<B9T$G$-$k(B.
                   2402: @item $B$3$N4X?t$O(B 2004-10-27 $B$+$i(B 2004-11-22 $B$K$+$1$F3+H/$5$l$?(B.
                   2403: @item cgiasir.sm1, cgi-asir.sh $B$HAH$_9g$o$;$F(B cgi $B%5!<%S%9$rDs6!$9$k$?$a$K(B
                   2404: $BMxMQ$9$k(B.
                   2405: cgi-asir.sh $B$G$O(B
                   2406: @code{CGI_ASIR_ALLOW} $B4D6-JQ?t$G8x3+$9$k%3%^%s%I$r;XDj$9$k(B.
                   2407: @item
                   2408:   1.24--1.25      OpenXM_contrib2/asir2000/builtin/miscf.c
                   2409: @item
                   2410:   1.36--1.38      OpenXM_contrib2/asir2000/parse/eval.c
                   2411: @item
                   2412:   1.6--1.7       OpenXM_contrib2/asir2000/parse/function.c
                   2413: @item
                   2414:   1.33      OpenXM_contrib2/asir2000/parse/parse.h
1.23      takayama 2415: @end itemize
                   2416:
1.34      ohara    2417: @node initialize_static_variable,,, $B8@8l(B
                   2418: @subsection @code{initialize_static_variable}
                   2419: @findex initialize_static_variable
                   2420:
1.23      takayama 2421:
1.34      ohara    2422: @comment --- $B@bL@(B ---
1.23      takayama 2423: @table @t
1.34      ohara    2424: @item static $BJQ?t$N=i4|2=$NLdBjE@(B. $B=i4|2=$N;~$K(B segmentation fault $B$,$*$-$k(B.
1.23      takayama 2425: @end table
                   2426:
                   2427:
                   2428: @itemize @bullet
1.34      ohara    2429: @item static $BJQ?t$N<h07(B.
                   2430: $B2<$NNc$r;2>H$N$3$H(B.
1.23      takayama 2431: @end itemize
                   2432:
1.34      ohara    2433:
1.23      takayama 2434: @example
1.34      ohara    2435: if (1) @{
                   2436:  module abc;
                   2437:  static A;
                   2438:  A=1;
                   2439:  endmodule;
                   2440: @} else @{ @};
1.23      takayama 2441:
1.34      ohara    2442: end$
                   2443: $B$r(B t.rr $B$H$9$k$H$-(B,
1.23      takayama 2444:
1.34      ohara    2445: [6] load("./t.rr");
                   2446: 1
                   2447: internal error (SEGV)
                   2448: $B$H$J$k(B.
1.23      takayama 2449:
1.34      ohara    2450: t.rr $B$r(B
                   2451: if (1) @{
                   2452:  module abc;
                   2453:  static A;
                   2454:  localf initA;
                   2455:  localf foo;
                   2456:  def initA() @{
                   2457:    A=1;
                   2458:  @}
                   2459:  initA();
                   2460:  def foo() @{
                   2461:    return A;
                   2462:  @}
                   2463:  endmodule;
                   2464: @} else @{ @};
1.23      takayama 2465:
1.34      ohara    2466: end$
                   2467: $B$H$9$k$H@5$7$/=i4|2=$5$l$k(B.
1.23      takayama 2468: @end example
                   2469:
1.34      ohara    2470: @comment --- ChangeLog
1.23      takayama 2471: @noindent
                   2472: ChangeLog
                   2473: @itemize @bullet
1.34      ohara    2474: @item  oxasir-win.rr $B$N<h07$GLdBjE@$H$7$FIb>e(B.  2005.07.25.
                   2475: @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.
                   2476: @item ox_asir $B$K7W;;$r0MMj$9$k;~$O(B if (1) @{ ... @}$B$G0O$`(B.
1.23      takayama 2477: @end itemize
1.34      ohara    2478:
1.23      takayama 2479: @comment ****************************************************************
1.13      takayama 2480:
1.34      ohara    2481: @node $B?tO@!&Be?t(B,,, $B<B83E*;EMM$N4X?t(B
                   2482: @section $B?tO@!&Be?t(B
                   2483:
1.24      takayama 2484:
1.34      ohara    2485: @node small_jacobi,,, $B?tO@!&Be?t(B
                   2486: @subsection @code{small_jacobi}
                   2487: @findex small_jacobi
1.24      takayama 2488:
                   2489: @comment --- $B4X?t$N4JC1$J@bL@(B ---
                   2490: @table @t
1.34      ohara    2491: @item small_jacobi(@var{a},@var{m})
                   2492: :: Jacobi $B5-9f$N7W;;(B
1.24      takayama 2493: @end table
                   2494:
1.34      ohara    2495: @table @var
                   2496: @item return
                   2497: $B@0?t(B
                   2498: @item arg1, arg2
                   2499: $B@0?t(B
                   2500: @end table
1.24      takayama 2501:
                   2502: @itemize @bullet
1.34      ohara    2503: @item
                   2504:  @var{m} $B$,AG?t$N$H$-$O(B Legendre $B5-9f$H$h$P$l(B,
                   2505:  x^2 = @var{a} mod @var{m} $B$K2r$,$"$k$H$-(B 1, $B2r$,$J$$$H$-(B -1 $B$r$b$I$9(B.
                   2506: @item
                   2507: Jacobi $B5-9f$O(B Legendre $B5-9f$N@Q$GDj5A$5$l$k(B ($B=iEy@0?tO@$NK\;2>H(B).
                   2508: @item
                   2509:  $B$3$N4X?t$O(B machine int $B$NHO0O$G(B jacobi $B5-9f$r7W;;$9$k(B.
1.24      takayama 2510: @end itemize
                   2511:
                   2512: @example
1.34      ohara    2513: [1286] small_jacobi(2,3);
                   2514: -1
                   2515: [1287] small_jacobi(2,7);
                   2516: 1
1.24      takayama 2517: @end example
                   2518:
                   2519: @table @t
                   2520: @item $B;2>H(B
1.34      ohara    2521: http://members.jcom.home.ne.jp/yokolabo/asirlib/
                   2522: $B$b8+$F$M(B.
1.24      takayama 2523: @end table
                   2524:
                   2525: @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
                   2526: @noindent
                   2527: ChangeLog
                   2528: @itemize @bullet
1.34      ohara    2529: @item $B$3$N4X?t$NM3Mh$OITL@(B.
1.24      takayama 2530: @end itemize
                   2531:
1.34      ohara    2532:
                   2533: @node noro_matrix.rr,,, $B?tO@!&Be?t(B
1.25      takayama 2534: @subsection @code{noro_matrix.rr}
                   2535: @findex noro_matrix.rr
                   2536:
                   2537: @comment --- $B4X?t$N4JC1$J@bL@(B ---
                   2538: @comment --- @itemx $B$OJ#?t$KBP$7$F@bL@$r0l$D$D$1$k>l9g$K;H$&(B ---
                   2539: @table @t
                   2540: @item linalg.unit_mat(@var{arg1})
                   2541: @item linalg.random_rmat(@var{arg1}, @var{arg2}, @var{arg3})
                   2542: @item linalg.minipoly_mat(@var{arg1})
                   2543: @item linalg.compute_kernel(@var{arg1})
                   2544: @item linalg.compute_image(@var{arg1})
                   2545: @item linalg.jordan_canonical_form(@var{arg1})
                   2546: @end table
                   2547:
                   2548:
                   2549: @itemize @bullet
                   2550: @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.
                   2551: @end itemize
                   2552:
                   2553: @example
                   2554: load("noro_matrix.rr");
                   2555: A=newmat(4,4,[[2,0,0,0],[3,5,1,0],[-9,-9,-1,0],[-5,0,0,1]]);
                   2556: B=linalg.jordan_canonical_form(A);
                   2557: @end example
                   2558:
                   2559: @table @t
                   2560: @item $B;2>H(B
                   2561: @ref{invmat}
                   2562: @end table
                   2563:
                   2564: @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
                   2565: @comment --- openxm $B$N30It$+$i$N4sM?$b=R$Y$k(B. Credit.
                   2566: @noindent
                   2567: ChangeLog
                   2568: @itemize @bullet
                   2569: @item $B$3$N4X?t$O(B 2004-04 $B:"$+$i@~7ABe?t(BIII $B$N9V5A$r$7$J$,$i=q$+$l$?(B.
                   2570: @item $B%=!<%9(B:  OpenXM/src/asir-contrib/packages/src/noro_matrix.rr
                   2571: @end itemize
                   2572:
                   2573:
1.34      ohara    2574: @node f_res,,, $B?tO@!&Be?t(B
1.26      takayama 2575: @subsection @code{f_res}
                   2576: @findex f_res
1.25      takayama 2577:
                   2578: @comment --- $B4X?t$N4JC1$J@bL@(B ---
                   2579: @table @t
1.26      takayama 2580: @item f_res
1.25      takayama 2581: @end table
                   2582:
                   2583:
                   2584: @itemize @bullet
1.26      takayama 2585: @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 2586: @end itemize
                   2587:
                   2588: @table @t
                   2589: @item $B;2>H(B
                   2590: @ref{}
                   2591: @end table
                   2592:
                   2593: @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
                   2594: @comment --- openxm $B$N30It$+$i$N4sM?$b=R$Y$k(B. Credit.
                   2595: @noindent
                   2596: ChangeLog
                   2597: @itemize @bullet
                   2598: @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 2599: @item OpenXM/src/ox_cdd, OpenXM/src/asir-contrib/packages/src/f_res.rr
1.25      takayama 2600: @end itemize
                   2601:
                   2602:
1.34      ohara    2603: @node D $B2C72$N@)8B$K4X$9$k4X?t(B,,, $B<B83E*;EMM$N4X?t(B
                   2604: @section D $B2C72$N@)8B$K4X$9$k4X?t(B
1.27      ohara    2605:
                   2606:
1.34      ohara    2607: @node nk_restriction.restriction,,, D $B2C72$N@)8B$K4X$9$k4X?t(B
1.29      nakayama 2608: @subsection @code{nk_restriction.restriction}
                   2609: @comment --- $B:w0zMQ%-!<%o!<%I(B
                   2610: @findex nk_restriction.restriction
                   2611:
                   2612: @comment --- $B4X?t$N4JC1$J@bL@(B ---
                   2613: @table @t
1.34      ohara    2614: @item nk_restriction.restriction(@var{Id}, @var{VL}, @var{DVL}, @var{W})
1.29      nakayama 2615: :: $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@)8B2C72$rJV$9!#(B
                   2616: @end table
                   2617:
                   2618: @comment --- $B0z?t$N4JC1$J@bL@(B ---
                   2619: @table @var
                   2620: @item Id
                   2621: $B%$%G%"%k$N@8@.85$N%j%9%H(B
                   2622: @item VL
                   2623: $BJQ?t$N%j%9%H(B
                   2624: @item DVL
                   2625: $BJQ?t$N%j%9%H(B(@var{VL} $B$KBP1~$9$kHyJ,:nMQAG$NJ}$NJQ?t(B)
                   2626: @item W
                   2627: $B=E$_%Y%/%H%k$rI=$9%j%9%H(B
                   2628: @end table
                   2629:
                   2630: @itemize @bullet
                   2631: @item
                   2632: @var{W} $B$NMWAG$OHsIi@0?t$G!"(B0 $BHVL\$NMWAG$+$iO"B3$7$F@5$N@0?t$,F~$i$J$1$l$P$J$i$J$$!#(B
                   2633: ($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)
                   2634: @item
                   2635: $B@5$N=E$_$r;}$DJQ?t$K$D$$$F$N@)8B$r9T$&!#(B
1.34      ohara    2636: $BNc$($P!"(B@var{VL} @code{=[x,y,z]}, @var{W} @code{=[1,1,0]} $B$G$"$l$P(B
                   2637: x,y $B$K$D$$$F@)8B$r9T$&!#(B
1.29      nakayama 2638: @end itemize
                   2639:
                   2640: $B0J2<$O!"%$%G%"%k(B
1.34      ohara    2641: @iftex
1.29      nakayama 2642: @tex
1.34      ohara    2643: $I = D \cdot \{x \partial_x -1, y \partial_y - 1\} $
                   2644: @end tex
1.29      nakayama 2645: $B$N(B
1.34      ohara    2646: @tex
                   2647: $x$
                   2648: @end tex
                   2649: @end iftex
                   2650: @ifinfo
                   2651: I = D . @{ x dx -1, y dy - 1 @} $B$N(B x
                   2652: @end ifinfo
1.29      nakayama 2653: $B$K$D$$$F$N@)8B2C72$r7W;;$7$?Nc$G$"$k!#(B
                   2654: @example
                   2655: [1432] nk_restriction.restriction([x*dx-1,y*dy-1],[x,y],[dx,dy],[1,0]);
                   2656: -- generic_bfct_and_gr :0.001sec(0.001629sec)
                   2657: generic bfct : [[1,1],[s-1,1]]
                   2658: S0 : 1
1.33      ohara    2659: B_@{S0@} length : 2
1.29      nakayama 2660: -- fctr(BF) + base :0.000999sec(0.0005109sec)
                   2661: [[y*dy-1,(y*dy-1)*dx,-1],[[1],[0]]]
                   2662: @end example
                   2663:
1.34      ohara    2664:
1.29      nakayama 2665: @node nk_restriction.restriction_ideal,,, D $B2C72$N@)8B$K4X$9$k4X?t(B
                   2666: @subsection @code{nk_restriction.restriction_ideal}
                   2667: @comment --- $B:w0zMQ%-!<%o!<%I(B
                   2668: @findex nk_restriction.restriction_ideal
                   2669:
                   2670: @comment --- $B4X?t$N4JC1$J@bL@(B ---
                   2671: @table @t
1.34      ohara    2672: @item nk_restriction.restriction_ideal(@var{Id}, @var{VL}, @var{DVL}, @var{W})
1.29      nakayama 2673: :: $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
                   2674: @end table
                   2675:
                   2676: @comment --- $B0z?t$N4JC1$J@bL@(B ---
                   2677: @table @var
                   2678: @item Id
                   2679: $B%$%G%"%k$N@8@.85$N%j%9%H(B
                   2680: @item VL
                   2681: $BJQ?t$N%j%9%H(B
                   2682: @item DVL
                   2683: $BJQ?t$N%j%9%H(B(@var{VL} $B$KBP1~$9$kHyJ,:nMQAG$NJ}$NJQ?t(B)
                   2684: @item W
                   2685: $B=E$_%Y%/%H%k$rI=$9%j%9%H(B
                   2686: @end table
                   2687:
                   2688: @itemize @bullet
                   2689: @item
                   2690: @var{W} $B$NMWAG$OHsIi@0?t$G!"(B0 $BHVL\$NMWAG$+$iO"B3$7$F@5$N@0?t$,F~$i$J$1$l$P$J$i$J$$!#(B
                   2691: ($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)
                   2692: @item
                   2693: $B@5$N=E$_$r;}$DJQ?t$K$D$$$F$N@)8B$r9T$&!#(B
1.34      ohara    2694: $BNc$($P!"(B@var{VL} @code{=[x,y,z]}, @var{W} @code{=[1,1,0]} $B$G$"$l$P(B
                   2695: x,y $B$K$D$$$F@)8B$r9T$&!#(B
1.29      nakayama 2696: @end itemize
                   2697:
1.34      ohara    2698: $B0J2<$O!"%$%G%"%k(B
                   2699: @iftex
1.29      nakayama 2700: @tex
1.34      ohara    2701: $I = D \cdot \{x \partial_x -1, y \partial_y - 1\} $
                   2702: @end tex
1.29      nakayama 2703: $B$N(B
1.34      ohara    2704: @tex
                   2705: $x$
                   2706: @end tex
                   2707: @end iftex
                   2708: @ifinfo
                   2709: I = D . @{ x dx -1, y dy - 1 @} $B$N(B x
                   2710: @end ifinfo
1.29      nakayama 2711: $B$K$D$$$F$N@)8B%$%G%"%k$r7W;;$7$?Nc$G$"$k!#(B
                   2712: @example
                   2713: [1346] nk_restriction.restriction_ideal([x*dx-1,y*dy-1],[x,y],[dx,dy],[1,0]);
                   2714: -- generic_bfct_and_gr :0.002sec(0.001652sec)
                   2715: generic bfct : [[1,1],[s-1,1]]
                   2716: S0 : 1
1.33      ohara    2717: B_@{S0@} length : 2
1.29      nakayama 2718: -- fctr(BF) + base :0sec(0.000566sec)
                   2719: -- restriction_ideal_internal :0.001sec(0.0007441sec)
                   2720: [-1]
                   2721: @end example
                   2722:
1.34      ohara    2723: @node nk_restriction.integration,,, D $B2C72$N@)8B$K4X$9$k4X?t(B
1.29      nakayama 2724: @subsection @code{nk_restriction.integration}
                   2725: @comment --- $B:w0zMQ%-!<%o!<%I(B
                   2726: @findex nk_restriction.integration
                   2727:
                   2728: @comment --- $B4X?t$N4JC1$J@bL@(B ---
                   2729: @table @t
1.34      ohara    2730: @item nk_restriction.integration(@var{Id}, @var{VL}, @var{DVL}, @var{W})
1.29      nakayama 2731: :: $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,2C72$rJV$9!#(B
                   2732: @end table
                   2733:
                   2734: @comment --- $B0z?t$N4JC1$J@bL@(B ---
                   2735: @table @var
                   2736: @item Id
                   2737: $B%$%G%"%k$N@8@.85$N%j%9%H(B
                   2738: @item VL
                   2739: $BJQ?t$N%j%9%H(B
                   2740: @item DVL
                   2741: $BJQ?t$N%j%9%H(B(@var{VL} $B$KBP1~$9$kHyJ,:nMQAG$NJ}$NJQ?t(B)
                   2742: @item W
                   2743: $B=E$_%Y%/%H%k$rI=$9%j%9%H(B
                   2744: @end table
                   2745:
                   2746: @comment --- $B$3$3$G4X?t$N>\$7$$@bL@(B ---
                   2747: @comment --- @itemize$B!A(B@end itemize $B$O2U>r=q$-(B ---
                   2748: @comment --- @bullet $B$O9uE@IU$-(B ---
                   2749: @itemize @bullet
                   2750: @item
                   2751: @var{W} $B$NMWAG$OHsIi@0?t$G!"(B0 $BHVL\$NMWAG$+$iO"B3$7$F@5$N@0?t$,F~$i$J$1$l$P$J$i$J$$!#(B
                   2752: ($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)
                   2753: @item
                   2754: $B@5$N=E$_$r;}$DJQ?t$K$D$$$F$N@QJ,$r9T$&!#(B
1.34      ohara    2755: $BNc$($P!"(B@var{VL} @code{=[x,y,z]}, @var{W} @code{=[1,1,0]} $B$G$"$l$P(B
                   2756: x,y $B$K$D$$$F@QJ,$r9T$&!#(B
1.29      nakayama 2757: @end itemize
                   2758:
1.34      ohara    2759: $B0J2<$O!"%$%G%"%k(B
                   2760: @iftex
                   2761: @tex
1.29      nakayama 2762: $I = D \cdot \{2 t \partial_x + \partial_t, t \partial_t + 2 x \partial_x + 2\} $
1.34      ohara    2763: @end tex
1.29      nakayama 2764: $B$N(B
1.34      ohara    2765: @tex
                   2766: $t$
                   2767: @end tex
                   2768: @end iftex
                   2769: @ifinfo
                   2770: I = D . @{2 t dx + dt, t dt + 2 x dx + 2 @} $B$N(B t
                   2771: @end ifinfo
1.29      nakayama 2772: $B$K$D$$$F$N@QJ,%$%G%"%k$r7W;;$7$?Nc$G$"$k!#(B([SST, Ex5.5.2, Ex5.5.6])
                   2773: @example
                   2774: [1351] nk_restriction.integration([2*t*dx+dt,2*x*dx+t*dt+2],[t,x],
                   2775: [dt,dx],[1,0]);
                   2776: -- generic_bfct_and_gr :0.001sec(0.001796sec)
                   2777: generic bfct : [[1,1],[s,1],[s-1,1]]
                   2778: S0 : 1
1.33      ohara    2779: B_@{S0@} length : 2
1.29      nakayama 2780: -- fctr(BF) + base :0.001sec(0.0006731sec)
                   2781: [[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]]]
                   2782: @end example
                   2783:
1.34      ohara    2784: @node nk_restriction.integration_ideal,,, D $B2C72$N@)8B$K4X$9$k4X?t(B
1.29      nakayama 2785: @subsection @code{nk_restriction.integration_ideal}
                   2786: @comment --- $B:w0zMQ%-!<%o!<%I(B
                   2787: @findex nk_restriction.integration_ideal
                   2788:
                   2789: @comment --- $B4X?t$N4JC1$J@bL@(B ---
                   2790: @table @t
1.34      ohara    2791: @item nk_restriction.integration_ideal(@var{Id}, @var{VL}, @var{DVL}, @var{W})
1.29      nakayama 2792: :: $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
                   2793: @end table
                   2794:
                   2795: @comment --- $B0z?t$N4JC1$J@bL@(B ---
                   2796: @table @var
                   2797: @item Id
                   2798: $B%$%G%"%k$N@8@.85$N%j%9%H(B
                   2799: @item VL
                   2800: $BJQ?t$N%j%9%H(B
                   2801: @item DVL
                   2802: $BJQ?t$N%j%9%H(B(@var{VL} $B$KBP1~$9$kHyJ,:nMQAG$NJ}$NJQ?t(B)
                   2803: @item W
                   2804: $B=E$_%Y%/%H%k$rI=$9%j%9%H(B
                   2805: @end table
                   2806:
                   2807: @comment --- $B$3$3$G4X?t$N>\$7$$@bL@(B ---
                   2808: @comment --- @itemize$B!A(B@end itemize $B$O2U>r=q$-(B ---
                   2809: @comment --- @bullet $B$O9uE@IU$-(B ---
                   2810: @itemize @bullet
                   2811: @item
                   2812: @var{W} $B$NMWAG$OHsIi@0?t$G!"(B0 $BHVL\$NMWAG$+$iO"B3$7$F@5$N@0?t$,F~$i$J$1$l$P$J$i$J$$!#(B
                   2813: ($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)
                   2814: @item
                   2815: $B@5$N=E$_$r;}$DJQ?t$K$D$$$F$N@QJ,$r9T$&!#(B
1.34      ohara    2816: $BNc$($P!"(B@var{VL} @code{=[x,y,z]}, @var{W} @code{=[1,1,0]} $B$G$"$l$P(B
                   2817: x,y $B$K$D$$$F@QJ,$r9T$&!#(B
1.29      nakayama 2818: @end itemize
                   2819:
1.34      ohara    2820: $B0J2<$O!"%$%G%"%k(B
                   2821: @iftex
                   2822: @tex
1.29      nakayama 2823: $I = D \cdot \{2 t \partial_x + \partial_t, t \partial_t + 2 x \partial_x + 2\} $
1.34      ohara    2824: @end tex
1.29      nakayama 2825: $B$N(B
1.34      ohara    2826: @tex
                   2827: $t$
                   2828: @end tex
                   2829: @end iftex
                   2830: @ifinfo
                   2831: I = D . @{2 t dx + dt, t dt + 2 x dx + 2 @} $B$N(B t
                   2832: @end ifinfo
1.29      nakayama 2833: $B$K$D$$$F$N@QJ,%$%G%"%k$r7W;;$7$?Nc$G$"$k!#(B([SST, Ex5.5.2, Ex5.5.6])
                   2834: @example
                   2835: [1431]  nk_restriction.integration_ideal([2*t*dx+dt,t*dt+2*x*dx+2],[t,x],
                   2836: [dt,dx],[1,0]);
                   2837: -- generic_bfct_and_gr :0.002999sec(0.002623sec)
                   2838: generic bfct : [[1,1],[s,1],[s-1,1]]
                   2839: S0 : 1
1.33      ohara    2840: B_@{S0@} length : 2
1.29      nakayama 2841: -- fctr(BF) + base :0.001sec(0.001091sec)
                   2842: -- integration_ideal_internal :0.002sec(0.001879sec)
                   2843: [2*x*dx+1]
                   2844: [1432]
                   2845: @end example
                   2846:
1.42      nisiyama 2847: @node nk_restriction.ann_mul,,, D $B2C72$N@)8B$K4X$9$k4X?t(B
                   2848: @subsection @code{nk_restriction.ann_mul}
                   2849: @comment --- $B:w0zMQ%-!<%o!<%I(B
                   2850: @findex nk_restriction.ann_mul
                   2851:
                   2852: @comment --- $B4X?t$N4JC1$J@bL@(B ---
                   2853: @table @t
                   2854: @item nk_restriction.ann_mul(@var{I}, @var{J}, @var{VL}, @var{DVL})
                   2855: :: @var{f} $B$rNm2=$9$k%[%m%N%_%C%/(B D $B%$%G%"%k(B @var{I},
                   2856: @var{g} $B$rNm2=$9$k%[%m%N%_%C%/(B D $B%$%G%"%k$r(B @var{J} $B$H$7$?$H$-(B,
                   2857: @var{fg} $B$rNm2=$9$k%[%m%N%_%C%/(B D $B%$%G%"%k$rJV$9(B.
                   2858: @end table
                   2859:
                   2860: @comment --- $B0z?t$N4JC1$J@bL@(B ---
                   2861: @table @var
                   2862: @item I
                   2863: $B%$%G%"%k$N@8@.85$N%j%9%H(B
                   2864: @item J
                   2865: $B%$%G%"%k$N@8@.85$N%j%9%H(B
                   2866: @item VL
                   2867: $BJQ?t$N%j%9%H(B
                   2868: @item DVL
                   2869: $BJQ?t$N%j%9%H(B(@var{VL} $B$KBP1~$9$kHyJ,:nMQAG$NJ}$NJQ?t(B)
                   2870: @end table
                   2871:
                   2872: @comment --- $B$3$3$G4X?t$N>\$7$$@bL@(B ---
                   2873: @comment --- @itemize$B!A(B@end itemize $B$O2U>r=q$-(B ---
                   2874: @comment --- @bullet $B$O9uE@IU$-(B ---
                   2875: @itemize @bullet
                   2876: @item test_ann_mul(), test_ann_mul2(), test_ann_mul3() $B$r;2>H(B.
                   2877: @end itemize
                   2878:
                   2879:
                   2880: @node nk_restriction (option) ,,, D $B2C72$N@)8B(B, $B@QJ,$K4X$9$k4X?t$N@bL@(B (option)
1.36      nisiyama 2881: @subsection @code{nk_restriction (option)}
                   2882: @comment --- $B:w0zMQ%-!<%o!<%I(B
                   2883: @findex nk_restriction (option)
                   2884:
                   2885: @comment --- $B4X?t$N4JC1$J@bL@(B ---
                   2886: @table @t
                   2887: @item nk_restriction.restriction(... | inhomo=@var{n}, param=@var{p}, s0=@var{m})
1.39      nisiyama 2888: @item nk_restriction.restriction_ideal(... | inhomo=@var{n}, param=@var{p}, s0=@var{m}, ht=@var{b}, ord=@var{ord})
1.36      nisiyama 2889: @item nk_restriction.integration(... | inhomo=@var{n}, param=@var{p}, s0=@var{m})
1.39      nisiyama 2890: @item nk_restriction.integration_ideal(... | inhomo=@var{n}, param=@var{p}, s0=@var{m}, ht=@var{b}, ord=@var{ord})
1.36      nisiyama 2891: :: D $B2C72$N@)8B(B, $B@QJ,$K4X$9$k4X?t$N%*%W%7%g%s$N@bL@(B
                   2892: @end table
                   2893:
                   2894: @comment --- $B0z?t$N4JC1$J@bL@(B ---
                   2895: @table @var
                   2896: @item @var{n}
                   2897: 0 $B$^$?$O(B 1
                   2898: @item @var{p}
                   2899: $B%j%9%H(B ($B78?tBN$KB0$9$kJQ?t$N%j%9%H(B)
                   2900: @item @var{m}
                   2901: $B@0?t(B
1.39      nisiyama 2902: @item @var{b}
                   2903: 0, 1, 2, 3 $B$N$$$:$l$+(B
                   2904: @item @var{ord}
                   2905: $B=E$_(B0$B$NJQ?t$KBP$9$k9`=g=x(B
1.36      nisiyama 2906: @end table
                   2907:
                   2908: @comment --- $B$3$3$G4X?t$N>\$7$$@bL@(B ---
                   2909: @comment --- @itemize$B!A(B@end itemize $B$O2U>r=q$-(B ---
                   2910: @comment --- @bullet $B$O9uE@IU$-(B ---
                   2911: @itemize @bullet
                   2912: @item @var{n} $B$,(B 0 $B$G$J$$$H$-(B, $BHs@F<!ItJ,$N7W;;$r9T$&(B.
                   2913:
                   2914: restriction_ideal (integration_ideal) $B$K4X$7$F$O(B, $B%$%G%"%k(B @code{I} $B$N(B
                   2915: @code{M} $BJQ?t$K$D$$$F$N@)8B(B($B@QJ,(B)$B%$%G%"%k(B @code{J} $B$H(B
                   2916:
                   2917: @iftex
                   2918: @tex
                   2919: {\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}
                   2920: @end tex
                   2921: @end iftex
                   2922: @ifinfo
                   2923: 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
                   2924: @end ifinfo
                   2925:
                   2926: $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.
                   2927: $B>\$7$$=PNO$N8+J}$K$D$$$F$O(B, $B2<$NNc$d%=!<%9$N(B @code{inhomo_part} $B$N(B
                   2928: $B%3%a%s%H$r;2>H(B.
                   2929:
                   2930: restriction, integration $B$KBP$9$k(B @code{inhomo} $B%*%W%7%g%s$O(B
                   2931: restriction_ideal, integration_ideal $B$N%5%V%k!<%A%s$H$7$F$N<B9TMQ$J$N$G(B,
                   2932: $B%f!<%6$,L@<(E*$K;HMQ$9$k$3$H$O$J$$(B.
                   2933:
                   2934: @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.
                   2935: $B$^$?(B, ``generic'' $B$G$"$k$3$H$,2>Dj$5$l$k(B.
                   2936: $B$D$^$j(B, $B$3$l$i$NJQ?t$K0MB8$9$k$h$&$J(B generic b-$B4X?t$N:,$O(B,
                   2937: $B:GBg@0?t:,$G$J$$$H$$$&$3$H$G$"$k(B.
                   2938:
                   2939: @item @var{param} $B$,;XDj$5$l$k$H(B, generic b-$B4X?t$N7W;;$O(B noro $B$K$h$k(B
                   2940: $B9bB.%"%k%4%j%:%`$G$O$J$/(B, $B>C5nK!$,MQ$$$i$l$k(B.
                   2941: @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
                   2942: $BMxMQ$G$-$k(B.
                   2943:
                   2944: @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
                   2945: $B@)8B(B, $B@QJ,Ey$N7W;;$r9T$&(B.
1.39      nisiyama 2946:
                   2947: @item @var{b} $B$K$h$j(B, $B2C72$N%0%l%V%J4pDl7W;;$K@F<!2=(B, trace $B%"%k%4%j%:%`(B
                   2948: $B$rMQ$$$k$+$I$&$+;XDj$G$-$k(B.
                   2949: $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.
                   2950:
                   2951: 0: $B@F<!2=$J$7(B, trace $B$J$7(B
                   2952:
                   2953: 1: $B@F<!2=$J$7(B, trace $B$"$j(B
                   2954:
                   2955: 2: $B@F<!2=$"$j(B, trace $B$J$7(B ($B%G%U%)%k%H(B)
                   2956:
                   2957: 3: $B@F<!2=$"$j(B, trace $B$"$j(B
                   2958:
                   2959: @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
                   2960: $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
                   2961: $B$H$7$F;HMQ$5$l$k$N$G7W;;8zN($KBg$-$J1F6A$rM?$($k2DG=@-$,$"$k(B.
                   2962: $B%G%U%)%k%H$O(B 0, $B$D$^$jA4<!?t5U<!=q<0=g=x$G$"$k(B.
                   2963:
                   2964: $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 2965: @end itemize
                   2966:
                   2967: $B0J2<$O(B,
                   2968: @iftex
                   2969: @tex
                   2970: $ t^{b-1} (1-t)^{c-b-1} (1-xt)^{-a} $
                   2971: @end tex
                   2972: $B$N(B annihilator
                   2973: @tex
                   2974: $I = D \cdot \{ x(1-x) \partial_x^2+((1-t) \partial_t-(a+b+1)x+c-1)
                   2975:  \partial_x-ab, (1-t)x \partial_x+t(1-t) \partial_t+(2-c)t+b-1,
                   2976:  (xt-1) \partial_x+at \}$
                   2977: @end tex
                   2978: $B$N(B
                   2979: @tex
                   2980: $t$
                   2981: @end tex
                   2982: $B$K$D$$$F$N@QJ,%$%G%"%k(B
                   2983: @tex
                   2984: $J$
                   2985: @end tex
                   2986: $B$r7W;;$7(B, Gauss $B$ND64v2?HyJ,J}Dx<0$rF3=P$7$?Nc$G$"$k(B. ([SST, Chap 1.3])
                   2987: @end iftex
                   2988: @ifinfo
                   2989: t^{b-1} (1-t)^{c-b-1} (1-xt)^{-a}
                   2990: $B$N(B annihilator
                   2991: I = D . @{ x(1-x)dx^2+((1-t)dt-(a+b+1)x+c-1)dx-ab,
                   2992:  (1-t)x dx+t(1-t)dt+(2-c)t+b-1, (xt-1)dx+at @}
                   2993: $B$N(B t $B$K$D$$$F$N@QJ,%$%G%"%k(B J
                   2994: $B$r7W;;$7(B, Gauss $B$ND64v2?HyJ,J}Dx<0$rF3=P$7$?Nc$G$"$k(B. ([SST, Chap 1.3])
                   2995: @end ifinfo
                   2996: @example
                   2997: [1555] A=ndbf.ann_n([t,1-t,1-x*t])$
                   2998: [1556] I=map(subst,A,s0,b-1,s1,c-b-1,s2,-a);
                   2999: [(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]
                   3000: [1557] J=nk_restriction.integration_ideal(I,[t,x],[dt,dx],[1,0]|inhomo=1, param=[a,b,c]);
                   3001: -- nd_weyl_gr :0sec(0.001875sec)
                   3002: -- weyl_minipoly_by_elim :0.008001sec(0.006133sec)
                   3003: -- generic_bfct_and_gr :0.008001sec(0.006181sec)
                   3004: generic bfct : [[-1,1],[s,1],[s-a+c-1,1]]
                   3005: S0 : 0
                   3006: B_{S0} length : 1
                   3007: -- fctr(BF) + base :0sec(0.003848sec)
                   3008: -- integration_ideal_internal :0sec(0.07707sec)
                   3009: [[(x^2-x)*dx^2+((a+b+1)*x-c)*dx+b*a],[[[[dt,(-t+1)*dx]],1]]]
                   3010: @end example
                   3011: @iftex
                   3012: $B$3$N=PNO$O(B
                   3013: @tex
                   3014: $\{(x^2-x) \partial_x^2+((a+b+1)x-c) \partial_x+ab \}
                   3015: - 1/1 \{ \partial_t (-t+1) \partial_x \} \in I$
                   3016: @end tex
                   3017: $B$G$"$k$3$H$r0UL#$9$k(B.
                   3018: @end iftex
                   3019: @ifinfo
                   3020: $B$3$N=PNO$O(B
                   3021: @{(x^2-x)dx^2+((a+b+1)x-c)dx+ab @} - 1/1 @{ dt (-t+1)dx @} \in I
                   3022: $B$G$"$k$3$H$r0UL#$9$k(B.
                   3023: @end ifinfo
                   3024:
1.42      nisiyama 3025: @node nk_restriction.trans_inhomo,,, D $B2C72$N@QJ,%$%G%"%k$NHs@F<!ItJ,$K4X$9$k4X?t(B
1.39      nisiyama 3026: @subsection @code{nk_restriction.trans_inhomo}
                   3027: @comment --- $B:w0zMQ%-!<%o!<%I(B
1.42      nisiyama 3028: @findex nk_restriction.trans_inhomo
1.39      nisiyama 3029:
                   3030: @comment --- $B4X?t$N4JC1$J@bL@(B ---
                   3031: @table @t
                   3032: @item nk_restriction.trans_inhomo(@var{P}, @var{INT}, @var{VL}, @var{DVL}, @var{W})
                   3033: :: 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
                   3034: @end table
                   3035:
                   3036: @comment --- $B0z?t$N4JC1$J@bL@(B ---
                   3037: @table @var
                   3038: @item P
                   3039: $B@QJ,%$%G%"%k$N85(B, $B$^$?$O@)8B%$%G%"%k$N85(B
                   3040: @item INT
                   3041: nk_restriction.integration_ideal( ... |inhomo=1); $B$^$?$O(B
                   3042:
                   3043: nk_restriction.restriction_ideal( ... |inhomo=1); $B$N=PNO(B
                   3044: @item VL
                   3045: $BJQ?t$N%j%9%H(B
                   3046: @item DVL
                   3047: $BJQ?t$N%j%9%H(B(@var{VL} $B$KBP1~$9$kHyJ,:nMQAG$NJ}$NJQ?t(B)
                   3048: @item W
                   3049: $B=E$_%Y%/%H%k$rI=$9%j%9%H(B
                   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{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.
                   3057: @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.
                   3058: @end itemize
                   3059:
1.42      nisiyama 3060: @node nk_restriction.ost_integration_ideal,,, D $B2C72$N@QJ,%$%G%"%k(B
                   3061: @subsection @code{nk_restriction.ost_integration_ideal}
                   3062: @comment --- $B:w0zMQ%-!<%o!<%I(B
                   3063: @findex nk_restriction.ost_integration_ideal
                   3064:
                   3065: @comment --- $B4X?t$N4JC1$J@bL@(B ---
                   3066: $B@QJ,NN0h$,6h4V$ND>@Q$G$"$k$h$&$J@QJ,$NK~$?$9(B
1.43      nisiyama 3067: $B%[%m%N%_%C%/@F<!HyJ,J}Dx<07O$rJV$9(B (Oaku-Shiraki-Takayama, 2003).
1.42      nisiyama 3068: @table @t
                   3069: @item nk_restriction.ost_integration_ideal(@var{Id}, @var{VL}, @var{DVL}, @var{W}, @var{LB}, @var{UB})
                   3070: :: Heaviside $B4X?t$H$N@Q$NK~$?$9HyJ,J}Dx<07O$N7W;;$K%7%g!<%H%+%C%HK!$rMQ$$$k(B.
                   3071: @item nk_restriction.ost_integration_ideal2(@var{Id}, @var{VL}, @var{DVL}, @var{W}, @var{LB}, @var{UB})
                   3072: :: Heaviside $B4X?t$H$N@Q$NK~$?$9HyJ,J}Dx<07O$N7W;;$K@)8B%$%G%"%k$rMQ$$$k(B.
                   3073: @end table
                   3074:
                   3075: @comment --- $B0z?t$N4JC1$J@bL@(B ---
                   3076: @table @var
                   3077: @item Id
                   3078: $B%$%G%"%k$N@8@.85$N%j%9%H(B
                   3079: @item VL
                   3080: $BJQ?t$N%j%9%H(B
                   3081: @item DVL
                   3082: $BJQ?t$N%j%9%H(B(@var{VL} $B$KBP1~$9$kHyJ,:nMQAG$NJ}$NJQ?t(B)
                   3083: @item W
                   3084: $B=E$_%Y%/%H%k$rI=$9%j%9%H(B
                   3085: @item LB
                   3086: $B@QJ,6h4V$N2<C<$rI=$9%j%9%H(B
                   3087: @item UB
                   3088: $B@QJ,6h4V$N>eC<$rI=$9%j%9%H(B
                   3089: @end table
                   3090:
                   3091: @comment --- $B$3$3$G4X?t$N>\$7$$@bL@(B ---
                   3092: @comment --- @itemize$B!A(B@end itemize $B$O2U>r=q$-(B ---
                   3093: @comment --- @bullet $B$O9uE@IU$-(B ---
                   3094: @itemize @bullet
                   3095: @item $B2<C<(B, $B>eC<$KL58BBg$r;XDj$9$k$H$-$O(B, $BJ8;zNs(B  "inf", "+inf", "-inf" $B$rMQ$$$k(B.
                   3096: @end itemize
                   3097:
1.43      nisiyama 3098: $B0J2<$O(B, Oaku-Shiraki-Takayama (2003) $B$NNc(B5.1$B$r7W;;$7$?$b$N$G$"$k(B.
1.42      nisiyama 3099: @iftex
                   3100: @tex
                   3101: $ \int_0^\infty \exp((-t^3+t)x) dt $
                   3102: @end tex
1.44    ! nisiyama 3103: $B$NHo@QJ,4X?t$NK~$?$9%[%m%N%_%C%/%$%G%"%k$O(B
1.42      nisiyama 3104: @tex
                   3105: $ I = \langle \partial_t +(3t^2-1)x, \partial_x+t^3-t \rangle $
                   3106: @end tex
                   3107: $B$G$"$k$+$i(B, $B$3$l$rF~NO$H$7$F<!$N$h$&$K7W;;$r9T$&(B.
                   3108: @end iftex
                   3109: @ifinfo
                   3110: \int_0^$B!g(B exp((-t^3+t)x) dt
                   3111: $B$NHs@QJ,4X?t$NK~$?$9%[%m%N%_%C%/%$%G%"%k$O(B
                   3112: I = < dt +(3t^2-1)x, dx+t^3-t >
                   3113: $B$G$"$k$+$i(B, $B$3$l$rF~NO$H$7$F<!$N$h$&$K7W;;$r9T$&(B.
                   3114: @end ifinfo
                   3115: @example
                   3116: [1871] Id=[dt+(3*t^2-1)*x, dx+t^3-t]$
                   3117: [1872] VL=[t,x]$
                   3118: [1873] DVL=[dt,dx]$
                   3119: [1874] W=[1,0]$
                   3120: [1875] nk_restriction.ost_integration_ideal(Id,VL,DVL,W,[0],["inf"]);
                   3121: -- nd_weyl_gr :0.008sec(0.006768sec)
                   3122: -- weyl_minipoly :0.004001sec(0.003029sec)
                   3123: -- generic_bfct_and_gr :0.012sec(0.0129sec)
                   3124: generic bfct : [[1,1],[s,1],[s-2,1]]
                   3125: S0 : 2
                   3126: B_{S0} length : 3
                   3127: -- fctr(BF) + base :0.008sec(0.007395sec)
                   3128: -- integration_ideal_internal :0.012sec + gc : 0.016sec(0.04311sec)
                   3129: [-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]
                   3130:
                   3131:
                   3132: [1876] nk_restriction.ost_integration_ideal2(Id,VL,DVL,W,[0],["inf"]);
                   3133: ($BN,(B)
                   3134: [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]
                   3135: @end example
                   3136: $B$3$N=PNO$O(B, $B@QJ,$rNm2=$9$k%[%m%N%_%C%/7O$G$"$k(B.
                   3137:
1.44    ! nisiyama 3138: @node nk_restriction.ost_sum,,, D $B2C72$N@QJ,%$%G%"%k(B
        !          3139: @subsection @code{nk_restriction.ost_sum}
        !          3140: @comment --- $B:w0zMQ%-!<%o!<%I(B
        !          3141: @findex nk_restriction.ost_sum
        !          3142:
        !          3143: @comment --- $B4X?t$N4JC1$J@bL@(B ---
        !          3144: @table @t
        !          3145: @item nk_restriction.ost_sum(@var{Id}, @var{VL}, @var{DVL}, @var{W})
        !          3146: :: $BOB$NK~$?$9(B($B@F<!(B/$BHs@F<!(B)$B:9J,J}Dx<07O$rJV$9(B.
        !          3147: @end table
        !          3148:
        !          3149: @comment --- $B0z?t$N4JC1$J@bL@(B ---
        !          3150: @table @var
        !          3151: @item Id
        !          3152: $B%$%G%"%k$N@8@.85$N%j%9%H(B
        !          3153: @item VL
        !          3154: $BJQ?t$N%j%9%H(B
        !          3155: @item DVL
        !          3156: $BJQ?t$N%j%9%H(B(@var{VL} $B$KBP1~$9$k:9J,:nMQAG$NJ}$NJQ?t(B)
        !          3157: @item W
        !          3158: $B=E$_%Y%/%H%k$rI=$9%j%9%H(B
        !          3159: @end table
        !          3160:
        !          3161: @comment --- $B$3$3$G4X?t$N>\$7$$@bL@(B ---
        !          3162: @comment --- @itemize$B!A(B@end itemize $B$O2U>r=q$-(B ---
        !          3163: @comment --- @bullet $B$O9uE@IU$-(B ---
        !          3164: @itemize @bullet
        !          3165: @item Oaku-Shiraki-Takayama (2003) $B$NBh(B6$B@a$N%"%k%4%j%:%`$N<BAu(B.
        !          3166: @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.
        !          3167: @end itemize
        !          3168:
        !          3169: $B0J2<$O(B, Oaku-Shiraki-Takayama (2003) $B$NNc(B6.5$B$NHs@F<!ItJ,$^$G7W;;$7$?$b$N$G$"$k(B.
        !          3170: @iftex
        !          3171: @tex
        !          3172: $ \sum_{k=a}^b {n \choose k} $
        !          3173: @end tex
        !          3174: $B$NHsOB4X?t$NK~$?$9%[%m%N%_%C%/%$%G%"%k$O(B
        !          3175: @tex
        !          3176: $ I = \langle (n-k+1)E_n-(n+1), (k+1)E_k-(n-k) \rangle $
        !          3177: @end tex
        !          3178: $B$G$"$k$+$i(B, $B$3$l$rF~NO$H$7$F<!$N$h$&$K7W;;$r9T$&(B.
        !          3179: @end iftex
        !          3180: @ifinfo
        !          3181: \sum_{k=a}^b n_C_k
        !          3182: $B$NHsOB4X?t$NK~$?$9%[%m%N%_%C%/%$%G%"%k$O(B
        !          3183: I = < (n-k+1)E_n-(n+1), (k+1)E_k-(n-k) >
        !          3184: $B$G$"$k$+$i(B, $B$3$l$rF~NO$H$7$F<!$N$h$&$K7W;;$r9T$&(B.
        !          3185: @end ifinfo
        !          3186: @example
        !          3187: [1871] Id=[(n-k+1)*en-(n+1), (k+1)*ek-(n-k)]$
        !          3188: [1872] VL=[k,n]$
        !          3189: [1873] DVL=[ek,en]$
        !          3190: [1874] W=[1,0]$
        !          3191: [1875] nk_restriction.ost_sum(Id,VL,DVL,W|inhomo=1);
        !          3192: -- nd_weyl_gr :0.006667sec(0.004057sec)
        !          3193: -- weyl_minipoly :0sec(0.001163sec)
        !          3194: -- generic_bfct_and_gr :0.01sec(0.007085sec)
        !          3195: generic bfct : [[1,1],[s,1]]
        !          3196: S0 : 0
        !          3197: B_{S0} length : 1
        !          3198: -- fctr(BF) + base :0.003333sec(0.001785sec)
        !          3199: -- restriction_ideal_internal :0sec(0.002336sec)
        !          3200: [[(en-2)*n+en-2],[[[[ek-1,[(-en+1)*n-en+1,1]]],1]]]
        !          3201: @end example
        !          3202:
        !          3203:
1.30      takayama 3204: @noindent
                   3205: ChangeLog
                   3206: @itemize @bullet
                   3207: @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 3208: @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.
                   3209: @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
                   3210: $B?7$?$J4X?t(B trans_inhomo() $B$,DI2C$5$l$?(B. 1.10--1.13 $B$r8+$h(B.
1.44    ! nisiyama 3211: @item 2011-08 $B$K(B ost_sum() $B$,DI2C$5$l$?(B. 1.20 $B$r8+$h(B.
1.30      takayama 3212: @end itemize
                   3213:
1.37      takayama 3214: @node $B$=$NB>(B($BL$J,N`(B),,, $B<B83E*;EMM$N4X?t(B
                   3215: @section $B$=$NB>(B($BL$J,N`(B)
                   3216:
                   3217: @node tk_pfn.rkn,,, $B<B83E*;EMM$N4X?t(B
                   3218: @subsection @code{tk_pfn.rkn}
                   3219: @findex tk_pfn.rkn
                   3220:
                   3221: @comment --- $B4X?t$N4JC1$J@bL@(B ---
                   3222: @comment --- @itemx $B$OJ#?t$KBP$7$F@bL@$r0l$D$D$1$k>l9g$K;H$&(B ---
                   3223: @table @t
                   3224: @item tk_pfn.rkn(@var{F},@var{X},@var{Y},@var{Xs},@var{Ys},@var{Ht},@var{H})
                   3225: :: Pfaffian $BJ}Dx<0$KBP$9$k(B Runge-Kutta $BK!(B
                   3226: @end table
                   3227:
                   3228: @table @var
                   3229: @item return
                   3230: $B%j%9%H(B  $BFHN)JQ?t$H2r$NAH(B
                   3231: @item F, X, Y, Xs, Ys, Ht, H
                   3232: @var{F} $B$O(B Pfaffian $BJ}Dx<0$N78?t9TNs%j%9%H(B.
                   3233: @var{X} $B$OFHN)JQ?t%j%9%H(B.
                   3234: @var{Y} $B$O=>B0JQ?t%j%9%H(B.
                   3235: @var{Xs} $BFHN)JQ?t$N=PH/CM%j%9%H(B.
                   3236: @var{Ys} $B$O=PH/;~$N=>B0JQ?t$NCM%j%9%H(B.
                   3237: @var{Xt} $B$ODd;_$9$kFHN)JQ?t$NCM%j%9%H(B.
                   3238: @var{H} $B$OHy>/?t(B.
                   3239: @end table
                   3240:
                   3241: @itemize @bullet
                   3242: @item $B$3$N4X?t$OO"N)(BPfaffian$BJ}Dx<0(B dY/d X[i] = F[i] Y $B$r?tCME*$K2r$/(B.
                   3243: @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.
                   3244: @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.
                   3245: @item X[i] $B$,F0$/HO0O$O<B?t$G$J$$$H$$$1$J$$(B.
                   3246: @item Xs[i] <= X[i] <= Xt[i] $B$^$?$O(B Xt[i] <= X[i] <= Xs[i] $B$G$"$k(B.
                   3247: @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.
                   3248: @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.
                   3249: @item $B;29M(B. taka_runge_kutta.rr, yang.rr
                   3250: @end itemize
                   3251:
                   3252: @example
                   3253: [1355] import("tk_pfn.rr");
                   3254: [1590]  tk_pfn.test1();
                   3255: Value at (3,0.1)[8.99,6,-0.2]
                   3256: Value at (1,3)[-8,2,-6]
                   3257: [[[1,3],-8,2,-6],
                   3258:  [[1,2.9],-7.41,2,-5.8],
                   3259:  --- snip ---
                   3260:  [[3,0.1],8.99,6,-0.2]]
                   3261: @end example
                   3262:
                   3263:
                   3264: @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
                   3265: @comment --- openxm $B$N30It$+$i$N4sM?$b=R$Y$k(B. Credit.
                   3266: @noindent
                   3267: ChangeLog
                   3268: @itemize @bullet
                   3269: @item $B$3$N4X?t$O(B 2009-12 $B$+$i(B 2010-01 $B$K$+$1$F:G=i$NHG$,=q$+$l$?(B.
                   3270: @item @code{OpenXM/src/asir-contrib/packages/src/tk_pfn.rr} 1.1, 1.2
                   3271: @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.
                   3272: @end itemize
1.29      nakayama 3273:
1.40      takayama 3274:
                   3275: @node tk_pfn.graph,,, $B<B83E*;EMM$N4X?t(B
                   3276: @subsection @code{tk_pfn.graph}
                   3277: @findex tk_pfn.graph
                   3278:
                   3279: @comment --- $B4X?t$N4JC1$J@bL@(B ---
                   3280: @comment --- @itemx $B$OJ#?t$KBP$7$F@bL@$r0l$D$D$1$k>l9g$K;H$&(B ---
                   3281: @table @t
                   3282: @item tk_pfn.graph(@var{Pf},@var{Dom},@var{Iv},@var{Step})
                   3283: :: 2$BJQ?t(B Pfaffian $BJ}Dx<0$r(B Runge-Kutta $BK!$G2r$$$F%0%i%UI=<($9$k(B.
                   3284: @end table
                   3285:
                   3286: @table @var
                   3287: @item return
1.41      takayama 3288: $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, ...].
                   3289: [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
                   3290: y $B$NCM$,30B&%k!<%W(B, x $B$NCM$,FbB&%k!<%W$N7A<0$GA}$($k(B.
1.40      takayama 3291: @item Pf, Dom, Iv, Step
                   3292: @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.
                   3293: @var{Dom} $B%j%9%H(B. $B2r$/$Y$-NN0h(B.
                   3294: @var{Iv} $B%j%9%H(B. $BNN0h$N:8C<$G$N=i4|CM(B.
                   3295: @var{Step} $B9o$_I}(B.
                   3296: @end table
                   3297:
                   3298: @itemize @bullet
                   3299: @item tk_pf2.rr, mt_graph.rr $B$r(B import $B$7$F$*$/I,MW$,$"$k(B.
                   3300: @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.
                   3301: @item @var{Dom} $B$O(B [[xmin,xmax],[ymin,ymax]] $B$N7A<0(B.
                   3302: @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.
                   3303: @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 3304: @item @var{Dom} $B$NC<$O%0%i%UI=<($N;~$K0lIt%+%C%H$5$l$k$N$GCm0U(B.
1.40      takayama 3305: @end itemize
                   3306:
                   3307: @example
                   3308: [1355] import("tk_pf2.rr"); import("mt_graph.rr"); import("tk_pfn.rr");
1.41      takayama 3309: [1590] tk_pfn.testgraph1();
1.40      takayama 3310:
                   3311: $B$3$3$G(B testgraph1() $B$O0J2<$N$H$*$j(B.
                   3312: def testgraph1() {
                   3313:   /* tk_bess2.bess2pf(1/2); */
                   3314:   Pf=  [[[ 0, (1)/(x), 0 ],
                   3315:          [ -x, (2*x^2+1)/(x), -2*x ],
                   3316:          [ -y, 0, 0 ]],
                   3317:         [[ 0, 0, (1)/(y) ],
                   3318:          [ -x, 0, 0 ],
                   3319:          [ -x, (1/2)/(x), (-1/2)/(y) ]]];
                   3320:   /* tk_bess2.bess2Iv(1/2,[0.5,1.5]); */
                   3321:   Iv = [0.105994,-0.651603,-0.760628];
                   3322:   Dom=[[0.5,1.5],[1.5,9]];
                   3323:   Step = 0.5;
1.41      takayama 3324:   return tk_pfn.graph(Pf,Dom,Iv,Step | fit=1);
1.40      takayama 3325: }
                   3326:
                   3327:
                   3328: @end example
                   3329:
                   3330:
                   3331: @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
                   3332: @comment --- openxm $B$N30It$+$i$N4sM?$b=R$Y$k(B. Credit.
                   3333: @noindent
                   3334: ChangeLog
                   3335: @itemize @bullet
                   3336: @item $B$3$N4X?t$O(B 2010-08 $B$K:G=i$NHG$,=q$+$l$?(B.
                   3337: @item @code{OpenXM/src/asir-contrib/packages/src/tk_pfn.rr} 1.8
                   3338: @end itemize
                   3339:
1.41      takayama 3340: @node tk_rk.runge_kutta_4,,, $B<B83E*;EMM$N4X?t(B
                   3341: @subsection @code{tk_rk.runge_kutta_4}
                   3342: @findex tk_rk.runge_kutta_4
                   3343:
                   3344: @comment --- $B4X?t$N4JC1$J@bL@(B ---
                   3345: @comment --- @itemx $B$OJ#?t$KBP$7$F@bL@$r0l$D$D$1$k>l9g$K;H$&(B ---
                   3346: @table @t
                   3347: @item tk_rk.runge_kutta_4(@var{Eq},@var{X},@var{Y},@var{X0},@var{Y0},@var{Terminal},@var{Step})
                   3348: :: 4$B<!$N(B Runge-Kutta $BK!$K$h$kHyJ,J}Dx<0$N?tCM6a;w2r(B
                   3349: @end table
                   3350:
                   3351: @table @var
                   3352: @item return
                   3353: $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, ...].
                   3354:  @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.
                   3355: @item Eq, X, Y, Step
                   3356: @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.
                   3357: @var{X} $BFHN)JQ?tL>(B.
                   3358: @var{Y} $B%j%9%H(B. $B=>B0JQ?t$N%j%9%H(B.
                   3359: @var{Step} $B9o$_I}(B.
                   3360: @item X0, Y0, Terminal
                   3361: @var{X0} $B=PH/E@$N(B @var{X} $B$NCM(B.
                   3362: @var{Y0} $B=PH/E@$G$N(B @var{Y} $B$N=i4|CM(B.
                   3363: @var{Terminal} @var{X} $B$N=*CeE@(B.
                   3364: @end table
                   3365:
                   3366: @itemize @bullet
                   3367: @item taka_runge_kutta.rr $B$r(B import $B$7$F$*$/I,MW$,$"$k(B.
                   3368: @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.
                   3369: @item $BNc$O%=!<%9%3!<%I(B (@code{OpenXM/lib/asir-contrib/src/taka_runge_kutta.rr} )$B$N(B
                   3370: @code{tk_rk.test4()} $B$r;2>H(B.
                   3371: @end itemize
                   3372:
                   3373: @example
                   3374: [1355] import("taka_runge_kutta.rr");
                   3375: [1590] tk_rk.test4();
                   3376:
                   3377: $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)
                   3378: taka_plot_auto $B$O2<J}8~$G(B y $B$,@5(B.
                   3379:
                   3380: def test4() {
                   3381:   A=runge_kutta_4([y1,-y0],x,[y0,y1],0,[1,0],3.14*2,0.1);
                   3382:   taka_plot_auto(A);
                   3383:   return(A);
                   3384: }
                   3385:
                   3386: @end example
                   3387:
                   3388:
                   3389: @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
                   3390: @comment --- openxm $B$N30It$+$i$N4sM?$b=R$Y$k(B. Credit.
                   3391: @noindent
                   3392: ChangeLog
                   3393: @itemize @bullet
                   3394: @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
                   3395: @item @code{OpenXM/src/asir-contrib/packages/src/taka_runge_kutta.rr} 1.17
                   3396: @end itemize
                   3397:
                   3398: @node tk_rk.runge_kutta_4_linear,,, $B<B83E*;EMM$N4X?t(B
                   3399: @subsection @code{tk_rk.runge_kutta_4_linear}
                   3400: @findex tk_rk.runge_kutta_4_linear
                   3401:
                   3402: @comment --- $B4X?t$N4JC1$J@bL@(B ---
                   3403: @comment --- @itemx $B$OJ#?t$KBP$7$F@bL@$r0l$D$D$1$k>l9g$K;H$&(B ---
                   3404: @table @t
                   3405: @item tk_rk.runge_kutta_4_linear(@var{P},@var{X},@var{Y},@var{X0},@var{Y0},@var{Terminal},@var{Step})
                   3406: :: 4$B<!$N(B Runge-Kutta $BK!$K$h$kHyJ,J}Dx<0$N?tCM6a;w2r(B. $B@~7AJ}Dx<0@lMQ(B.
                   3407: @end table
                   3408:
                   3409: @table @var
                   3410: @item return
                   3411: $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, ...].
                   3412:  @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.
                   3413: @item P, X, Y, Step
                   3414: @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.
                   3415: @var{X} $BFHN)JQ?tL>(B.
                   3416: @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.
                   3417: @var{Step} $B9o$_I}(B.
                   3418: @item X0, Y0, Terminal
                   3419: @var{X0} $B=PH/E@$N(B @var{X} $B$NCM(B.
                   3420: @var{Y0} $B=PH/E@$G$N(B @var{Y} $B$N=i4|CM(B.
                   3421: @var{Terminal} @var{X} $B$N=*CeE@(B.
                   3422: @end table
                   3423:
                   3424: @itemize @bullet
                   3425: @item taka_runge_kutta.rr $B$r(B import $B$7$F$*$/I,MW$,$"$k(B.
                   3426: @end itemize
                   3427:
                   3428: @example
                   3429: [1355] import("taka_runge_kutta.rr");
                   3430: [1590] A=tk_rk.runge_kutta_4_linear([[0,1],[-1,0]],x,[ ], 0, [1,0], 3.14*2, 0.1);
                   3431: [1591] taka_plot_auto(A);
                   3432:
                   3433: $B?6F0$NJ}Dx<0(B, y0'=y1, y1'=-y0 (y0''+y0=0). $BEz$O(B y0=cos(x) $B$r2r$$$F$$$k(B.
                   3434: taka_plot_auto $B$O2<J}8~$G(B y $B$,@5(B.
                   3435:
                   3436: @end example
                   3437:
                   3438:
                   3439: @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
                   3440: @comment --- openxm $B$N30It$+$i$N4sM?$b=R$Y$k(B. Credit.
                   3441: @noindent
                   3442: ChangeLog
                   3443: @itemize @bullet
                   3444: @item 2010$BG/(B Pfaffian $B$N?tCM2r@O$N0Y$K:F@0Hw(B.
                   3445: @item @code{OpenXM/src/asir-contrib/packages/src/taka_runge_kutta.rr} 1.17
                   3446: @end itemize
                   3447:
1.40      takayama 3448:
                   3449:
1.38      takayama 3450: @node fj_simp.simplify,,, $B<B83E*;EMM$N4X?t(B
                   3451: @subsection @code{fj_simp.simplify}
                   3452: @findex fj_simp.simplify
                   3453:
                   3454: @comment --- $B4X?t$N4JC1$J@bL@(B ---
                   3455: @comment --- @itemx $B$OJ#?t$KBP$7$F@bL@$r0l$D$D$1$k>l9g$K;H$&(B ---
                   3456: @table @t
                   3457: @item fj_simp.simplify(@var{arg1})
                   3458: :: arg1 $B$r4JC12=$9$k(B.
                   3459: @end table
                   3460:
                   3461: @table @var
                   3462: @item return
                   3463: $BB?9`<0(B, $BM-M}<0(B $B$^$?$O(B quote
                   3464: @item arg1
                   3465: $BB?9`<0(B $B$^$?$O(B $BM-M}<0(B
                   3466: @end table
                   3467:
                   3468: @itemize @bullet
                   3469: @item
                   3470: $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.
                   3471: @item
                   3472: $B$3$N4X?t$O(B
                   3473: Joel S. Cohen, Computer Algebra and Symbolic Computation,
                   3474: http://web.cs.du.edu/~jscohen/MathematicalMethods/index.htm
                   3475: $B$K5-=R$5$l$F$$$k(B Automatic simplification algorithm $B$H(B
                   3476: B.F.Caviness, R.J.Fateman, Simplification of Radical Expressions (1976)
                   3477: $B$K5-=R$5$l$F$$$k(B radcan $B%"%k%4%j%:%`$N<BAu$G$"$k(B.
                   3478: @item
                   3479: $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
                   3480: $BCm0U$,I,MW$G$"$k(B. (x^a = exp(a*log(x)) $B$J$N$G(B)
                   3481: @end itemize
                   3482:
                   3483: @example
                   3484: load("fj_simplify.rr");
                   3485: [1434] simplify((x^(1/2))^3);
                   3486: ((x)^(3/2))
                   3487: [1435] simplify((2^(1/2))^2);
                   3488: 2
                   3489: [1436] simplify((2+2^(1/2))^3);
                   3490: 14*((2)^(1/2))+20
                   3491: [1437] simplify(exp(x)*exp(-x+y));
                   3492: ((@@e)^(y))
                   3493: @end example
                   3494:
                   3495: @table @t
                   3496: @item $B;2>H(B
                   3497: @ref{quote}
                   3498: @end table
                   3499:
                   3500: @noindent
                   3501: ChangeLog
                   3502: @itemize @bullet
                   3503: @item
                   3504: $B>-MhE*$K$O(B module $B2=$7$F(B fj_simp module $B$K4^$a$kM=Dj(B.
                   3505: poly_simplify $B$+$i(B fj_simp.simplify $B$r8F$V(B.
                   3506: @item
                   3507: Todo: exp $B0J30$NFC<l4X?t$K$D$$$F$N(Bsimplification $B$N5!G=(B.
                   3508: @item
                   3509: $B$3$N4X?t$O(B 2010.01 $B$K(B M.Fujimoto $B$K$h$j:G=i$NHG$,=q$+$l$?(B.
                   3510: OpenXM/src/asir-contrib/packages/src/fj_simplify.rr
                   3511: @end itemize
                   3512:
1.23      takayama 3513: @comment -----------  $B0J2<$O8+K\(B. $B>C$9$J(B.
1.19      takayama 3514: @comment ****************************************************************
1.34      ohara    3515: @comment --- $B"~"~"~"~(B  $B0J2<B>$N4X?t$K$D$$$F??;w$7$F5-=R$9$k(B. $B"~"~"~"~(B
1.3       takayama 3516: @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    3517: @comment --- $B"~"~"~"~(B  $B4X?t(B syz_pqr, xyz_stu $B$N@bL@(B $B"~"~"~"~(B
1.4       takayama 3518: @comment --- $BJ#?t$N4X?t$r$^$H$a$F@bL@$9$kNc(B ---
                   3519: @node xyz_pqr,,, $B<B83E*;EMM$N4X?t(B
                   3520: @subsection @code{xyz_pqr}, @code{syz_stu}
                   3521: @findex xyz_pqr
                   3522: @findex xyz_stu
                   3523:
1.3       takayama 3524: @comment --- $B4X?t$N4JC1$J@bL@(B ---
                   3525: @comment --- @itemx $B$OJ#?t$KBP$7$F@bL@$r0l$D$D$1$k>l9g$K;H$&(B ---
                   3526: @table @t
1.1       takayama 3527: @item xyz_pqr(@var{arg1},@var{arg2}[,@var{flag}])
                   3528: @itemx xyz_stu(@var{arg1},@var{arg2})
                   3529: :: xyz $B$K4X$9$kA`:n(B.
                   3530: @end table
                   3531:
                   3532: @table @var
                   3533: @item return
                   3534: $B@0?t(B
                   3535: @item arg1, arg2
                   3536: $B@0?t(B
                   3537: @item flag
                   3538: 0 $B$^$?$O(B 1
                   3539: @end table
                   3540:
                   3541: @itemize @bullet
1.3       takayama 3542: @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 3543: @item
                   3544: @code{xyz_pqr()} $B$O(B, @var{arg1}, @var{arg2} $B$r(B pqr $B$9$k(B.
                   3545: @item
                   3546: @var{flag} $B$,(B 0 $B$G$J$$$H$-(B, $B%b%8%e%i7W;;$r9T$&(B.
                   3547: @item
                   3548: @code{xyz_stu()} $B$O(B stu $B%"%k%4%j%:%`$rMQ$$$k(B.
                   3549: @end itemize
                   3550:
                   3551: @example
                   3552: [219] xyz_pqr(1,2);
                   3553: 3
                   3554: [220] xyz_pqr(1,2,1);
                   3555: 3
                   3556: 0
                   3557: [221] xyz_stu(1,2);
                   3558: 3
                   3559: @end example
                   3560:
                   3561: @table @t
                   3562: @item $B;2>H(B
                   3563: @ref{xyz_abc}
                   3564: @end table
                   3565:
1.3       takayama 3566: @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
                   3567: @comment --- openxm $B$N30It$+$i$N4sM?$b=R$Y$k(B. Credit.
1.1       takayama 3568: @noindent
                   3569: ChangeLog
                   3570: @itemize @bullet
                   3571: @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
                   3572:  http://www.afo.org/xyz.pdf ) $B$rMQ$$$F=q$-D>$5$l$?(B.
                   3573:  $BJQ99$r$&$1$?%=!<%9%3!<%I$O(B xxxyy.rr, ppp.c $B$G$"$k(B.
                   3574: @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.
                   3575: @end itemize
                   3576:
                   3577: @comment --- $B$*$^$8$J$$(B ---
                   3578: @node Index,,, Top
                   3579: @unnumbered Index
                   3580: @printindex fn
                   3581: @printindex cp
                   3582: @iftex
                   3583: @vfill @eject
                   3584: @end iftex
                   3585: @summarycontents
                   3586: @contents
                   3587: @bye
                   3588: @comment --- $B$*$^$8$J$$=*$j(B ---

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