Annotation of OpenXM/src/asir-doc/exp/exp-ja.texi, Revision 1.32
1.32 ! noro 1: %% $OpenXM: OpenXM/src/asir-doc/exp/exp-ja.texi,v 1.31 2009/02/23 05:51:23 noro 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.25 takayama 41: @subtitle 2008 $BG/(B 1 $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
47: 2004. All rights reserved.
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 ---
55: @comment --- @node $B$N0z?t$O(B node-name, next, previous, up ---
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
63: * Experimental Functions::
64: * Index::
65: @end menu
66:
67: @comment --- chapter $B$N3+;O(B ---
68: @comment --- $B?F(B chapter $BL>$r@53N$K(B. $B?F$,$J$$>l9g$O(B Top ---
69: @node $B<B83E*;EMM$N4X?t(B,,, Top
70: @chapter $B<B83E*;EMM$N4X?t(B
71:
72: @comment --- section $BL>$r@53N$KJB$Y$k(B. ---
73: @menu
74: * $B<B83E*;EMM$N4X?t@bL@=q$K$D$$$F(B::
75: * $B<B83E*;EMM$N4X?t(B::
76: @end menu
77:
78: @comment --- section ``XYZ$B$K$D$$$F(B'' $B$N3+;O(B --- section XYZ$B$K$D$$$F$N?F$O(B chapter XYZ
79: @node $B<B83E*;EMM$N4X?t@bL@=q$K$D$$$F(B,,, XYZ
80: @section $B<B83E*;EMM$N4X?t@bL@=q$K$D$$$F(B
81:
82: @comment --- $B=qBN;XDj$K$D$$$F(B ---
83: @comment --- @code{} $B$O%?%$%W%i%$%?BNI=<((B ---
84: @comment --- @var{} $B$O<P;zBNI=<((B ---
85: @comment --- @b{} $B$O%\!<%k%II=<((B ---
86: @comment --- @samp{} $B$O%U%!%$%kL>$J$I$NI=<((B ---
87:
88: $B$3$N@bL@=q$G$O(B
89: @b{Asir} $B$KF3F~$5$l$?<B83E*;EMM$N4X?t$K$D$$$F@bL@$9$k(B.
90: $B@5<0$J4X?t$H$7$FF3F~$5$l$?$b$N$N5-=R$O(B Risa/Asir $B%^%K%e%"%k(B
91: $B$K0\F0$5$l$k(B.
92: ChangeLog $B$N9`L\$O(B www.openxm.org $B$N(B cvsweb $B$G(B
93: $B%=!<%9%3!<%I$rFI$`;~$N=u$1$K$J$k>pJs$,=q$+$l$F$$$k(B.
94:
95: @comment --- section ``$B<B83E*4X?t(B'' $B$N3+;O(B ---
96: @node $B<B83E*;EMM$N4X?t(B,,, $B<B83E*;EMM$N4X?t(B
97: @section $B<B83E*;EMM$N4X?t(B
98:
99: @comment --- section ``$B<B83E*4X?t(B'' $B$N(B subsection xyz_abc
100: @comment --- subsection xyz_pqr xyz_stu $B$,$"$k(B.
101: @menu
1.2 takayama 102: * quotetotex::
103: * quotetotex_env::
104: * objtoquote::
1.3 takayama 105: * copyright::
1.2 takayama 106: * string_to_tb::
107: * tb_to_string::
108: * write_to_tb::
1.3 takayama 109: * dp_gr_main::
1.4 takayama 110: * asir-port.sh::
111: * asir-install.sh::
112: * get_struct_name::
113: * get_element_names::
114: * get_element_at::
115: * put_element_at::
1.6 takayama 116: * dp_initial_term::
117: * dp_order::
118: * dp_weyl_gr_main::
1.8 takayama 119: * list::
120: * mapat::
1.9 takayama 121: * set_print_function::
1.12 takayama 122: * small_jacobi::
1.13 takayama 123: * flatten_quote::
1.27 ohara 124: * printf::
1.28 ohara 125: * fprintf::
1.15 takayama 126: * sprintf::
127: * quote_to_funargs::
128: * funargs_to_quote::
1.19 takayama 129: * get_function_name::
1.15 takayama 130: * remove_paren::
1.17 takayama 131: * set_secure_mode::
132: * set_secure_flag::
1.22 takayama 133: * initialize_static_variable::
1.23 takayama 134: * eval_quote::
135: * nqt_match::
136: * nqt_match_rewrite::
137: * qt_normalize::
138: * qt_set_coef::
139: * qt_set_ord::
140: * qt_set_weight::
141: * nqt_comp::
142: * qt_is_var::
143: * qt_is_ceof::
144: * qt_rewrite::
1.24 takayama 145: * asirgui.hnd::
1.25 takayama 146: * noro_matrix.rr:
1.26 takayama 147: * f_res::
1.27 ohara 148: * chdir::
149: * pwd::
150: * dcurrenttime::
1.31 noro 151: * node nd_gr nd_gr_trace nd_weyl_gr nd_weyl_gr_trace (module)::
152: * node nd_gr nd_gr_trace nd_weyl_gr nd_weyl_gr_trace (option)::
1.27 ohara 153:
1.23 takayama 154:
1.1 takayama 155: @end menu
156:
1.3 takayama 157: @comment --- $B"~"~"~"~(B $B4X?t(B quotetotex, quotetotex_env $B$N@bL@(B $B"~"~"~"~(B
1.1 takayama 158: @comment --- $B8D!9$N4X?t$N@bL@$N3+;O(B ---
159: @comment --- section $BL>$r@53N$K(B ---
1.2 takayama 160: @node quotetotex quotetotex_env,,, $B<B83E*;EMM$N4X?t(B
161: @subsection @code{quotetotex}, @code{quotetotex_env}
1.1 takayama 162: @comment --- $B:w0zMQ%-!<%o!<%I(B
1.2 takayama 163: @findex quotetotex
164: @findex quotetotex_env
1.1 takayama 165:
166: @comment --- $B4X?t$N4JC1$J@bL@(B ---
167: @table @t
1.2 takayama 168: @item quotetotex(@var{q})
169: :: @var{q} $B$r(B latex $B7A<0$GI=8=$7$?J8;zNs$KJQ49$9$k(B.
170: @item quotetotex_env(@var{key},@var{value})
171: :: quotetotex $B$NF0:n$r@)8f$9$k%Q%i%a!<%?$rJQ99$9$k(B.
172: @item quotetotex_env()
173: :: quotetotex $B$NF0:n$r@)8f$9$k%Q%i%a!<%?$N8=:_CM$rLa$9(B.
174: @item quotetotex_env(0)
175: :: quotetotex $B$NF0:n$r@)8f$9$k%Q%i%a!<%?$r%G%U%)!<%k%HCM$KLa$9(B.
1.1 takayama 176: @end table
177:
178: @comment --- $B0z?t$N4JC1$J@bL@(B ---
179: @table @var
180: @item return
1.2 takayama 181: $BJ8;zNs(B(quotetotex) $B$^$?$O(B $B%j%9%H$^$?$O%*%V%8%'%/%H(B(quotetotex_env)
182: @item q
183: quote
184: @item key
185: $BJ8;zNs(B
186: @item value
187: $B%*%V%8%'%/%H(B
1.1 takayama 188: @end table
189:
190: @comment --- $B$3$3$G4X?t$N>\$7$$@bL@(B ---
191: @comment --- @itemize$B!A(B@end itemize $B$O2U>r=q$-(B ---
192: @comment --- @bullet $B$O9uE@IU$-(B ---
193: @itemize @bullet
194: @item
1.2 takayama 195: quotetotex $B$O(B @var{q} $B$r(B latex $B7A<0$GI=8=$7$?J8;zNs$KJQ49$9$k(B.
196: @item
197: $B0J2<(B quotetotex_env $B$N%Q%i%a!<%?$N0UL#$r@bL@$9$k(B.
198: @item
199: conv_rule: 3 $B%S%C%H$rMQ$$$FJQ49%k!<%k$r;XDj$9$k(B.
200: 0$B%S%C%HL\$O(B symbol_table $B$K$h$kJQ49$r9T$&$+(B,
201: 1$B%S%C%HL\$OE:;zJQ49$r9T$&$+(B,
1.3 takayama 202: 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 203: $B$r0UL#$9$k(B.
204: $B$?$H$($P(B conv_rule $B$H$7$F(B 3 $B$r;XDj$9$k$H(B,
205: 0$B%S%C%HL\(B, 1 $B%S%C%HL\$,(B 1 $B$H$J$k$N$G(B
206: symbol_table $B$K$h$kJQ49$r9T$$(B, $BE:;zJQ49$r$*$3$J$&(B.
207: $BE:;zJQ49$O?t;z$H1Q;z$N6-L\$*$h$S(B _ $B5-9f$r6h@Z$j$H$9$k(B.
208: symbol_table $B$K$h$kJQ49$,:G=i$KE,MQ$5$l$k(B.
209: alpha, beta, $BEy$O<+F0E*$r%.%j%7%cJ8;z$KJQ49$9$k%F!<%V%k$O(B
210: $BFbB"$:$_(B.
211: @item
1.5 takayama 212: dp_vars_prefix: $BJ,;6I=8=B?9`<0$O(B
213: @tex
214: $x_0, x_1, \cdots$
215: @end tex
216: $B$NB?9`<0$H$7$F(B latex $B7A<0$KJQ49$5$l$k$,$3$N(B
217: x $B$NItJ,$rJQ99$9$k(B.
218: @item
219: dp_vars_origin: $B%$%s%G%C%/%9$N;O$^$j$NCM$r;XDj$9$k(B.
220: $B%G%U%)!<%k%H$O(B 0.
1.1 takayama 221: @item
1.2 takayama 222: dp_vars_hweyl: $BJ,;6I=8=B?9`<0$r%o%$%kBe?t$N85$H$_$J$7$F(B
1.3 takayama 223: latex $B7A<0$KJQ49$9$k(B.
1.2 takayama 224: $B6v?t8DJQ?t$,$"$k$H$-$O(B $B:G=i$NH>J,$r(B
225: @tex
226: $x_0, x_1, \cdots$
227: @end tex
228: $B$K(B
229: $B8eH>$NH>J,$r(B
230: @tex
231: $\partial_0, \partial_1, \cdots$
232: @end tex
233: $B$KJQ49$9$k(B.
234: $B4q?t8D$N>l9g$O:G8e$NJQ?t$,F1;~2=JQ?t$H$7$F(B h $B$GI=<($5$l$k(B.
1.5 takayama 235: @item
236: dp_dvars_prefix: dp_vars_hweyl $B$,(B 1 $B$N;~$K8eH>ItJ,$N(B prefix $B$r;XDj$9$k(B.
237: $B%G%U%)!<%k%H$O(B @tex $\partial$ @end tex
238: @item
239: dp_dvars_origin: dp_vars_hweyl $B$,(B 1 $B$N;~$N%$%s%G%C%/%9$N;O$^$j$NCM(B.
1.2 takayama 240: @item
241: conv_func: $B%f!<%6Dj5A$NJQ494X?t$r$h$V(B.
242: @item
243:
1.1 takayama 244: @end itemize
245:
246: @comment --- @example$B!A(B@end example $B$O<B9TNc$NI=<((B ---
247: @example
1.2 takayama 248: [3] quotetotex(quote(1/(x+1)));
249: \frac@{ 1@} @{ ( @{x@}+ 1)@}
250: [4] quotetotex(objtoquote(diff(x^x,x)));
251: @{x@}^@{ @{x@}- 1@} @{x@}+ \log( @{x@}) @{x@}^@{ @{x@}@}
252: [5] quotetotex_env("conv_rule",3);
253: [6] quotetotex(objtoquote( (alpha2beta+x_i_j)^2));
254: @{\alpha@}_@{2,\beta@}^@{ 2@} + 2 @{x@}_@{i,j@} @{\alpha@}_@{2,\beta@}+ @{x@}_@{i,j@}^@{ 2@}
1.1 takayama 255: @end example
256:
257: @comment --- $B;2>H(B($B%j%s%/(B)$B$r=q$/(B ---
258: @table @t
259: @item $B;2>H(B
1.2 takayama 260: @ref{objtoquote}
1.3 takayama 261: print_tex_form(contrib)
1.1 takayama 262: @end table
263:
264: @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
265: @noindent
266: ChangeLog
267: @itemize @bullet
1.5 takayama 268: @item
269: $B$3$N4X?t$O(B 2004$BG/(B2$B7nKv$+$i(B3$B7n$K$+$1$F(B asir $B$r(B
270: knoppix $BHG(B texmacs $B$KBP1~$5$;$k$?$a$K=q$+$l$?(B.
271: Asir-contrib $B$N(B print_tex_form $B$,$=$N867?$G$"$j(B, $B$=$l$r8zN(2=$7$^$?(B
272: $B=PNO7A<0$r2~A1$7$?(B.
273: OpenXM/src/kxx/ox_texmacs.c, OpenXM/src/texmacs $B$b;2>H(B.
274: @item
275: OpenXM/src/asir-contrib/packages/src/noro_print.rr 1.1--1.8,
276: noro_print_default.rr 1.1--1.3 $B$b;2>H(B.
277: @item
278: $BJQ99$r<u$1$?%U%!%$%k$O(B OpenXM_contrib2/asir2000 $B$N2<$N<!$N%U%!%$%k(B.
1.3 takayama 279: builtin/strobj.c 1.14--1.43,
280: include/ca.h 1.46, io/cexpr.c 1.18, io/pexpr.c 1.32, io.sexpr.c 1.29,
281: parse/arith.c 1.12, parse/parse.h 1.28--1.29,
282: parse/quote.c 1.7--1.8, 1.12.
283: @item
284: knoppix/math $B$O(B $BJ!2,Bg3X$N_@ED$5$s$,Cf?4$H$J$j3+H/$5$l$F$$$k(B.
1.5 takayama 285: @item
286: dp_dvars_prefix, *_origin $B$O(B builtin/strobj.c 1.46 $B$GF3F~$5$l$?(B.
287: @item
288: Todo: quotetoterminalform ($BJ,;6I=8=B?9`<0$N8+0W$$=PNO(B).
1.3 takayama 289: @end itemize
290:
291:
292:
293: @comment --- $B"~"~"~"~(B $B4X?t(B objtoquote $B$N@bL@(B $B"~"~"~"~(B
294: @node objtoquote,,, $B<B83E*;EMM$N4X?t(B
295: @subsection @code{objtoquote}
296: @findex objtoquote
297:
298: @comment --- $B4X?t$N4JC1$J@bL@(B ---
299: @table @t
300: @item objtoquote(@var{ob})
301: :: $B%*%V%8%'%/%H$H(B quote $B7?$N%G!<%?$KJQ49$9$k(B.
302: @end table
303:
304: @table @var
305: @item return
306: quote
307: @item ob
308: $B%*%V%8%'%/%H(B
309: @end table
310:
311: @itemize @bullet
312: @item
313: @code{objtoquote(ob)} $B$O(B, @var{ob} $B$r(B quote $B7?$N%G!<%?$KJQ49$9$k(B.
314: @end itemize
315:
316: @example
317: [1150] quotetolist(quote(1+2));
318: [b_op,+,[internal,1],[internal,2]]
319: [1151] quotetolist(objtoquote(1+x));
320: [b_op,+,[internal,x],[internal,1]]3
321: @end example
322:
323: @table @t
324: @item $B;2>H(B
325: @ref{quotetotex} @ref{quotetolist}
326: @end table
327:
328: @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
329: @noindent
330: ChangeLog
331: @itemize @bullet
332: @item $B$3$N4X?t$O(B quotetotex $B$NA0=hM}$r$9$k$?$a$K=q$+$l$?(B.
333: @item asir-contrib $B$N4X?t(B quote_to_quote $B$b;2>H(B.
334: @item OpenXM_contrib2/asir2000/builtin/print.c 1.16.
335: @end itemize
336:
337:
338: @comment --- $B"~"~"~"~(B $B4X?t(B copyright $B$N@bL@(B $B"~"~"~"~(B
339: @node copyright,,, $B<B83E*;EMM$N4X?t(B
340: @subsection @code{copyright}
341: @findex copyright
342:
343: @comment --- $B4X?t$N4JC1$J@bL@(B ---
344: @table @t
345: @item copyright()
346: :: Risa/Asir $B$N(B copyright $BI=<($rJ8;zNs$H$7$FLa$9(B.
347: @end table
348:
349: @table @var
350: @item return
351: $BJ8;zNs(B
352: @end table
353:
354: @itemize @bullet
355: @item
356: Risa/Asir $B$N(B copyright $BI=<($rJ8;zNs$H$7$FLa$9(B.
357: @end itemize
358:
359: @example
360: [1150] copyright();
361: This is Risa/Asir, Version 20040312 (Kobe Distribution).
362: Copyright (C) 1994-2000, all rights reserved, FUJITSU LABORATORIES LIMITED.
363: Copyright 2000-2003, Risa/Asir committers, http://www.openxm.org/.
364: GC 6.2(alpha6) copyright 1988-2003, H-J. Boehm, A. J. Demers, Xerox, SGI, HP.
365: PARI 2.0.17, copyright 1989-1999, C. Batut, K. Belabas, D. Bernardi,
366: H. Cohen and M. Olivier.
367: @end example
368:
369: @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
370: @noindent
371: ChangeLog
372: @itemize @bullet
373: @item $B$3$N4X?t$O(B texmacs $BMQ$K=q$+$l$?(B (2004-03).
374: @item OpenXM_contrib2/asir2000 $B$N2<$N0J2<$N%U%!%$%k$r$_$h(B. builtin/miscf.c 1.21,
375: parse/glob.c 1.47.
376: @end itemize
377:
378:
379:
380: @comment --- $B"~"~"~"~(B $B4X?t(B string_to_tb, ... $B$N@bL@(B $B"~"~"~"~(B
381: @comment --- $BJ#?t$N4X?t$r$^$H$a$F@bL@$9$kNc(B ---
382: @node string_to_tb tb_to_string write_to_tb,,, $B<B83E*;EMM$N4X?t(B
383: @subsection @code{string_to_tb}, @code{tb_to_string}, @code{write_to_tb}
384: @findex string_to_tb
385: @findex tb_to_string
386: @findex write_to_tb
387:
388: @comment --- $B4X?t$N4JC1$J@bL@(B ---
389: @comment --- @itemx $B$OJ#?t$KBP$7$F@bL@$r0l$D$D$1$k>l9g$K;H$&(B ---
390: @table @t
391: @item string_to_tb(@var{s})
392: @itemx tb_to_string(@var{tb})
393: @itemx write_to_tb(@var{s},@var{tb})
394: :: $BJ8;zNs2DJQD9G[Ns7?(B(text buffer)$B$N%G!<%?$N=hM}(B
395: @end table
396:
397: @table @var
398: @item return
399: $BJ8;zNs2DJQD9G[Ns7?(B(string_to_tb), $BJ8;zNs7?(B(tb_to_string)
400: @item s
401: $BJ8;zNs(B
402: @item tb
403: $BJ8;zNs2DJQD9G[Ns7?(B
404: @end table
405:
406: @itemize @bullet
407: @item
408: @code{string_to_tb(@var{s})} $B$O(B, $BJ8;zNs(B @var{s} $B$r$O$8$a$NMWAG$H$9$k(B
409: $BJ8;zNs2DJQD9G[Ns7?%*%V%8%'%/%H$r@8@.$9$k(B.
410: @item
411: @code{tb_to_string_(@var{tb})} $B$O(B,
412: $BJ8;zNs2DJQD9G[Ns7?%*%V%8%'%/%H(B @var{tb} $B$+$iDL>o$NJ8;zNs%*%V%8%'%/%H$r@8@.$9$k(B.
413: @item
414: @code{write_to_tb(@var{s},@var{tb})} $B$O(B, $BJ8;zNs(B @var{s} $B$r(B
415: $BJ8;zNs2DJQD9G[Ns7?%*%V%8%'%/%H(B @var{tb} $B$X=q$-=P$9(B.
416: @item @var{SS} $B$rJ8;zNsJQ?t$H$9$k$H$-(B,
417: @var{SS} += "$BJ8;zNs(B" $B$G(B @var{SS} $B$XJ8;zNs$r=q$-B-$7$F$$$/$3$H$,$G$-$k$,(B,
418: $BL5BL$J%a%b%j$rBgNL$K>CHq$9$k(B.
419: $BBe$j$K4X?t(B @code{write_to_tb} $B$rMQ$$$k$Y$-$G$"$k(B.
420: $BJ8;zNs2DJQD9G[Ns7?%*%V%8%'%/%H$OJ8;zNs$N2DJQD9$NG[Ns$G$"$j%a%b%j4IM}$KM%$7$$(B
421: $B%G!<%?9=B$$G$"$k(B.
422: @end itemize
423:
424: @example
425: [219] T=string_to_tb("");
426:
427: [220] write_to_tb("Hello",T);
428: 0
429: [221] write_to_tb(" world!",T);
430: 0
431: [222] tb_to_string(T);
432: Hello world!
433: @end example
434:
435:
436: @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
437: @noindent
438: ChangeLog
439: @itemize @bullet
1.5 takayama 440: @item
441: $B$3$N4X?t$O(B 2004-3 $B$K(B print_tex_form $B$r8zN(2=$9$k$?$a$K=q$+$l$?(B.
442: @item
443: OpenXM_contrib2/asir2000 $B$N2<$N0J2<$N%U%!%$%k$r8+$h(B.
1.3 takayama 444: io/ox_asir.c 1.52, builtin/strobj.c 1.12--1.13, 1.16,
445: engine/str.c 1.5, parse/quote.c 1.9.
1.5 takayama 446: @item
447: rtostr $B$,(B text buffer $B7?$N%G!<%?$K4X$7$F$*$=$+$C$?(B. $BB.EY$N2~A1$O(B
448: asir2000/io/pexpr_body.c 1.2, asir2000/parse/lex.c 1.32.
1.3 takayama 449: @end itemize
450:
451:
452:
453: @comment --- $B"~"~"~"~(B $B4X?t(B dp_gr_main $B$N@bL@(B $B"~"~"~"~(B
454: @comment --- $BJ#?t$N4X?t$r$^$H$a$F@bL@$9$kNc(B ---
455: @node dp_gr_main,,, $B<B83E*;EMM$N4X?t(B
456: @subsection @code{dp_gr_main}
457: @findex dp_gr_main
458:
459: @comment --- $B4X?t$N4JC1$J@bL@(B ---
460: @comment --- @itemx $B$OJ#?t$KBP$7$F@bL@$r0l$D$D$1$k>l9g$K;H$&(B ---
461: @table @t
462: @item dp_gr_main(@var{f} | v=@var{vv}, order=@var{oo}, homo=@var{n}, matrix=@var{m}, block=@var{b}, sugarweight=@var{sw})
463: :: dp_gr_main $B$N?7$7$$%$%s%?%U%'!<%9(B.
464: @end table
465:
466: @table @var
467: @item return
468: $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)
469: @item f
470: $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)
471: @item vv
472: $B%j%9%H(B ($BJQ?t$N%j%9%H(B)
473: @item oo
474: $B%j%9%H(B ($B=g=x$r$"$i$o$9%j%9%H(B)
475: @item n
476: 0 $B$+(B1 (homogenization $B$r$9$k$+(B)
477: @item m
478: $B=g=x$r(B matrix $B$GI=8=$9$k>l9g(B (cf. dp_ord).
479: @item b
480: ???
481: @item sw
1.5 takayama 482: Sugar strategy $B$rE,MQ$9$k$H$-$N(B weight vector. $BA4$F$NMWAG$OHsIi(B.
1.3 takayama 483: @end table
484:
485: @itemize @bullet
486: @item
487: @code{dp_gr_main(@var{f})} $B$O(B, @var{f} $B$N%0%l%V%J4pDl$r7W;;$9$k(B.
488: $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
489: $B7OE}$@$C$F$$$J$+$C$?(B.
490: dp_gr_main $B$N?7$7$$%$%s%?%U%'!<%9$G$O=g=x$r$"$kJ8K!$K=>$$;XDj$9$k(B.
491: @comment ~taka/this03/misc-2003/A2/dp
492: @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.
1.11 ohara 493: @example
1.3 takayama 494: order : '[' orderElement { ',' orderElement } ']'
1.5 takayama 495: orderElement : weightVec | builtinOrder
1.3 takayama 496: weightVec : '[' weightElement { ',' weightElement } ']'
497: builtiniOrder : '[' orderName ',' setOfVariables ']'
498: weightElement : NUMBER | setOfVariables ',' NUMBER
499: setOfVariables: V | range(V,V)
1.11 ohara 500: orderName : @@grlex | @@glex | @@lex
501: @end example
1.3 takayama 502: $B$3$3$G(B @code{V} $B$O(B $BJQ?tL>(B, @code{NUMBER} $B$O@0?t$r$"$o$i$9(B.
503: $BNc(B1: @code{v=[x,y,z,u,v], order=[[x,10,y,5,z,1],[@@grlex,range(x,v)]]}
504: $B$O(B @code{x},@code{y},@code{z} $B$,$=$l$>$l(B weight 10, 5, 1 $B$r$b$D(B
505: $B=g=x$GHf3S$7$?$"$H(B, @code{[x,y,z,u,v]} $B$K$D$$$F$N(B
506: graded reverse lexicographic order $B$r(B tie-breaker $B$H$7$FMQ$$$k$3$H$r0UL#$9$k(B.
1.5 takayama 507: $B;29M=q(B: B.Sturmfels: Gr\"obner Bases and Convex Polytopes (1995).
508: M.Saito, B.Sturmfels, N.Takayama:
509: Gr\"obner Deformations of Hypergeometric Differential Equations (2000).
510: @item
511: $B=g=xMWAG(B (orderElement) $B$N;XDjJ}K!$O(B
512: (1) $BJQ?tL>$^$?$O(B range$B$G;XDj$5$l$?JQ?t$N=89g$H=E$_$NCM$N7+$jJV$7(B
513: (2) $B=E$_$NCM$rJQ?t%j%9%H$N=gHV$KJB$Y$kJ}K!(B
514: (3) $BJQ?tL>$^$?$O(B range$B$G;XDj$5$l$?JQ?t$N=89g$H=g=xL>$NAH(B
515: $B$N;0DL$j$N4pACE*J}K!$,$"$k(B.
516: $B;w$?;XDjJ}K!$,(B Macaulay, Singular, CoCoA, Kan/sm1 $BEy$N4DO@%7%9%F%`$G(B
517: $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
518: $B$5$i$K2~NI$r2C$($?$b$N$G=@Fp@-$,9b$$(B.
1.3 takayama 519: @item
520: order $B$N(B tie-breaker $B$O(B grlex $B$,%G%U%)!<%k%H(B.
521: @item
522: $BJ,;6I=8=B?9`<0$r0z?t$H$7$?$H$-$O7k2L$bJ,;6I=8=B?9`<0$H$7$FLa$k(B.
523: 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.5 takayama 524: @item
525: $B%*%W%7%g%s$NCM$O(B option_list $B%-!<%o!<%I$rMQ$$$F%j%9%H$GM?$($F$b$h$$(B.
526: $B2<$NNc$r;2>H(B.
1.3 takayama 527: @end itemize
528:
529: @example
530: [218] load("cyclic");
531: [219] V=vars(cyclic(4));
532: [c0,c1,c2,c3]
533: [220]dp_gr_main(cyclic(4) | v=V, order=[[c0,10,c1,1],[c2,5],[@@grlex,range(c0,c3)]]);
534: [ 10 1 0 0 ]
535: [ 0 0 5 0 ]
536: [ R R R R ]
537: [(-c3^6+c3^2)*c2^2+c3^4-1,c3^2*c2^3+c3^3*c2^2-c2-c3,
538: (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,
539: c0+c1+c2+c3]
540:
541: [1151] F=map(dp_ptod,katsura(4), vars(katsura(4)));
542: [(1)*<<1,0,0,0,0>>+(2)*<<0,1,0,0,0>>+ ... ]
543: [1152] dp_gr_main(F | order=[[range(x0,x3),1]]);
544: [ 1 1 1 1 0 ]
545: [ R R R R R ]
546: [(47774098944)*<<0,0,0,0,13>>+ ... ]
1.5 takayama 547:
548: [1153] Opt=[["v",[x,y]], ["order",[[x,5,y,1]]]];
549: [[v,[x,y]],[order,[[x,5,y,1]]]]
550: [1154] dp_gr_main([x^2+y^2-1,x*y-1] | option_list=Opt);
551: [ 5 1 ]
552: [ R R ]
553: [-y^4+y^2-1,x+y^3-y]
1.3 takayama 554: @end example
555:
556: @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
557: @noindent
558: ChangeLog
559: @itemize @bullet
560: @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.
561: @item
562: @code{setOfVariables}$B$NI=8=$N$?$a$K(B range $B%*%V%8%'%/%H$,F3F~$5$l$?(B.
563: @item
564: $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
565: $B7OE}$@$C$F$$$J$+$C$?(B.
566: dp_gr_main $B$N?7$7$$%$%s%?%U%'!<%9$G$O=g=x$r$"$kJ8K!$K=>$$;XDj$9$k(B.
567: @item
568: OpenXM_contrib2/asir2000 $B$N2<$N<!$N3F%U%!%$%k$,=$@5$r$&$1$?(B.
569: builtin/gr.c 1.56--1.57,
570: builtin/dp-supp.c 1.27--1.31 (create_composite_order_spec),
571: builtin/dp.c 1.46--1.48 (parse_gr_option),
572: engine/Fgfs.c 1.20,
573: engine/dist.c 1.27--1.28
574: engine/nd.c 1.89,
575: include/ca.h 1.42--1.43,
576: io/pexpr.c 1.28,
577: io/sexpr.c 1.26,
578: parse/arith.c 1.11,
579: parse/glob.c 1.44-1.45,
580: parse/lex.c 1.29,
581: parse/parse.h 1.23--1.26
1.5 takayama 582: @item
583: Todo: return $B%-!<%o!<%I$GLa$jCM$N%G!<%?$r(B quote $B$N%j%9%H$K$G$-$k$h$&$K(B.
584: attribute, ring $B9=B$BN(B.
1.1 takayama 585: @end itemize
586:
587: @comment --- $B"~"~"~"~(B $B4X?t(B syz_pqr, xyz_stu $B$N@bL@(B $B"~"~"~"~(B
588: @comment --- $BJ#?t$N4X?t$r$^$H$a$F@bL@$9$kNc(B ---
1.3 takayama 589: @node asir-install.sh,,, $B<B83E*;EMM$N4X?t(B
590: @subsection @code{asir-port.sh}, @code{asir-install.sh}
591: @findex asir-port.sh
592: @findex asir-install.sh
1.1 takayama 593:
594: @comment --- $B4X?t$N4JC1$J@bL@(B ---
595: @comment --- @itemx $B$OJ#?t$KBP$7$F@bL@$r0l$D$D$1$k>l9g$K;H$&(B ---
596: @table @t
1.3 takayama 597: @item asir-install.sh
598: @itemx asir-port.sh
599: :: $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
600: @end table
601:
602:
603: @itemize @bullet
604: @item
605: asir-port.sh $B$O(B knoppix $B@lMQ$G$"$k(B.
1.10 ohara 606: $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
1.3 takayama 607: ftp.math.kobe-u.ac.jp $B$h$j%@%&%s%m!<%I$7$F(B
608: /home/knoppix/.asir-tmp $B$X%;!<%V$7$F(B, $B<B9T$9$k(B.
609: .asirrc $B$*$h$S(B .TeXmacs/plugins/ox/progs/init-ox.scm $B$b%@%&%s%m!<%I$9$k(B.
610: @item
611: asir-install.sh $B$O(B Debian GNU Linux / openxm-binary*.deb $B@lMQ$G$"$k(B.
612: asir-install.sh $B$O(B asir $B$r%@%&%s%m!<%I$7$F(B /usr/local/OpenXM/bin $B$*$h$S(B
613: /usr/local/OpenXM/lib/asir $B$X%$%s%9%H!<%k$9$k(B.
614: @end itemize
615:
616:
617: @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
618: @noindent
619: ChangeLog
620: @itemize @bullet
621: @item
622: $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.
623: @item
624: knoppix/math $B$OJ!2,Bg3X$N_@ED$5$s$,Cf?4$H$J$j3+H/$5$l$F$$$k(B.
625: @item
626: OpenXM/misc/packages/Linux/Debian $B$N2<$NA4$F$N%U%!%$%k(B (2004-2-22 $B$+$i(B
627: 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.)
628: OpenXM/src/asir-port $B$N2<$N<!$N3F%U%!%$%k(B.
629: Makefile 1.1--1.8, asir-install.sh 1.1--1.2, asir-port.sh 1.1--1.6.
630: @end itemize
631:
1.4 takayama 632:
633: @node get_struct_name,,, $B<B83E*;EMM$N4X?t(B
634: @subsection @code{get_struct_name}, @code{get_element_names}, @code{get_element_at}, @code{put_element_at}
635: @findex get_struct_name
636: @findex get_element_names
637: @findex get_element_at
638: @findex put_element_at
639:
640: @comment --- $B4X?t$N4JC1$J@bL@(B ---
641: @comment --- @itemx $B$OJ#?t$KBP$7$F@bL@$r0l$D$D$1$k>l9g$K;H$&(B ---
642: @table @t
643: @item get_struct_name(@var{s})
644: @itemx get_element_names(@var{s})
645: @itemx get_element_at(@var{s},@var{key})
646: @itemx put_element_at(@var{s},@var{key},@var{obj})
647: :: $B9=B$BN(B @var{s} $B$KBP$9$kA`:n(B
648: @end table
649:
650: @table @var
651: @item return
652: $BJ8;zNs(B (get_struct_name),
653: $BJ8;zNs$N%j%9%H(B (get_element_names),
654: $B%*%V%8%'%/%H(B (get_element_at),
655: $B%*%V%8%'%/%H(B (put_element_at)
656: @item s
657: $B9=B$BN(B
658: @item key
659: $BJ8;zNs(B
660: @item obj
661: $B%*%V%8%'%/%H(B
662: @end table
663:
664: @itemize @bullet
665: @item
666: @code{get_struct_name(s)} $B$O(B, $B9=B$BN(B @var{s} $B$NL>A0$rLa$9(B.
667: @item
668: @code{get_element_names(s)} $B$O(B, $B9=B$BN$N%a%s%P!<$NL>A0$N%j%9%H$rLa$9(B.
669: @item
670: @code{get_element_at(s,key)} $B$O9=B$BN(B s $B$N%a%s%P!<(B key $B$NCM$rLa$9(B.
671: @item
672: @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.
673: @end itemize
674:
675: @example
676: [219] struct point { x, y, color};
677: [220] P = newstruct(point);
678: {0,0,0}
679: [221] P->x = 10$ P->y=5$ P->color="red"$
680: [222] get_element_names(P);
681: [x,y,color]
682: [223] put_element_at(P,"color","blue");
683: blue
684: [224] P->color;
685: bule
686: @end example
687:
688: @table @t
689: @item $B;2>H(B
690: @ref{newstruct}, @ref{struct}
691: @end table
692:
693: @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
694: @comment --- openxm $B$N30It$+$i$N4sM?$b=R$Y$k(B. Credit.
695: @noindent
696: ChangeLog
697: @itemize @bullet
698: @item $B9=B$BN$NDj5A$rCN$i$:$K9=B$BN$r07$&%f!<%64X?t$r=q$/$H$-$KJXMx(B.
699: asir-contrib $B$N(B noro_print.rr $B$r8+$h(B.
700: @item OpenXM_contrib2/asir2000/builtin/compobj.c 1.8.
701: @end itemize
702:
1.6 takayama 703: @comment --- $B"~"~"~"~(B $B4X?t(B dp_gr_main $B$N@bL@(B $B"~"~"~"~(B
704: @node dp_weyl_gr_main,,, $B<B83E*;EMM$N4X?t(B
705: @subsection @code{dp_weyl_gr_main}
706: @findex dp_weyl_gr_main
707:
708: @comment --- $B4X?t$N4JC1$J@bL@(B ---
709: @comment --- @itemx $B$OJ#?t$KBP$7$F@bL@$r0l$D$D$1$k>l9g$K;H$&(B ---
710: @table @t
711: @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})
712: :: dp_weyl_gr_main $B$N?7$7$$%$%s%?%U%'!<%9(B. dp_gr_main $B$HF1$87A<0$G$"$k(B.
713: @end table
714:
715: @table @var
716: @item return
717: $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)
718: @item f
719: $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)
720: @item vv
721: $B%j%9%H(B ($BJQ?t$N%j%9%H(B)
722: @item oo
723: $B%j%9%H(B ($B=g=x$r$"$i$o$9%j%9%H(B)
724: @item n
725: 0 $B$+(B1 (homogenization $B$r$9$k$+(B). [$B%F%9%H$^$@(B]
726: @item m
727: $B=g=x$r(B matrix $B$GI=8=$9$k>l9g(B (cf. dp_ord). [$B%F%9%H$^$@(B]
728: @item b
729: ???
730: @item sw
731: Sugar strategy $B$rE,MQ$9$k$H$-$N(B weight vector. $BA4$F$NMWAG$OHsIi(B. [$B%F%9%H$^$@(B]
732: @end table
733:
734: @itemize @bullet
735: @item
736: @code{dp_weyl_gr_main(@var{f})} $B$O(B, @var{f} $B$N%0%l%V%J4pDl$r7W;;$9$k(B.
737: $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
738: $B7OE}$@$C$F$$$J$+$C$?(B.
739: dp_weyl_gr_main $B$N?7$7$$%$%s%?%U%'!<%9$G$O=g=x$r$"$kJ8K!$K=>$$;XDj$9$k(B.
740: $B;XDjJ}K!$K$D$$$F$O(B dp_gr_main $B$N%^%K%e%"%k$r;2>H(B.
741: @item
742: $BJ,;6I=8=B?9`<0$N3F%b%N%_%"%k$ND9$5$,6v?t$N$H$-$O%o%$%kBe?t(B
743: K[x_1, ..., x_n, d_1, ..., d_n]
744: $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
745: 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.
746: $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.
747: @item
748: $BJ,;6I=8=B?9`<0$N3F%b%N%_%"%k$ND9$5$,4q?t$N$H$-$OF1<!2=%o%$%kBe?t(B
749: K[x_1, ..., x_n, d_1, ..., d_n, h]
750: $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
751: d_i x_i = x_i d_i + h^2
752: $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.
753: $B>\$7$/$O(B dp_gr_main $B$G;2>H$7$?(B Saito, Sturmfels, Takayama $B$N652J=q$r$_$h(B.
754: @end itemize
755:
756: @example
757: [1220] F=sm1.gkz([ [[1,1,1,1],[0,1,3,4]], [0,0]]); /* Command in asir-contrib*/
758: [[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]]
759: [1221] V=[x1,x2,x3,x4,dx1,dx2,dx3,dx4]$
1.7 takayama 760: [1222] dp_weyl_gr_main(F[0] | v=V, order=[[dx1,1,dx2,1,dx3,1,dx4,1]]);
761: ...
1.6 takayama 762: [1238] FF=map(dp_ptod,F[0],V);
763: [(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]
764:
765: [1244] FF=map(dp_ptod,F[0],V);
766: [(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>>]
767:
768: dp_weyl_gr_main(FF | v=V, order=[[0,0,0,0,1,1,1,1]]);
769:
1.7 takayama 770: [1246] dp_weyl_gr_main(FF | v=V, order=[[dx1,1,dx2,1,dx3,1,dx4,1]]);
1.6 takayama 771: [ 0 0 0 0 1 1 1 1 ]
772: [ R R R R R R R R ]
1.7 takayama 773: ...
1.6 takayama 774:
775: @end example
776:
777: @table @t
778: @item $B;2>H(B
779: @ref{dp_gr_main}
780: @end table
781:
782: @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
783: @noindent
784: ChangeLog
785: @itemize @bullet
786: @item dp_gr_main $B$N%$%s%?%U%'!<%9$,(B dp_weyl_gr_main $B$X$bF3F~$5$l$?(B.
787: @item
788: OpenXM_contrib2/asir2000 $B$N2<$N<!$N3F%U%!%$%k$,=$@5$r$&$1$?(B.
789: builtin/dp-supp.c 1.32--1.33
790: builtin/dp.c 1.49--1.50
791: @end itemize
792:
793: @comment --- $B"~"~"~"~(B $B4X?t(B dp_initial_term $B$N@bL@(B $B"~"~"~"~(B
794: @node dp_initial_term,,, $B<B83E*;EMM$N4X?t(B
795: @subsection @code{dp_initial_term}
796: @findex dp_initial_term
797:
798: @comment --- $B4X?t$N4JC1$J@bL@(B ---
799: @table @t
800: @item dp_initial_term(@var{f} | v=@var{vv}, order=@var{oo})
801: :: dp_initial_term $B$OM?$($i$l$?(B weight $B$KBP$9$k@hF,9`$NOB$rLa$9(B.
802: @end table
803:
804: @table @var
805: @item return
806: $BJ,;6I=8=B?9`<0$^$?$OJ,;6I=8=B?9`<0$N%j%9%H(B.
807: @item f
808: $BJ,;6I=8=B?9`<0$+J,;6I=8=B?9`<0$N%j%9%H(B.
809: @item vv
810: $B%j%9%H(B ($BJQ?t$N%j%9%H(B)
811: @item oo
812: $B%j%9%H(B ($B=g=x$r$"$i$o$9%j%9%H(B)
813: @end table
814:
815: @itemize @bullet
816: @item
817: dp_initial_term $B$OM?$($i$l$?(B weight w $B$KBP$9$k@hF,9`$NOB$rLa$9(B.
818: $B$3$l$OB?$/$N652J=q$G(B @tex ${\rm in}_w(f)$ @end tex
819: $B$H=q$+$l$F$$$k(B.
820: @item
821: $B=g=x$rI=$9%j%9%H$O(B dp_gr_main $B$GDj5A$7$?J8K!$K=>$&(B.
822: $B$3$N%j%9%H$N@hF,$,(B weight vector $B$GL5$$>l9g$O%(%i!<$H$J$k(B.
823: $B$?$H$($P(B order=[[@@lex,...]] $B$O%(%i!<$H$J$k(B.
824: @item
825: $B7k2L$OM?$($i$l$?=g=x$K4X$7$F%=!<%H$5$l$F$k$o$1$G$O$J$$(B.
826: @end itemize
827:
828: @example
829: [1220] F=<<2,0,0>>+<<1,1,0>>+<<0,0,1>>;
830: (1)*<<2,0,0>>+(1)*<<1,1,0>>+(1)*<<0,0,1>>
831: [1220] dp_initial_term(F | order=[[1,1,1]]);
832: [ 1 1 1 ]
833: [ R R R ]
834: (1)*<<2,0,0>>+(1)*<<1,1,0>>
835: [1221] dp_initial_term(F | v=[x,y,z], order=[[x,1]]);
836: [ 1 0 0 ]
837: [ R R R ]
838: (1)*<<2,0,0>>
839: @end example
840:
841: @table @t
842: @item $B;2>H(B
843: @ref{dp_gr_main}, @ref{dp_weyl_gr_main}, @ref{dp_order}, @ref{dp_hm}
844: @end table
845:
846: @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
847: @noindent
848: ChangeLog
849: @itemize @bullet
850: @item
851: OpenXM_contrib2/asir2000 $B$N2<$N<!$N3F%U%!%$%k$,=$@5$r$&$1$?(B.
852: builtin/dp-supp.c 1.32
853: builtin/dp.c 1.49
854: @end itemize
855:
856: @comment --- $B"~"~"~"~(B $B4X?t(B dp_order $B$N@bL@(B $B"~"~"~"~(B
857: @node dp_order,,, $B<B83E*;EMM$N4X?t(B
858: @subsection @code{dp_order}
859: @findex dp_order
860:
861: @comment --- $B4X?t$N4JC1$J@bL@(B ---
862: @table @t
863: @item dp_order(@var{f} | v=@var{vv}, order=@var{oo})
864: :: dp_order $B$OM?$($i$l$?(B weight $B$KBP$9$k<!?t$N:GBgCM$rLa$9(B.
865: @end table
866:
867: @table @var
868: @item return
869: $B?t$+?t$N%j%9%H(B
870: @item f
871: $BJ,;6I=8=B?9`<0$+J,;6I=8=B?9`<0$N%j%9%H(B.
872: @item vv
873: $B%j%9%H(B ($BJQ?t$N%j%9%H(B)
874: @item oo
875: $B%j%9%H(B ($B=g=x$r$"$i$o$9%j%9%H(B)
876: @end table
877:
878: @itemize @bullet
879: @item
880: $B=g=x$rI=$9%j%9%H$O(B dp_gr_main $B$GDj5A$7$?J8K!$K=>$&(B.
881: $B$3$N%j%9%H$N@hF,$,(B weight vector $B$GL5$$>l9g$O%(%i!<$H$J$k(B.
882: $B$?$H$($P(B order=[[@@lex,...]] $B$O%(%i!<$H$J$k(B.
883: @item
884: dp_order $B$OM?$($i$l$?(B weight w $B$KBP$9$k<!?t$N:GBgCM$rLa$9(B.
885: $B$3$l$r(B @tex ${\rm ord}_w(f)$ @end tex
886: $B$H=q$/O@J8$d652J=q$b$"$k(B.
887: @item
888: $B0z?t$,%j%9%H$N>l9g3FMWAG$N<!?t$,7W;;$5$l$k(B.
889: @end itemize
890:
891: @example
892: [1220] F=<<2,0,0>>+<<1,1,0>>+<<0,0,1>>;
893: (1)*<<2,0,0>>+(1)*<<1,1,0>>+(1)*<<0,0,1>>
894: [1222] dp_order(F | order=[[1,1,1]]);
895: [ 1 1 1 ]
896: [ R R R ]
897: 2
898: [1223] dp_order(F | v=[x,y,z], order=[[x,1]]);
899: [ 1 0 0 ]
900: [ R R R ]
901: @end example
902:
903: @table @t
904: @item $B;2>H(B
905: @ref{dp_gr_main}, @ref{dp_weyl_gr_main}, @ref{dp_initial_term}, @ref{dp_hm}
906: @end table
907:
908: @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
909: @noindent
910: ChangeLog
911: @itemize @bullet
912: @item
913: OpenXM_contrib2/asir2000 $B$N2<$N<!$N3F%U%!%$%k$,=$@5$r$&$1$?(B.
914: builtin/dp-supp.c 1.32
915: builtin/dp.c 1.49
916: @end itemize
917:
1.8 takayama 918:
919: @comment mapat
920: @node mapat,,, $B<B83E*;EMM$N4X?t(B
921: @subsection @code{mapat}
922: @findex mapat
923:
924: @table @t
925: @item mapat(@var{fname},@var{pos}[,@var{arg0}, @var{arg1}, ...])
926: :: @var{pos} $B$KBP$9$k(B map $B4X?t(B
927: @end table
928:
929: @table @var
930: @item return
931: $B%*%V%8%'%/%H(B
932: @item pos
933: $B@0?t(B
934: @item arg0, arg1, arg2, ...
935: $B%*%V%8%'%/%H(B
936: @end table
937:
938: @itemize @bullet
939: @item
940: @code{map} $B4X?t$O(B 0 $BHVL\$N0z?t$KBP$7$F$7$+F0:n$7$J$$$,(B, @code{mapat}
941: $B4X?t$O;XDj$7$?HV9f$N0z?t$KBP$7$F(B @code{map} $B4X?t$r<B9T$9$k(B.
942: @item
943: @code{mapat(fname,0,A0,A1,...)} $B$O(B
944: @code{map(fname,A0,A1,...)} $B$KEy2A$G$"$k(B.
945: @item
946: $B<!$NI{:nMQ$,$"$k(B. $B$^$@=q$$$F$J$$(B.
947: @end itemize
948:
949: @example
950: [219] mapat(deg,1,x^2+y^3+x+y,[x,y]);
951: [2,3]
1.10 ohara 952: [220] mapat(subst,1,x+y+z,[x,y,z],2);
953: [y+z+2,x+z+2,x+y+2]
1.8 takayama 954: @end example
955:
956: @table @t
957: @item $B;2>H(B
958: @ref{map}
959: @end table
960:
961: @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
962: @comment --- openxm $B$N30It$+$i$N4sM?$b=R$Y$k(B. Credit.
963: @noindent
964: ChangeLog
965: @itemize @bullet
966: @item $B$3$N4X?t$O(B 2004-6-22 $B$K%3%_%C%H$5$l$?(B.
967: $BJQ99$r$&$1$?%=!<%9%3!<%I$O(B builtin/pf.c, subst.c $B$G$"$k(B.
968: @end itemize
969:
970: @comment list
971: @node list,,, $B<B83E*;EMM$N4X?t(B
972: @subsection @code{list}
973: @findex list
974:
975: @table @t
976: @item list([@var{arg0}, @var{arg1}, ...])
977: :: list $B$r@8@.$9$k(B.
978: @end table
979:
980: @table @var
981: @item return
982: $B%j%9%H(B
983: @item arg0, arg1, arg2, ...
984: $B%*%V%8%'%/%H(B
985: @end table
986:
987: @itemize @bullet
988: @item
989: @var{arg0}, @var{arg1}, ... $B$rMWAG$H$9$k%j%9%H$r@8@.$9$k(B.
990: @end itemize
991:
992: @example
993: [219] list(1,2,3);
994: [1,2,3]
995: [220] list(1,2,[3,4]);
996: [1,2,[3,4]]
997: @end example
998:
999: @table @t
1000: @item $B;2>H(B
1001: @ref{cons}
1002: @end table
1003:
1004: @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
1005: @comment --- openxm $B$N30It$+$i$N4sM?$b=R$Y$k(B. Credit.
1006: @noindent
1007: ChangeLog
1008: @itemize @bullet
1009: @item $B$3$N4X?t$O(B 2004-6-22 $B$K%3%_%C%H$5$l$?(B.
1010: $BJQ99$r$&$1$?%=!<%9%3!<%I$O(B builtin/list.c $B$G$"$k(B.
1011: @end itemize
1012:
1.9 takayama 1013:
1014: @node set_print_function,,, $B<B83E*;EMM$N4X?t(B
1015: @subsection @code{set_print_function}
1016: @findex set_print_function
1017:
1018: @comment --- $B4X?t$N4JC1$J@bL@(B ---
1019: @table @t
1020: @item set_print_function([@var{fname}])
1021: :: $B2hLLI=<(MQ$N4X?t$rEPO?(B
1022: @end table
1023:
1024: @table @var
1025: @item return
1026: $B@0?t(B
1027: @item fname
1028: $BJ8;zNs(B
1029: @end table
1030:
1031: @itemize @bullet
1032: @item
1033: @code{set_print_function} $B$O(B @code{fname(F)} $B$rDL>o$N2hLLI=<(4X?t$NBe$o$j$K$h$V(B.
1034: @code $B0z?t$,$J$$>l9g$O2hLLI=<(4X?t$r%G%U%)!<%k%H$XLa$9(B.
1035: @code Asir-contrib $B$O$3$N4X?t$rMQ$$$F=PNO4X?t$r(B Asir-contrib $BMQ$KJQ99$7$F$$$k(B.
1036: @end itemize
1037:
1038: @example
1039: [219] def my_output(F) {
1040: print("Out: ",0); print(rtostr(F));
1041: }
1042: [220] set_print_function("my_output");
1043: Out: 0
1044: [221] 1+2;
1045: Out: 3
1046: @end example
1047:
1048: @table @t
1049: @item $B;2>H(B
1050: @ref{rtostr}
1051: @end table
1052:
1053: @noindent
1054: ChangeLog
1055: @itemize @bullet
1056: @item $B$3$N4X?t$O(B 2001-9-4 $B$K(B asir-contrib $B$N$?$a$KF3F~$5$l$?(B.
1057: $BJQ99$r$&$1$?%=!<%9%3!<%I$O(B builtin/print.c 1.11 $B$G$"$k(B.
1058: @end itemize
1.8 takayama 1059:
1060:
1.12 takayama 1061: @node small_jacobi,,, $B<B83E*;EMM$N4X?t(B
1062: @subsection @code{small_jacobi}
1063: @findex small_jacobi
1064:
1065: @comment --- $B4X?t$N4JC1$J@bL@(B ---
1066: @table @t
1067: @item small_jacobi(@var{a},@var{m})
1068: :: Jacobi $B5-9f$N7W;;(B
1069: @end table
1070:
1071: @table @var
1072: @item return
1073: $B@0?t(B
1074: @item arg1, arg2
1075: $B@0?t(B
1076: @end table
1077:
1078: @itemize @bullet
1079: @item
1080: @var{m} $B$,AG?t$N$H$-$O(B Legendre $B5-9f$H$h$P$l(B,
1081: x^2 = @var{a} mod @var{m} $B$K2r$,$"$k$H$-(B 1, $B2r$,$J$$$H$-(B -1 $B$r$b$I$9(B.
1082: @item
1083: Jacobi $B5-9f$O(B Legendre $B5-9f$N@Q$GDj5A$5$l$k(B ($B=iEy@0?tO@$NK\;2>H(B).
1084: @item
1085: $B$3$N4X?t$O(B machine int $B$NHO0O$G(B jacobi $B5-9f$r7W;;$9$k(B.
1086: @end itemize
1087:
1088: @example
1089: [1286] small_jacobi(2,3);
1090: -1
1091: [1287] small_jacobi(2,7);
1092: 1
1093: @end example
1094:
1095: @table @t
1096: @item $B;2>H(B
1097: http://members.jcom.home.ne.jp/yokolabo/asirlib/
1098: $B$b8+$F$M(B.
1099: @end table
1100:
1101: @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
1102: @noindent
1103: ChangeLog
1104: @itemize @bullet
1.13 takayama 1105: @item $B$3$N4X?t$NM3Mh$OITL@(B.
1106: @end itemize
1107:
1108:
1.20 takayama 1109: @node flatten_quote,,, $B<B83E*;EMM$N4X?t(B
1110: @subsection @code{flatten_quote}
1111: @findex flatten_quote
1.13 takayama 1112:
1113: @comment --- $B4X?t$N4JC1$J@bL@(B ---
1114: @table @t
1.20 takayama 1115: @item flatten_quote(@var{q},@var{op})
1.13 takayama 1116: :: quote $B$N3g8L$r$H$j$5$k(B.
1117: @end table
1118:
1119: @table @var
1120: @item return
1121: Quote
1122: @item q
1123: Quote
1124: @item op
1125: $B1i;;;R$rI=$9J8;zNs(B.
1126: @end table
1127:
1128: @itemize @bullet
1129: @item
1130: Quote $B7?$N%G!<%?$OLZ9=B$$r$7$F$$$k(B
1131: ( quotetolist $B;2>H(B ).
1132: @code{quote_flatten()} $B$O(B, @var{q} $B$NCf$K$"$i$l$k1i;;;R(B @var{op}
1133: $B$N;R6!%N!<%I$rJ?Ey$K$9$k(B.
1134: $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.
1135: $B$?$H$($P(B (1+2)+(3+4) $B$H$$$&I=8=$r(B 1+2+3+4 $B$KJQ49$9$k(B.
1136: @item
1137: $B8=:_$N<BAu$G$O(B n-ary $B$N1i;;;R$ODj5A$5$l$F$$$J$$$N$G(B,
1.20 takayama 1138: 1+2+3 $B$O<B$O(B 1+(2+3) $B$HI=8=$5$l$F$$$k(B.
1139: $B$D$^$j(B + $B1i;;;R$O1&7k9gE*$G$"$k(B.
1140: @item R=0; for (I=0; I<N; I++) R = R+ P[I]; $B$J$kB-$7;;$r7+$jJV$9$H(B,
1141: + $B$O:87k9gE*$K$J$k(B. $B1&7k9gE*$KJQ49$9$k$K$O(B flatten_quote $B$r8F$V(B.
1142: @item $BL>A0$O(B quote_flatten $B$G$J$/(B flatten_quote $B$G$"$k(B.
1.13 takayama 1143: @end itemize
1144:
1145: @example
1146: [1288] flatten_quote(quote((1+2)+(3+4*(x+3))),"+");
1147: quote(1+2+3+4*(x+3))
1148: [1289] flatten_quote(quote( (x*y)*(p*3)-(x*y)*z),"*");
1149: quote(x*y*p*3-x*y*z)
1150: [1290] quotetolist(quote(1+2+3));
1151: [b_op,+,[b_op,+,[internal,1],[internal,2]],[internal,3]]
1152: @end example
1153:
1154: @table @t
1155: @item $B;2>H(B
1156: @ref{quotetolist}, @ref{print_tex_form}(contrib)
1157: @end table
1158:
1159: @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
1160: @noindent
1161: ChangeLog
1162: @itemize @bullet
1163: @item
1164: $B$3$N4X?t$O(B 2004-7-7 $B$+$i(B 2004-7-8 $B$K$+$1$F(B
1165: quote $B$K4X$9$kA`:n$r8&5f$9$k$?$a$K<B83E*$K=q$+$l$?(B.
1166: 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
1167: $B1~MQ(B.
1168: @item
1169: $BJQ99$r$&$1$?%=!<%9%3!<%I$O(B
1170: builtin/strobj.c 1.47,
1.14 takayama 1171: parse/eval.c 1.35,
1172: parse/parse.h 1.31,
1173: parse/quote.c 1.14--1.16.
1174: @end itemize
1175:
1176: @node assoc,,, $B<B83E*;EMM$N4X?t(B
1177: @subsection @code{assoc}
1178: @findex assoc
1179:
1180: @comment --- $B4X?t$N4JC1$J@bL@(B ---
1181: @table @t
1182: @item assoc(@var{a},@var{b})
1183: :: $BO"A[%j%9%H$r$D$/$k(B
1184: @end table
1185:
1186: @table @var
1187: @item return
1188: List
1189: @item a
1190: List
1191: @item b
1192: List
1193: @end table
1194:
1195: @itemize @bullet
1196: @item $B%j%9%H(B @var{a}, @var{b} $B$h$j(B
1197: [[@var{a}[0],@var{b}[0]], [@var{a}[1],@var{b}[1]], ...]
1198: $B$J$k?7$7$$%j%9%H$r@8@.$9$k(B.
1199: @end itemize
1200:
1201: $B2<$NNc$G$O(B @code{A} $B$KF0J*$NL>A0$,(B,
1202: @code{B} $B$KB-$NK\?t$,F~$C$F$$$k(B.
1203: @code{assoc(A,B)} $B$GF0J*$HB-$NK\?t$r%Z%"$K$7$?%j%9%H$r@8@.$9$k(B.
1204:
1205: @example
1206: [1192] A=["dog","cat","snake"];
1207: [dog,cat,snake]
1208: [1193] B=[4,4,0];
1209: [4,4,0]
1210: [1194] assoc(A,B);
1211: [[dog,4],[cat,4],[snake,0]]
1212: @end example
1213:
1214: @table @t
1215: @item $B;2>H(B
1216: @ref{cons}, @ref{append}
1217: @end table
1218:
1219: @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
1220: @noindent
1221: ChangeLog
1222: @itemize @bullet
1223: @item
1224: $B$3$N4X?t$O(B 2004-6-28 $B$K=q$+$l$?(B.
1225: $BJQ99$r$&$1$?%=!<%9%3!<%I$O(B
1226: builtin/list.c 1.9
1.13 takayama 1227: parse/eval.c 1.35,
1228: parse/parse.h 1.31,
1229: parse/quote.c 1.14--1.16.
1.12 takayama 1230: @end itemize
1.13 takayama 1231:
1.15 takayama 1232:
1233: @node sprintf,,, $B<B83E*;EMM$N4X?t(B
1.28 ohara 1234: @subsection @code{printf}, @code{fprintf}, @code{sprintf}
1.15 takayama 1235: @findex sprintf
1236:
1237: @table @t
1.27 ohara 1238: @item printf(@var{format}[,@var{args}])
1.28 ohara 1239: @item fprintf(@var{fd},@var{format}[,@var{args}])
1.15 takayama 1240: @item sprintf(@var{format}[,@var{args}])
1241: :: C $B$K;w$?%W%j%s%H4X?t(B
1242: @end table
1243:
1244: @table @var
1245: @item return
1.28 ohara 1246: $B@0?t(B(printf,fprintf), $BJ8;zNs(B(sprintf)
1.15 takayama 1247: @item format
1248: $BJ8;zNs(B
1.28 ohara 1249: @item fd
1250: $BHsIi@0?t(B($B%U%!%$%k5-=R;R(B)
1.15 takayama 1251: @item args
1252: $B%*%V%8%'%/%H(B
1253: @end table
1254:
1255: @itemize @bullet
1256: @item
1.27 ohara 1257: @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 1258: @item
1.28 ohara 1259: @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.
1260: @item
1.27 ohara 1261: @code{sprintf} $B$O7k2L$rJ8;zNs$GJV$7(B, $BI8=`=PNO$K$O=q$-=P$5$J$$(B.
1262: @item
1263: $B=q<0J8;zNs$NCf$G(B @code{%a} (any) $B$,MxMQ2DG=(B.
1264: @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 1265: @item
1266: $B%U%!%$%k5-=R;R$O(B, @code{open_file} $B4X?t$rMQ$$$FF@$k$3$H(B.
1.15 takayama 1267: @end itemize
1268:
1269: @example
1.27 ohara 1270: [0] printf("%a: rat = %a\n",10,x^2-1)$
1271: 10: rat = x^2-1
1272: [1] S=sprintf("%a: rat = %a",20,x^2-1)$
1273: [2] S;
1274: 20: rat = x^2-1
1.28 ohara 1275: [3] Fd=open_file("hoge.txt","w");
1276: 0
1277: [4] fprintf(Fd,"Poly=%a\n",(x-1)^3)$
1278: [5] close_file(Fd)$
1279: [6] quit;
1280:
1281: $ cat hoge.txt
1282: Poly=x^3-3*x^2+3*x-1
1.15 takayama 1283: @end example
1284:
1285: @table @t
1286: @item $B;2>H(B
1.28 ohara 1287: @ref{rtostr},@ref{open_file},@ref{close_file}
1.15 takayama 1288: @end table
1289:
1290: @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
1291: @comment --- openxm $B$N30It$+$i$N4sM?$b=R$Y$k(B. Credit.
1292: @noindent
1293: ChangeLog
1294: @itemize @bullet
1295: @item
1.27 ohara 1296: $B4X?t(B sprintf$B$O(B 2004-7-13 $B$K%3%_%C%H$5$l$?(B.
1.15 takayama 1297: $BJQ99$r$&$1$?%=!<%9%3!<%I$O(B builtin/strobj (1.50) $B$G$"$k(B.
1298: @item
1.27 ohara 1299: $B4X?t(B printf$B$O(B 2007-11-8 $B$K%3%_%C%H$5$l$?(B.
1300: $BJQ99$r$&$1$?%=!<%9%3!<%I$O(B builtin/print.c (1.23) $B$G$"$k(B.
1301: @item
1.28 ohara 1302: $B4X?t(B fprintf$B$O(B 2008-11-18 $B$K%3%_%C%H$5$l$?(B.
1303: $BJQ99$r$&$1$?%=!<%9%3!<%I$O(B builtin/file.c (1.25) $B$G$"$k(B.
1304: @item
1.15 takayama 1305: @code{%a} $B$O(B Maple $B$N(B sprintf $B$N??;w$+(B.
1306: @end itemize
1307:
1308:
1309: @node quote_to_funargs,,, $B<B83E*;EMM$N4X?t(B
1310: @subsection @code{quote_to_funargs}, @code{funargs_to_quote}, @code{remove_paren}
1311: @findex quote_to_funargs
1312: @findex funargs_to_quote
1313: @findex remove_paren
1314:
1315: @table @t
1316: @item quote_to_funargs(@var{q})
1317: :: quote $B$r(B funarg $B7A<0(B($B%j%9%H(B) $B$X(B.
1318: @item funargs_to_quote(@var{f})
1319: :: funarg $B7A<0$r(B quote $B$X(B.
1.19 takayama 1320: @item get_function_name(@var{f})
1321: :: funarg $B7A<0$N(B op $B$rJ8;zNs$X(B.
1.15 takayama 1322: @item remove_paren(@var{q})
1323: :: $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)
1324: @end table
1325:
1326: @table @var
1327: @item return
1328: quote(funargs_to_quote, remove_paren) $B$+(B $B%j%9%H(B(quote_to_funargs)
1329: @item q
1330: quote
1331: @item f
1332: $B%j%9%H(B
1333: @end table
1334:
1335: @itemize @bullet
1336: @item
1337: @code{quote_to_funargs} $B$O(B quote $B7?$N%G!<%?(B ($BFbItE*$K$O(B FNODE) $B$r(B
1338: quote $B$X$NI|852DG=$J7A$G%j%9%H$XJQ49$9$k(B.
1339: @code{quotetolist} $B$O(B quote $B$r%j%9%H$XJQ49$9$k$,(B, $B0lIt$N>pJs$r<N$F$k$?$a(B
1340: $B$b$H$N(B quote $B$NI|85$O$G$-$J$$(B.
1341: @item
1.19 takayama 1342: @code{quote_to_funargs} $B$NLa$jCM$O(B [fid, op, arg1, arg2, ...]
1343: $B$J$k7A<0$r$7$F$$$k(B.
1344: $B$3$3$G(B op $B$O(B node $B$NL>A0$G$"$j(B,
1345: $B4X?t(B @code{get_function_name} $B$rMQ$$$F?M4V$,FI$a$k7A<0(B
1346: $B$G<h$j$@$;$k(B.
1347: $B$?$H$($P(B @code{get_function_name(quote_to_funargs(quote(1+2))[1])}
1348: $B$O(B "+" $B$rLa$9(B.
1349: @item
1350: $BL>A0(B@code{get_function_name} $B$O$=$N$&$AJQ99$5$l$k$@$m$&(B.
1.15 takayama 1351: @item
1352: $B2<$NNc$G(B
1353: quote_to_funargs(FA[2]);
1354: [34,[b_op,+,[internal,x],[internal,1]]]
1.19 takayama 1355: $B$H$J$k(B.
1356: 34 $B$O(B @code{I_PAREN} $B$r0UL#$9$k(B.
1357: $B?t$H0UL#$NBP1~I=$O(B @code{OpenXM/src/asir-contrib/packages/src/noro_simplify.rr}
1358: $B$^$?$O(B @code{OpenXM_contrib2/asir2000/parse/parse.h} $B$r8+$h(B.
1359: $B0J2<$N(B fid $B$,(B 0, 1, 2, ... $B$KBP1~$E$1$i$l$F$$$k(B.
1360: I_BOP, I_COP, I_AND, I_OR, I_NOT, I_CE,
1361: I_PRESELF, I_POSTSELF,
1362: I_FUNC, I_FUNC_OPT, I_IFUNC, I_MAP, I_RECMAP, I_PFDERIV,
1363: I_ANS, I_PVAR, I_ASSPVAR,
1364: I_FORMULA, I_LIST, I_STR, I_NEWCOMP, I_CAR, I_CDR, I_CAST,
1365: I_INDEX, I_EV, I_TIMER, I_GF2NGEN, I_GFPNGEN, I_GFSNGEN,
1366: I_LOP, I_OPT, I_GETOPT, I_POINT, I_PAREN, I_MINUS,
1367: I_NARYOP
1.15 takayama 1368: @end itemize
1369:
1370: $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.
1371: @example
1372: [0] ctrl("print_quote",1) $
1373:
1374: [1] Q=quote((x+1)+(x+2));
1375: [b_op,+,[u_op,(),[b_op,+,[internal,x],[internal,1]]],
1376: [u_op,(),[b_op,+,[internal,x],[internal,2]]]]
1377:
1378: [2] FA=quote_to_funargs(Q);
1379: [0,<...quoted...>,
1380: [u_op,(),[b_op,+,[internal,x],[internal,1]]],
1381: [u_op,(),[b_op,+,[internal,x],[internal,2]]]]
1382:
1383: [3] FA2=quote_to_funargs(FA[2])[1];
1384: [b_op,+,[internal,x],[internal,1]]
1385:
1386: [4] FA3=quote_to_funargs(FA[3])[1];
1387: [b_op,+,[internal,x],[internal,2]]
1388:
1389: [5] funargs_to_quote([FA[0],FA[1],FA2,FA3]);
1390: [b_op,+,[b_op,+,[internal,x],[internal,1]],
1391: [b_op,+,[internal,x],[internal,2]]]
1392: @end example
1393:
1394: $B<!$NNc$O(B OpenXM/asir-contrib $BHG$N(B asir $B$G<B9T(B.
1395: @example
1396: [1287] load("noro_simplify.rr");
1397: 1
1398: [1293] noro_simplify.remove_paren(quote( f(1-(x))));
1399: quote(f(1-x))
1400: @end example
1401:
1.19 takayama 1402: funargs_to_quote $B$rMQ$$$F4{B8$N(B quote $B$N;R6!$rCV$-49$($F(B
1403: $B?7$7$$(B quote $B$r$D$/$j=P$;$k(B.
1404: @example
1405: [1184] R=quote_to_funargs(quote(a+(b+c)));
1406: [0,<...quoted...>,<...quoted...>,<...quoted...>]
1407: [1185] T=quote_to_funargs(quote(1+2));
1408: [0,<...quoted...>,<...quoted...>,<...quoted...>]
1409: [1186] funargs_to_quote([0,R[1],R[2],T[2]]);
1410: quote(a+1)
1411: @end example
1412:
1.15 takayama 1413: @table @t
1414: @item $B;2>H(B
1415: @ref{quotetolist}
1416: @end table
1417:
1.17 takayama 1418:
1.15 takayama 1419: @noindent
1420: ChangeLog
1421: @itemize @bullet
1422: @item
1423: $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
1424: $B$N<B83E*4X?t$G$"$k(B.
1425: $BJQ99$r$&$1$?%=!<%9%3!<%I$OB?4t$K$o$?$k$N$G$^$@=q$+$J$$(B.
1426: @item
1427: $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.
1428: @item
1429: 2004-6-26 $B$N7W;;Be?t%;%_%J!<$K$*$$$F(B, $BCf@n$5$s$,(B simplifier $B$K$D$$$F$$$m$$$mLdBjDs5/(B
1430: $B$r$7$?(B ($B7W;;Be?t%;%_%J!<%S%G%*;2>H(B).
1.19 takayama 1431: @item parse/quote.c $B$N(B {\tt strcut fid_spec fid_spec_tab[] }
1432: $B$NItJ,$K=q$$$F$"$k7A<0$K(B @code{funargs_to_quote} $B$OJQ49$9$k(B.
1.17 takayama 1433: @end itemize
1434:
1435: @node set_secure_flag,,, $B<B83E*;EMM$N4X?t(B
1436: @subsection @code{set_secure_flag}, @code{set_secure_mode}
1437: @findex set_secure_flag
1438: @findex set_secure_mode
1439:
1440: @comment --- $B4X?t$N4JC1$J@bL@(B ---
1441: @comment --- @itemx $B$OJ#?t$KBP$7$F@bL@$r0l$D$D$1$k>l9g$K;H$&(B ---
1442: @table @t
1443: @item set_secure_flag(@var{fname},@var{m})
1444: @itemx set_secure_mode(@var{m})
1445: :: $B4X?t$N<B9T8"8B$r@_Dj$9$k(B. (web $B%5!<%S%9MQ(B)
1446: @end table
1447:
1448: @table @var
1449: @item return
1450: $B@0?t(B
1451: @item fname
1452: $BJ8;zNs(B
1453: @item m
1454: $B@0?t(B
1455: @end table
1456:
1457: @itemize @bullet
1.18 takayama 1458: @item @code{set_secure_flag}, @code{set_secure_mode} $B$O(B
1459: asir $B$r(B web $B%5!<%PEy$G8x3+$9$k$?$a$K2C$($i$l$?4X?t(B.
1460: @code{set_secure_flag} $B$G8x3+$9$k4X?t$r;XDj$9$k(B.
1.17 takayama 1461: @code{secure_mode} $B$,(B 1 $B$N>l9g$O(B @code{set_secure_flag} $B$G;XDj$5$l$?(B
1462: $B4X?t$7$+<B9T$G$-$J$$(B.
1.18 takayama 1463: $B4X?t$N<B9TESCf$G$O(B @code{secure_mode} $B$,(B 0 $B$H$J$C$F$$$k$N$G(B,
1.17 takayama 1464: $BG$0U$N4X?t$r<B9T$G$-$k(B.
1465: $B$^$?%(%i!<$N;~Ey$O(B, @code{secure_mode} $B$O(B 1 $B$K<+F0E*$KI|5"$9$k(B.
1466: $B$?$@$7(B @code{def} $B$O<B9T$G$-$J$$(B.
1467: $B8x3+$9$k4X?t$G$O(B, $B$=$N=hM}Cf$OG$0U$N4X?t$,<B9T$G$-$k$N$G(B,
1468: security $B$K==J,Cm0U$7$?<BAu$r$9$kI,MW$,$"$k(B.
1469: @item
1470: @code{set_secure_flag} $B$O(B, @var{fname} $B$N(B secure flag $B$r(B @var{m}
1471: $B$K$9$k(B.
1.18 takayama 1472: $B8x3+$9$kL?Na$O(B 1 $B$K@_Dj$9$k(B.
1.17 takayama 1473: @item
1474: @var{set_secure_mode(1)} $B$G(B @code{secure_mode} $B$,(B 1 $B$H$J$j(B,
1475: $B8x3+$5$l$?4X?t$7$+<B9T$G$-$J$/$J$k(B.
1476: quit $BEy$b<B9T$G$-$J$$$N$GCm0U(B.
1.18 takayama 1477: @item @code{ timer } $B$N0z?t$H$7$F(B secure_flag $B$r@_Dj$7$F$$$J$$4X?t$r(B
1478: $B;XDj$7$F<B9T$7$F$b%(%i!<$,I=<($5$l$J$$(B.
1479: $B$3$N$H$-$O(B, @code{ ctrl("error_in_timer",1) } $B$r<B9T$7$F$*$/(B.
1.17 takayama 1480: @end itemize
1481:
1482: @example
1483: [1194] set_secure_flag("print_input_form_",1);
1484: 1
1485: [1195] set_secure_flag("fctr",1);
1486: 1
1487: [220] set_secure_mode(1);
1488: 1
1489: [1197] fctr((x-1)^3);
1490: [[1,1],[x-1,3]]
1491: [1198] fctr(shell("ls"));
1492: evalf : shell not permitted
1493: return to toplevel
1494: @end example
1495:
1496: @table @t
1497: @item $B;2>H(B
1498: @ref{timer}
1499: @end table
1500:
1501: @noindent
1502: ChangeLog
1503: @itemize @bullet
1.18 takayama 1504: @item @code{set_secure_flag}, @code{set_secure_mode} $B$O(B asir $B$r(B
1505: web $B%5!<%PEy$G8x3+$9$k$?$a$K2C$($i$l$?4X?t(B.
1506: sm1 $B$NF1MM$J4X?t(B RestrictedMode $B$G:NMQ$5$l$?J}K!$rMQ$$$F$$$k(B.
1507: $B$D$^$j(B, @code{set_secure_flag} $B$G8x3+$9$k4X?t$r;XDj$9$k(B.
1508: @code{secure_mode} $B$,(B 1 $B$N>l9g$O(B @code{set_secure_flag} $B$G;XDj$5$l$?(B
1509: $B4X?t$7$+<B9T$G$-$J$$(B.
1510: v$B4X?t$N<B9TESCf$G$O(B @code{secure_mode} $B$,(B 0 $B$H$J$C$F$$$k$N$G(B,
1511: $BG$0U$N4X?t$r<B9T$G$-$k(B.
1.17 takayama 1512: @item $B$3$N4X?t$O(B 2004-10-27 $B$+$i(B 2004-11-22 $B$K$+$1$F3+H/$5$l$?(B.
1513: @item cgiasir.sm1, cgi-asir.sh $B$HAH$_9g$o$;$F(B cgi $B%5!<%S%9$rDs6!$9$k$?$a$K(B
1514: $BMxMQ$9$k(B.
1515: cgi-asir.sh $B$G$O(B
1516: @code{CGI_ASIR_ALLOW} $B4D6-JQ?t$G8x3+$9$k%3%^%s%I$r;XDj$9$k(B.
1517: @item
1518: 1.24--1.25 OpenXM_contrib2/asir2000/builtin/miscf.c
1519: @item
1520: 1.36--1.38 OpenXM_contrib2/asir2000/parse/eval.c
1521: @item
1522: 1.6--1.7 OpenXM_contrib2/asir2000/parse/function.c
1523: @item
1524: 1.33 OpenXM_contrib2/asir2000/parse/parse.h
1.15 takayama 1525: @end itemize
1.21 takayama 1526:
1.22 takayama 1527: @node initialize_static_variable,,, $B<B83E*;EMM$N4X?t(B
1528: @subsection @code{initialize_static_variable}
1529: @findex initialize_static_variable
1.21 takayama 1530:
1531:
1532: @comment --- $B@bL@(B ---
1533: @table @t
1.22 takayama 1534: @item static $BJQ?t$N=i4|2=$NLdBjE@(B. $B=i4|2=$N;~$K(B segmentation fault $B$,$*$-$k(B.
1.21 takayama 1535: @end table
1536:
1537:
1538: @itemize @bullet
1539: @item static $BJQ?t$N<h07(B.
1540: $B2<$NNc$r;2>H$N$3$H(B.
1541: @end itemize
1542:
1543:
1544: @example
1545: if (1) @{
1546: module abc;
1547: static A;
1548: A=1;
1549: endmodule;
1550: @} else @{ @};
1551:
1552: end$
1553: $B$r(B t.rr $B$H$9$k$H$-(B,
1554:
1555: [6] load("./t.rr");
1556: 1
1557: internal error (SEGV)
1558: $B$H$J$k(B.
1559:
1560: t.rr $B$r(B
1561: if (1) @{
1562: module abc;
1563: static A;
1564: localf initA;
1565: localf foo;
1566: def initA() @{
1567: A=1;
1568: @}
1569: initA();
1570: def foo() @{
1571: return A;
1572: @}
1573: endmodule;
1574: @} else @{ @};
1575:
1576: end$
1577: $B$H$9$k$H@5$7$/=i4|2=$5$l$k(B.
1578: @end example
1579:
1580: @comment --- ChangeLog
1581: @noindent
1582: ChangeLog
1583: @itemize @bullet
1584: @item oxasir-win.rr $B$N<h07$GLdBjE@$H$7$FIb>e(B. 2005.07.25.
1.22 takayama 1585: @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.
1.21 takayama 1586: @item ox_asir $B$K7W;;$r0MMj$9$k;~$O(B if (1) @{ ... @}$B$G0O$`(B.
1587: @end itemize
1588:
1.23 takayama 1589: @node eval_quote,,, $B<B83E*;EMM$N4X?t(B
1590: @subsection @code{eval_quote}
1591: @findex eval_quote
1592:
1593: @comment --- $B4X?t$N4JC1$J@bL@(B ---
1594: @comment --- @itemx $B$OJ#?t$KBP$7$F@bL@$r0l$D$D$1$k>l9g$K;H$&(B ---
1595: @table @t
1596: @item eval_quote(@var{Q});
1597: :: quote $B7?%G!<%?(B @var{Q} $B$r(B asir $B$N%*%V%8%'%/%H$KJQ49$9$k(B.
1598: @end table
1599:
1600: @table @var
1601: @item return
1602: $B%*%V%8%'%/%H(B
1603: @item Q
1604: quote$B7?(B
1605: @end table
1606:
1607: @itemize @bullet
1608: @item quote $B7?%G!<%?(B @var{Q} $B$r(B asir $B$N%*%V%8%'%/%H$KJQ49$9$k(B.
1609: @item $B5U4X?t$O(B @code{objtoquote}
1610: @end itemize
1611:
1612: @example
1613: ctrl("print_quote",2);
1614: A=quote((x-1)^2+(x-1)+3);
1615: $B=PNO(B: ((((x)-(1))^(2))+((x)-(1)))+(3)
1616: eval_quote(A);
1617: $B=PNO(B: x^2-x+3
1618: print_input_form(A); /* asir-contrib */
1619: $B=PNO(B: quote((x-1)^2+(x-1)+3)
1620: @end example
1621:
1622: @table @t
1623: @item $B;2>H(B
1624: @ref{objtoquote}, @ref{quotetolist}, @ref{eval_string},
1625: @ref{quote_to_funargs}, @ref{funargs_to_quote}
1626: @end table
1627:
1628: @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
1629: @comment --- openxm $B$N30It$+$i$N4sM?$b=R$Y$k(B. Credit.
1630: @noindent
1631: ChangeLog
1632: @itemize @bullet
1633: @item -----$B$^$@=q$$$F$J$$(B.
1634: @end itemize
1635:
1636:
1637: @node nqt_match,,, $B<B83E*;EMM$N4X?t(B
1638: @subsection @code{nqt_match}
1639: @findex nqt_match
1640:
1641: @comment --- $B4X?t$N4JC1$J@bL@(B ---
1642: @comment --- @itemx $B$OJ#?t$KBP$7$F@bL@$r0l$D$D$1$k>l9g$K;H$&(B ---
1643: @table @t
1644: @item nqt_match(@var{Expr},@var{Pattern}[,@var{Mode}])
1645: :: @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.
1646: @end table
1647:
1648: @table @var
1649: @item return
1650: $B@0?t(B
1651: @item Expr
1652: quote$B7?(B
1653: @item Pattern
1654: quote$B7?(B
1655: @item Mode
1656: $B@0?t(B
1657: @end table
1658:
1659: @itemize @bullet
1660: @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.
1661: @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.
1662: @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.
1663: @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
1664: fnode$BI8=`7A$H(B @var{Pattern} $B$rHf3S$9$k(B.
1665: @end itemize
1666:
1667: @example
1668: ctrl("print_quote",2);
1669: A=quote((x-y)*(x+y));
1670: nqt_match(A,quote(P*Q));
1671: [P,Q]
1672: $B=PNO(B: [x-y, x+y]
1673: nqt_match(A,quote(P*Q),1);
1674: $B%^%C%A$7$J$$(B.
1675: nqt_match(A,quote(P*Q),2);
1676: $B%^%C%A$7$J$$(B.
1677: qt_normalize(A,1);
1678: $B=PNO(B: ((x)^(2))+((x)*(y))+((-1)*((y)^(2)))+((-1)*(y)*(x))
1679: qt_normalize(A,2);
1680: $B=PNO(B: ((x)*(x))+((x)*(y))+((-1)*(y)*(x))+((-1)*(y)*(y))
1681: @end example
1682:
1683: @table @t
1684: @item $B;2>H(B
1685: @ref{nqt_match_rewrite},
1686: @ref{qt_rewrite}
1687: @end table
1688:
1689: @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
1690: @comment --- openxm $B$N30It$+$i$N4sM?$b=R$Y$k(B. Credit.
1691: @noindent
1692: ChangeLog
1693: @itemize @bullet
1694: @item ----- $B$^$@=q$$$F$J$$(B.
1695: @end itemize
1696:
1697:
1698: @node nqt_match_rewrite,,, $B<B83E*;EMM$N4X?t(B
1699: @subsection @code{nqt_match_rewrite}
1700: @findex nqt_match_rewrite
1701:
1702: @comment --- $B4X?t$N4JC1$J@bL@(B ---
1703: @comment --- @itemx $B$OJ#?t$KBP$7$F@bL@$r0l$D$D$1$k>l9g$K;H$&(B ---
1704: @table @t
1705: @item nqt_match_rewrite(@var{Expr},@var{Rule},@var{Mode})
1706: :: @var{Expr} $B$r(B @var{Rule} $B$K=>$$=q$-49$($k(B.
1707: @end table
1708:
1709: @table @var
1710: @item return
1711: quote$B7?(B
1712: @item Expr
1713: quote$B7?(B
1714: @item Rule
1715: [@var{Pattern},@var{Action}] $B$+$^$?$O(B
1716: [@var{Pattern},@var{Condition},@var{Action}].
1717: $B$3$l$i$NMWAG$O$9$Y$F(B quote$B7?(B.
1718: @item Mode
1719: $B@0?t(B
1720: @end table
1721:
1722: @itemize @bullet
1723: @item @var{Expr} $B$r(B @var{Rule} $B$K=>$$=q$-49$($k(B. @var{Pattern} $B$KE,9g$7$J$$>l9g$O(B
1724: @var{Exprt} $B<+BN$rLa$9(B.
1725: @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.
1726: @end itemize
1727:
1728: @comment %%Doc: cfep/tests/2006-03-12-qt.rr
1729: @example
1730: ctrl("print_quote",2);
1731: nqt_match_rewrite(`x*y*z,[`X*Y,`X+Y],1);
1732: $B=PNO(B: (x)+((y)*(z))
1733: A=`x*x;
1734: nqt_match_rewrite(A,[`X*Y,`X+Y],1);
1735: $B=PNO(B: x^2 ($B%^%C%A$7$F$$$J$$(B)
1736: nqt_match_rewrite(A,[`X*Y,`X+Y],2);
1737: $B=PNO(B: 2*x
1738:
1739: $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.
1740: quotetolist(qt_normalize(`x*x,0));
1741: $B=PNO(B: [b_op,^,[internal,x],[internal,2]]
1742: quotetolist(qt_normalize(`x*x,1));
1743: $B=PNO(B: [b_op,^,[internal,x],[internal,2]]
1744: quotetolist(qt_normalize(`x*x,2));
1745: $B=PNO(B: [n_op,*,[internal,x],[internal,x]]
1746: @end example
1747:
1748: @table @t
1749: @item $B;2>H(B
1750: @ref{nqt_match},
1751: @ref{qt_rewrite},
1752: @ref{qt_normalize}
1753: @end table
1754:
1755: @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
1756: @comment --- openxm $B$N30It$+$i$N4sM?$b=R$Y$k(B. Credit.
1757: @noindent
1758: ChangeLog
1759: @itemize @bullet
1760: @item -----$B$^$@=q$$$F$J$$(B.
1761: @end itemize
1762:
1763:
1764:
1765: @node qt_normalize,,, $B<B83E*;EMM$N4X?t(B
1766: @subsection @code{qt_normalize}
1767: @findex qt_normalize
1768:
1769: @comment --- $B4X?t$N4JC1$J@bL@(B ---
1770: @comment --- @itemx $B$OJ#?t$KBP$7$F@bL@$r0l$D$D$1$k>l9g$K;H$&(B ---
1771: @table @t
1772: @item qt_normalize(@var{Expr}[,@var{Mode}])
1773: :: @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.
1774: @end table
1775:
1776: @table @var
1777: @item return
1778: quote$B7?(B
1779: @item Expr
1780: quote$B7?(B
1781: @item Mode
1782: $B@0?t(B
1783: @end table
1784:
1785: fnode$B$O(B quote$B7?$N<BBN$G$"$k(B.
1786: fnode $B$OLZ$G$"$j(B, $B7?(B id $B$*$h$S;R6!$+$i$J$k(B.
1787: $B7?$*$h$S;R6!$r<h$j=P$94X?t$,(B funargs_to_quote $B$G$"$k(B.
1788: $B$^$?(B fnode $B$r%j%9%H$KJQ49$9$k4X?t$,(B quotetolist $B$G$"$k(B.
1789:
1790: fnode $B$NI8=`7A$O%Q%?!<%s%^%C%A%s%0(B, $B=q$-49$($rMF0W$K$*$3$J$&$?$a$KF3F~$5$l$?(B.
1791: 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.
1792: @example
1793: fn = formula | functor(nf [,...]) | sum_of_monom
1794: fnode $B$NI8=`7A(B. functor $B$O4X?t$h$S$@$7$_$?$$$J$b$N(B.
1795: sum_of_monom = monom [+ ...]
1796: $B%b%N%_%"%k$NOB(B
1797: monom = [formula *] nfpow [* ...]
1798: $B%b%N%_%"%k(B
1799: nfpow = nf | nf^(nf)
1800: $BQQ>hItJ,$NI8=`7A(B
1801: formula = Risa object
1802: @end example
1803:
1804:
1805: @itemize @bullet
1806: @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.
1807: @item $BE83+$O:F5"E*$G$"$k(B.
1808: @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
1809: (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
1810: $B;R6!$r;}$F$k(B n-ary operator $B$KJQ49$5$l$k(B.
1811: @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.
1812: @item @var{Mode}=0. $BE83+$7$J$$(B. $B$3$l$,4{Dj$NF0:n(B.
1813: @item @var{Mode}=1. $BE83+$9$k(B. $B$?$@$7(B x*x $BEy$r(B x^2 $BEy$KJQ49(B
1814: @item @var{Mode}=2. $BE83+$9$k(B. $B$?$@$7(B x*x $BEy$r(B x^2 $BEy$KJQ49$7$J$$(B.
1815: @end itemize
1816:
1817: @var{Mode} $B$N0c$$$K$D$$$F$O0J2<$NNc$b;29M$K(B.
1818: @comment %%cfep/tests/2006-03-12-qt.rr
1819: @example
1820: ctrl("print_quote",2);
1821: A=quote((x-y)*(x+y));
1822: $B=PNO(B: ((x)-(y))*((x)+(y))
1823: B=qt_normalize(A,0);
1824: $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.
1825: quotetolist(B);
1826: $B=PNO(B: [n_op,*,[n_op,+,[internal,x],[n_op,*,[internal,-1],[internal,y]]],[n_op,+,[internal,x],[internal,y]]]
1827:
1828: B=qt_normalize(A,1);
1829: $B=PNO(B: ((x)^(2))+((x)*(y))+((-1)*((y)^(2)))+((-1)*(y)*(x))
1830: Mode=1. $BE83+$9$k(B. +, * $B$O(B n_op (nary-op) $B$X(B. $B6R$r$^$H$a$k(B.
1831: quotetolist(B);
1832: $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]]]
1833:
1834: qt_normalize(A,2);
1835: $B=PNO(B: ((x)*(x))+((x)*(y))+((-1)*(y)*(x))+((-1)*(y)*(y))
1836: Mode=2. $BE83+$9$k(B. +, * $B$O(B n_op (nary-op) $B$X(B. $B6R$O;H$o$J$$(B.
1837: quotetolist(B);
1838: $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]]]
1839:
1840: qt_normalize(`x^2,2);
1841: $B=PNO(B: (x)*(x)
1842: Mode=2. $B6R$O;H$o$J$$(B. n-ary $B$N(B * $B$X(B.
1843: @end example
1844:
1845: @table @t
1846: @item $B;2>H(B
1847: @ref{nqt_match},
1848: @ref{nqt_match_rewrite},
1849: @ref{quotetolist},
1850: @ref{quote_to_funargs}
1851: @end table
1852:
1853: @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
1854: @comment --- openxm $B$N30It$+$i$N4sM?$b=R$Y$k(B. Credit.
1855: @noindent
1856: ChangeLog
1857: @itemize @bullet
1858: @item
1859: @end itemize
1860:
1861:
1862: @node qt_set_coef,,, $B<B83E*;EMM$N4X?t(B
1863: @subsection @code{qt_set_coef}
1864: @findex qt_set_coef
1865:
1866: @comment --- $B4X?t$N4JC1$J@bL@(B ---
1867: @comment --- @itemx $B$OJ#?t$KBP$7$F@bL@$r0l$D$D$1$k>l9g$K;H$&(B ---
1868: @table @t
1869: @item qt_set_coef(@var{ParamList})
1870: :: $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
1871: $BHs2D49B?9`<0$r07$&(B.
1872: @end table
1873:
1874: @table @var
1875: @item return
1876: $B%j%9%H(B
1877: @item ParamList
1878: $B%j%9%H(B
1879: @end table
1880:
1881: @itemize @bullet
1882: @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
1883: $BHs2D49B?9`<0$r07$&(B.
1884: @item $B$3$N@k8@$r$7$J$$$H78?tBN$r?t$H$9$kHs2D49B?9`<0$H$7$F7W;;$9$k(B.
1885: @item qt_normalize $B$*$h$S$=$N5!G=$rMQ$$$k4X?t$,$3$N5!G=$N1F6A$r<u$1$k(B.
1886: @item qt_comp $B4X?t$,$3$N5!G=$N1F6A$r<u$1$k(B.
1887: @end itemize
1888:
1889: @example
1890: ctrl("print_quote",2);
1891: qt_set_coef([a]);
1892: B=qt_normalize(quote((a*x+a)^2),2);
1893: $B=PNO(B: ((a^2)*(x)*(x))+((2*a^2)*(x))+(a^2)
1894: qt_normalize(B+B,2);
1895: $B=PNO(B: ((2*a^2)*(x)*(x))+((4*a^2)*(x))+(2*a^2)
1896: @end example
1897:
1898: @table @t
1899: @item $B;2>H(B
1900: @ref{qt_normalize}
1901: @end table
1902:
1903: @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
1904: @comment --- openxm $B$N30It$+$i$N4sM?$b=R$Y$k(B. Credit.
1905: @noindent
1906: ChangeLog
1907: @itemize @bullet
1908: @item -----$B$^$@=q$$$F$J$$(B.
1909: @end itemize
1910:
1911:
1912: @node qt_set_ord,,, $B<B83E*;EMM$N4X?t(B
1913: @subsection @code{qt_set_ord}
1914: @findex qt_set_ord
1915:
1916: @comment --- $B4X?t$N4JC1$J@bL@(B ---
1917: @comment --- @itemx $B$OJ#?t$KBP$7$F@bL@$r0l$D$D$1$k>l9g$K;H$&(B ---
1918: @table @t
1919: @item qt_set_ord(@var{VarList})
1920: :: @var{VarList} $B$rJQ?t=g=x$H$9$k(B.
1921: @end table
1922:
1923: @table @var
1924: @item return
1925: $B%j%9%H(B
1926: @item VarList
1927: $B%j%9%H(B
1928: @end table
1929:
1930: @itemize @bullet
1931: @item @var{VarList} $B$r<-=q<0$KMQ$$$?JQ?t=g=x$r0J2<;HMQ$9$k(B.
1932: @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.
1933: @var{VarList} $B$K8=$l$J$$JQ?t$K$D$$$F$O$3$N=g=x$,E,MQ$5$l$k(B.
1934: @item qt_normalize $B$*$h$S$=$N5!G=$rMQ$$$k4X?t$,$3$N5!G=$N1F6A$r<u$1$k(B.
1935: @item qt_comp $B4X?t$,$3$N5!G=$N1F6A$r<u$1$k(B.
1936: @end itemize
1937:
1938: @example
1939: ctrl("print_quote",2);
1940: qt_normalize(quote(x+y),2);
1941: $B=PNO(B: (x)+(y)
1942: qt_set_ord([y,x]);
1943: $B=PNO(B: [y,x,z,u,v,w,p,q,r,s,t,a,b,c,d,e,f,g, $B0J2<>JN,(B ]
1944: qt_normalize(quote(x+y),2);
1945: $B=PNO(B: (y)+(x)
1946: @end example
1947:
1948: @table @t
1949: @item $B;2>H(B
1950: @ref{qt_normalize},
1951: @ref{nqt_comp}
1952: @end table
1953:
1954: @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
1955: @comment --- openxm $B$N30It$+$i$N4sM?$b=R$Y$k(B. Credit.
1956: @noindent
1957: ChangeLog
1958: @itemize @bullet
1959: @item -----$B$^$@=q$$$F$J$$(B.
1960: @end itemize
1961:
1962:
1963: @node qt_set_weight,,, $B<B83E*;EMM$N4X?t(B
1964: @subsection @code{qt_set_weight}
1965: @findex qt_set_weight
1966:
1967: @comment --- $B4X?t$N4JC1$J@bL@(B ---
1968: @comment --- @itemx $B$OJ#?t$KBP$7$F@bL@$r0l$D$D$1$k>l9g$K;H$&(B ---
1969: @table @t
1970: @item qt_set_weight(@var{WeightVector})
1971: :: $BJQ?t$K$D$$$F(B weight $B%Y%/%H%k$r@_Dj$9$k(B.
1972: @end table
1973:
1974: @table @var
1975: @item return
1976: $B%j%9%H(B
1977: @item WeightVector
1978: $B%j%9%H(B
1979: @end table
1980:
1981: fnode f $B$N(B weight w(f) $B$O<!$N<0$G7W;;$9$k(B.
1982: @example
1983: f $B$,MU$N>l9g$O86B'(B 0. qt_weight_vector $B$G(B weight $B$,M?$($i$l$F$$$kITDj85$K(B
1984: $B$D$$$F$O$=$NCM(B.
1985:
1986: f $B$,(Bnode$B$N>l9g$O<!$N5,B'$G:F5"E*$K$-$a$k(B.
1987: w(f+g) = max(w(f),w(g))
1988: w(f g) = w(f) + w(g)
1989: w(f^n) = n w(f)
1990: $B4X?t$K$D$$$F$O(B? -----$B$^$@=q$$$F$J$$(B.
1991: @end example
1992:
1993: @itemize @bullet
1994: @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.
1995: @var{WeightVector} $B$K8=$l$J$$JQ?t$K$D$$$F$N(B weight $B$O(B 0 $B$H$J$k(B.
1996: @item qt_normalize $B$*$h$S$=$N5!G=$rMQ$$$k4X?t$,$3$N5!G=$N1F6A$r<u$1$k(B.
1997: qt_normalize $B$G$NE83+$G$O(B, $B$3$N=g=x$rMQ$$$F9`$,%=!<%H$5$l$k(B.
1998: @item qt_comp $B$*$h$S$=$N5!G=$rMQ$$$k4X?t$,$3$N5!G=$N1F6A$r<u$1$k(B.
1999: @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.
2000: @end itemize
2001:
2002: @example
2003: ctrl("print_quote",2);
2004: qt_set_weight([[x,-1],[y,-1]]);
2005: $B7k2L(B: [[x,-1],[y,-1]]
2006: qt_normalize(quote( 1+(x+y)+(x+y)^2),1);
2007: $B7k2L(B: (1)+(y)+(x)+((y)^(2))+((y)*(x))+((x)^(2))+((x)*(y))
2008: @end example
2009:
2010: @table @t
2011: @item $B;2>H(B
2012: @ref{qt_normalize},
2013: @ref{qt_set_ord},
2014: @ref{qt_set_weight},
2015: @ref{dp_gr_main}
2016: @end table
2017:
2018: @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
2019: @comment --- openxm $B$N30It$+$i$N4sM?$b=R$Y$k(B. Credit.
2020: @noindent
2021: ChangeLog
2022: @itemize @bullet
2023: @item
2024: @end itemize
2025:
2026:
2027: @node nqt_comp,,, $B<B83E*;EMM$N4X?t(B
2028: @subsection @code{nqt_comp}
2029: @findex nqt_comp
2030:
2031: @comment --- $B4X?t$N4JC1$J@bL@(B ---
2032: @comment --- @itemx $B$OJ#?t$KBP$7$F@bL@$r0l$D$D$1$k>l9g$K;H$&(B ---
2033: @table @t
2034: @item nqt_cmp(@var{Expr1},@var{Exprt2})
2035: :: @var{Expr1} $B$H(B @var{Expr2} $B$N=g=x$rHf3S$9$k(B.
2036: @end table
2037:
2038: @table @var
2039: @item return
2040: $B@0?t(B
2041: @item Expr1, Expr2
2042: quote$B7?(B
2043: @end table
2044:
2045: @itemize @bullet
2046: @item @var{Expr1} $B$H(B @var{Expr2} $B$N=g=x$rHf3S$9$k(B.
2047: @item @var{Expr1} > @var{Exprt2} $B$J$i(B 1.
2048: @item @var{Expr1} < @var{Exprt2} $B$J$i(B -1.
2049: @item @var{Expr1} = @var{Exprt2} ($B$*$J$8=g=x(B) $B$J$i(B 0.
2050: @end itemize
2051:
2052: @example
2053: ctrl("print_quote",2);
2054: qt_set_ord([y,x]); qt_set_weight([[x,-1],[y,-1]]);
2055: [nqt_comp(`x,`y), nqt_comp(`y,`x), nqt_comp(`x,`x)];
2056: $B=PNO(B: [-1,1,0]
2057: @end example
2058:
2059: @table @t
2060: @item $B;2>H(B
2061: @ref{qt_normalize},
2062: @ref{qt_set_ord},
2063: @ref{qt_set_weight}
2064: @end table
2065:
2066: @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
2067: @comment --- openxm $B$N30It$+$i$N4sM?$b=R$Y$k(B. Credit.
2068: @noindent
2069: ChangeLog
2070: @itemize @bullet
2071: @item $B$^$@=q$$$F$J$$(B.
2072: @end itemize
2073: @comment ****************************************************************
2074:
2075: @node qt_is_var,,, $B<B83E*;EMM$N4X?t(B
2076: @subsection @code{qt_is_var}, @code{qt_is_coef}
2077: @findex qt_is_var
2078: @findex qt_is_coef
2079:
2080: @comment --- $B4X?t$N4JC1$J@bL@(B ---
2081: @comment --- @itemx $B$OJ#?t$KBP$7$F@bL@$r0l$D$D$1$k>l9g$K;H$&(B ---
2082: @table @t
2083: @item qt_is_var(@var{Expr})
2084: :: @var{Expr} $B$,ITDj85$KBP1~$9$k(B quote $B$J$i(B 1 $B$rLa$9(B.
2085: @item qt_is_coef(@var{Expr})
2086: :: @var{Expr} $B$,78?t$NM-M}4X?tBN$KB0$9$k$H$-(B 1 $B$rLa$9(B.
2087: @end table
2088:
2089: @table @var
2090: @item return
2091: $B@0?t(B
2092: @item Expr
2093: quote$B7?(B
2094: @end table
2095:
2096: @itemize @bullet
2097: @item @var{Expr} $B$,ITDj85$KBP1~$9$k(B quote $B$J$i(B 1 $B$rLa$9(B.
2098: $B$=$&$G$J$$$H$-(B 0 $B$rLa$9(B.
2099: @end itemize
2100:
2101: @example
2102: [qt_is_var(quote(x)), qt_is_var(quote(3/2))];
2103: $B=PNO(B: [1,0]
2104: @end example
2105:
2106: @table @t
2107: @item $B;2>H(B
2108: @ref{qt_rewrite},
2109: @ref{nqt_match_rewrite}
2110: @end table
2111:
2112: @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
2113: @comment --- openxm $B$N30It$+$i$N4sM?$b=R$Y$k(B. Credit.
2114: @noindent
2115: ChangeLog
2116: @itemize @bullet
2117: @item -----$B$^$@=q$$$F$J$$(B.
2118: @end itemize
2119: @comment ****************************************************************
2120:
2121: @node qt_rewrite,,, $B<B83E*;EMM$N4X?t(B
2122: @subsection @code{qt_rewrite}
2123: @findex qt_rewrite
2124:
2125: @comment --- $B4X?t$N4JC1$J@bL@(B ---
2126: @comment --- @itemx $B$OJ#?t$KBP$7$F@bL@$r0l$D$D$1$k>l9g$K;H$&(B ---
2127: @table @t
2128: @item qt_rewrite(@var{Expr},@var{Rules},@var{Mode})
2129: :: @var{Expr} $B$r5,B'=89g(B @var{Rules} $B$rMQ$$$F=q$-49$($k(B.
2130: @end table
2131:
2132: @table @var
2133: @item return
2134: quote$B7?(B
2135: @item Expr
2136: quote$B7?(B
2137: @item Rules
2138: $B%j%9%H(B
2139: @item Mode
2140: $B@0?t(B
2141: @end table
2142:
2143: @itemize @bullet
2144: @item $B%f!<%68@8l$rMQ$$$FDj5A$5$l$?4X?t(B.
2145: @code{import("noro_rewrite.rr")} $B$7$F$*$/$3$H(B.
2146: (noro_rewrite.rr $B$,(B OpenXM/lib/asir-contrib $B$KB8:_$7$J$$>l9g(B
2147: $B%=!<%9$N(B OpenXM/src/asir-contrib/testing/noro/new_rewrite.rr $B$r%3%T!<(B)
2148: @item @var{Expr} $B$r5,B'=89g(B @var{Rules} $B$rMQ$$$F=q$-49$($k(B.
2149: @item $B5,B'$NE,MQ$O(B fnode$BLZ$KBP$7$F:F5"E*$G$"$k(B.
2150: $B0lJ}(B @code{nqt_match_rewrite} $B$G$O%H%C%W%l%Y%k$N$_$K5,B'$,E,MQ$5$l$k(B.
2151: @item $B5,B'=89g(B @var{Rules} $B$N3FMWAG$N=q$-J}$O(B @code{nqt_match()} $B$N(B
2152: @var{Pattern} $B$HF1$8=q$-J}(B.
2153: $B$D$^$j(B [$B%Q%?!<%s(B, $B=q$-49$(7k2L(B] $B$^$?$O(B
2154: [$B%Q%?!<%s(B, $B>r7o(B, $B=q$-49$(7k2L(B].
2155: @item @var{Mode} $B$N0UL#$O(B @ref{qt_normalize} $B$N(B @var{Mode} $B$HF1MM(B.
2156: $B%Q%?!<%s%^%C%A(B, $B=q$-49$($O(B @var{Mode} $B$G(B @code{qt_normalize()}
2157: $B$5$l$F$+$i?k9T$5$l$k(B.
2158: @end itemize
2159:
2160: $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
2161: $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,
2162: $B=g=x$,Bg$-$/$J$k>l9g$N$_$K=q$-49$($k$Y$-$G$"$k(B.
2163: @example
2164: import("noro_rewrite.rr");
2165: R=[[`X*Y,`nqt_comp(Y*X,X*Y)>0, `Y*X]];
2166: qt_rewrite(`(x-y)^2,R,2);
2167: $B=PNO(B: quote(x*x+-2*x*y+y*y)
2168: @end example
2169:
2170: $B30@QBe?t$N7W;;(B (asir-contrib $B$r%m!<%I$7$?>uBV(B).
2171: @example
2172: import("noro_rewrite.rr");
2173: Rext0=[quote(X*Y),quote(qt_is_var(X) && qt_is_var(Y) && nqt_comp(Y,X)>0),
2174: quote(-Y*X)];
2175: Rext1=[quote(X^N),quote(eval_quote(N)>=2),quote(0)];
2176: Rext2=[quote(X*X),quote(0)];
2177: Rext=[Rext0,Rext1,Rext2];
2178: qt_rewrite(quote( (x+2*y)*(x+4*y) ), Rext,1);
2179: $B=PNO(B: 2*x*y
2180:
2181: qt_set_coef([a,b,c,d]);
2182: qt_rewrite(quote((a*x+b*y)*(c*x+d*y)), Rext,1);
2183: $B=PNO(B: (d*a-c*b)*x*y
2184:
2185: @end example
2186:
2187: $BHyJ,$N7W;;(B (asir-contrib $B$r%m!<%I$7$?>uBV(B).
2188: @example
2189: import("noro_rewrite.rr");
2190: qt_set_coef([a,b]);
2191: Rd1=[`d(X+Y), `d(X)+d(Y)];
2192: Rd2=[`d(X*Y),`d(X)*Y+X*d(Y)];
2193: Rd3=[`d(N), `qt_is_coef(N), `0];
2194: Rd4=[`d(x),`1];
2195: Rd=[Rd1,Rd2,Rd3,Rd4];
2196: B=qt_rewrite( `d( (a*x+b)^3),Rd,2);
2197: $B=PNO(B: quote(3*a^3*x*x+6*b*a^2*x+3*b^2*a)
2198: fctr(eval_quote(B));
2199: $B=PNO(B: [[3,1],[a,1],[a*x+b,2]]
2200: @end example
2201:
2202: @table @t
2203: @item $B;2>H(B
2204: @ref{nqt_match},
2205: @ref{nqt_match_rewrite},
2206: @ref{qt_normalize}
2207: @end table
2208:
2209: @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
2210: @comment --- openxm $B$N30It$+$i$N4sM?$b=R$Y$k(B. Credit.
2211: @noindent
2212: ChangeLog
2213: @itemize @bullet
2214: @item qt $B7O$N4X?t$N867?$O(B OpenXM/src/asir-contrib/testing/tr.rr $B$G$"$k(B.
2215: $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
2216: qt $B7O$N4X?t$,3+H/$5$l$?(B.
2217: @item qt $B7O$N4X?t$K$D$$$F$N$=$NB>$N;29MJ88%(B:
2218: OpenXM/doc/Papers/2005-rims-noro.tex $B$*$h$S(B
2219: OpenXM/doc/Papers/2005-rims-noro.tm (TeXmacs$B$N5-;v(B).
2220: @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.
2221: @end itemize
2222: @comment ****************************************************************
1.13 takayama 2223:
1.24 takayama 2224:
2225: @comment ****************************************************************
2226: @node asirgui.hnd,,, $B<B83E*;EMM$N4X?t(B
2227: @subsection @code{asirgui.hnd}
2228: @findex asirgui.hnd
2229:
2230: @comment --- $B4X?t$N4JC1$J@bL@(B ---
2231: @comment --- @itemx $B$OJ#?t$KBP$7$F@bL@$r0l$D$D$1$k>l9g$K;H$&(B ---
2232: @table @t
2233: @item asirguid.hnd
2234: :: asirgui $B$N(B main window $B$N%O%s%I%kHV9f$rJ];}$9$k%U%!%$%k(B
2235: @end table
2236:
2237:
2238: @itemize @bullet
2239: @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.
2240: @item $BCf?H$O#1#0?J@0?t$G(B, asirgui $B$N(B main winodw $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.
2241: @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.
2242: @end itemize
2243:
2244: @example
2245: // Visual C++ $BMQ$N%F%9%H%W%m%0%i%`(B. $BI8=`F~NO$r(B asirgui $B$XAw$j9~$`(B.
2246: // test.cpp : $B%3%s%=!<%k(B $B%"%W%j%1!<%7%g%sMQ$N%(%s%H%j(B $B%]%$%s%H$NDj5A(B
2247: //
2248:
2249: #include "stdafx.h"
2250: #include "test.h"
2251: #include <windows.h>
2252: #include <stdlib.h>
2253: #include <stdio.h>
2254: #include <fcntl.h>
2255: #include <process.h>
2256:
2257: #ifdef _DEBUG
2258: #define new DEBUG_NEW
2259: #undef THIS_FILE
2260: static char THIS_FILE[] = __FILE__;
2261: #endif
2262:
2263: /////////////////////////////////////////////////////////////////////////////
2264: // $BM#0l$N%"%W%j%1!<%7%g%s(B $B%*%V%8%'%/%H(B
2265:
2266: CWinApp theApp;
2267:
2268: using namespace std;
2269:
2270: int _tmain(int argc, TCHAR* argv[], TCHAR* envp[])
2271: {
2272: int nRetCode = 0;
2273:
2274: // MFC $B$N=i4|2=$*$h$S=i4|2=<:GT;~$N%(%i!<$N=PNO(B
2275: if (!AfxWinInit(::GetModuleHandle(NULL), NULL, ::GetCommandLine(), 0))
2276: {
2277: // TODO: $BI,MW$K1~$8$F%(%i!<(B $B%3!<%I$rJQ99$7$F$/$@$5$$!#(B
2278: cerr << _T("Fatal Error: MFC initialization failed") << endl;
2279: nRetCode = 1;
2280: }
2281: else
2282: {
2283: // TODO: $B$3$N0LCV$K%"%W%j%1!<%7%g%s$NF0:n$r5-=R$7$F$/$@$5$$!#(B
2284: CString strHello;
2285: strHello.LoadString(IDS_HELLO);
2286: cout << (LPCTSTR)strHello << endl;
2287: }
2288: HWND hnd;
2289: FILE *fp = fopen("c:/Program Files/asir/bin/asirgui.hnd","r");
2290: fscanf(fp,"%d",&hnd);
2291: fclose(fp);
2292: while (1) {
2293: int c;
2294: c = getchar();
2295: if ( c == '#' ) break;
2296: PostMessage(hnd,WM_CHAR,c,1);
2297: }
2298: return nRetCode;
2299: }
2300: @end example
2301:
2302: @table @t
2303: @item $B;2>H(B
2304: @ref{xyz_abc}
2305: @end table
2306:
2307: @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
2308: @comment --- openxm $B$N30It$+$i$N4sM?$b=R$Y$k(B. Credit.
2309: @noindent
2310: ChangeLog
2311: @itemize @bullet
2312: @item $B$3$N5!G=$O(B 2006-12-5, 2007-02-13 $B$K2C$($i$l$?(B.
2313: @item @code{OpenXM_contrib2/windows/asir32gui/asir32gui.clw} 1.11
2314: @item @code{OpenXM_contrib2/windows/asir32gui/asir32guiview.cpp} 1.15, 1.1.6
2315: @end itemize
2316: @comment ****************************************************************
2317:
1.25 takayama 2318: @node noro_matrix.rr,,, $B<B83E*;EMM$N4X?t(B
2319: @subsection @code{noro_matrix.rr}
2320: @findex noro_matrix.rr
2321:
2322: @comment --- $B4X?t$N4JC1$J@bL@(B ---
2323: @comment --- @itemx $B$OJ#?t$KBP$7$F@bL@$r0l$D$D$1$k>l9g$K;H$&(B ---
2324: @table @t
2325: @item linalg.unit_mat(@var{arg1})
2326: @item linalg.random_rmat(@var{arg1}, @var{arg2}, @var{arg3})
2327: @item linalg.minipoly_mat(@var{arg1})
2328: @item linalg.compute_kernel(@var{arg1})
2329: @item linalg.compute_image(@var{arg1})
2330: @item linalg.jordan_canonical_form(@var{arg1})
2331: @end table
2332:
2333:
2334: @itemize @bullet
2335: @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.
2336: @end itemize
2337:
2338: @example
2339: load("noro_matrix.rr");
2340: A=newmat(4,4,[[2,0,0,0],[3,5,1,0],[-9,-9,-1,0],[-5,0,0,1]]);
2341: B=linalg.jordan_canonical_form(A);
2342: @end example
2343:
2344: @table @t
2345: @item $B;2>H(B
2346: @ref{invmat}
2347: @end table
2348:
2349: @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
2350: @comment --- openxm $B$N30It$+$i$N4sM?$b=R$Y$k(B. Credit.
2351: @noindent
2352: ChangeLog
2353: @itemize @bullet
2354: @item $B$3$N4X?t$O(B 2004-04 $B:"$+$i@~7ABe?t(BIII $B$N9V5A$r$7$J$,$i=q$+$l$?(B.
2355: @item $B%=!<%9(B: OpenXM/src/asir-contrib/packages/src/noro_matrix.rr
2356: @end itemize
2357:
2358:
1.26 takayama 2359: @node f_res,,, $B<B83E*;EMM$N4X?t(B
2360: @subsection @code{f_res}
2361: @findex f_res
1.25 takayama 2362:
2363: @comment --- $B4X?t$N4JC1$J@bL@(B ---
2364: @table @t
1.26 takayama 2365: @item f_res
1.25 takayama 2366: @end table
2367:
2368:
2369: @itemize @bullet
1.26 takayama 2370: @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 2371: @end itemize
2372:
2373: @table @t
2374: @item $B;2>H(B
2375: @ref{}
2376: @end table
2377:
2378: @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
2379: @comment --- openxm $B$N30It$+$i$N4sM?$b=R$Y$k(B. Credit.
2380: @noindent
2381: ChangeLog
2382: @itemize @bullet
2383: @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 2384: @item OpenXM/src/ox_cdd, OpenXM/src/asir-contrib/packages/src/f_res.rr
1.25 takayama 2385: @end itemize
2386:
2387:
1.27 ohara 2388: @node chdir,,, $B<B83E*;EMM$N4X?t(B
2389: @subsection @code{chdir}, @code{pwd}
2390: @findex chdir
2391: @findex pwd
2392:
2393: @comment --- $B%G%#%l%/%H%jA`:n(B ---
2394: @table @t
2395: @item chdir(@var{directory})
2396: @item pwd()
2397: :: $B%7%'%k%3%^%s%I(B cd $B$H(B pwd $B$KBP1~$9$kA`:n(B.
2398: @end table
2399:
2400: @table @var
2401: @item return
2402: $BJ8;zNs(B(@code{pwd}), $B@0?t(B(@code{chdir})
2403: @item dirctory
2404: $BJ8;zNs(B
2405: @end table
2406:
2407: @itemize @bullet
2408: @item
2409: @code{pwd} $B$O%+%l%s%H%G%#%l%/%H%j$rJ8;zNs$GJV$9(B.
2410: @item
2411: @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.
2412: @item
2413: $B$3$l$i$N4X?t$O(B UNIX $BHG$K$N$_<BAu$5$l$F$$$k(B.
2414: @end itemize
2415:
2416: @example
2417: [0] S=pwd();
2418: /home/ohara
2419: [1] chdir(".../taka");
2420: -1
2421: [2] chdir("/usr/bin");
2422: 0
2423: @end example
2424:
2425: @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
2426: @comment --- openxm $B$N30It$+$i$N4sM?$b=R$Y$k(B. Credit.
2427: @noindent
2428: ChangeLog
2429: @itemize @bullet
2430: @item
2431: $B$3$l$i$N4X?t$O(B 2008-8-27 $B$K%3%_%C%H$5$l$?(B.
2432: $BJQ99$r$&$1$?%=!<%9%3!<%I$O(B builtin/miscf.c (1.27) $B$G$"$k(B.
2433: @end itemize
2434:
2435:
2436: @node dcurrenttime,,, $B<B83E*;EMM$N4X?t(B
2437: @subsection @code{dcurrenttime}
2438: @findex dcurrenttime
2439:
2440: @comment --- $B8=:_;~9o$r<hF@(B ---
2441: @table @t
2442: @item dcurrenttime()
2443: :: $B8=:_;~9o$r<hF@(B.
2444: @end table
2445:
2446: @table @var
2447: @item return
2448: $BIbF0>.?tE@?t(B
2449: @end table
2450:
2451: @itemize @bullet
2452: @item
2453: $BJV$jCM$O(B1970$BG/(B1$B7n(B1$BF|(B0$B;~(B0$BJ,(B0$BIC$+$i$N7P2aIC?t$G$"$k(B.
2454: @end itemize
2455:
2456: @example
2457: [0] ctrl("real_digit", 16);
2458: 16
2459: [1] dcurrenttime();
2460: 1226390851.34476
2461: [2] currenttime();
2462: 1226390854
2463: @end example
2464:
2465: @table @t
2466: @item $B;2>H(B
2467: @ref{currenttime}
2468: @end table
2469:
2470: @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
2471: @comment --- openxm $B$N30It$+$i$N4sM?$b=R$Y$k(B. Credit.
2472: @noindent
2473: ChangeLog
2474: @itemize @bullet
2475: @item
2476: $B$3$N4X?t$O(B 2008-9-12 $B$K%3%_%C%H$5$l$?(B.
2477: $BJQ99$r$&$1$?%=!<%9%3!<%I$O(B builtin/time.c (1.6) $B$G$"$k(B.
2478: @end itemize
2479:
1.29 nakayama 2480: @node nk_restriction.restriction,,, $B<B83E*;EMM$N4X?t(B
2481: @subsection @code{nk_restriction.restriction}
2482: @comment --- $B:w0zMQ%-!<%o!<%I(B
2483: @findex nk_restriction.restriction
2484:
2485: @comment --- $B4X?t$N4JC1$J@bL@(B ---
2486: @table @t
2487: @item nk_restriction.restriction(@var{Id}, @var{VL}, @var{DVL}, @var{W})
2488: :: $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
2489: @end table
2490:
2491: @comment --- $B0z?t$N4JC1$J@bL@(B ---
2492: @table @var
2493: @item Id
2494: $B%$%G%"%k$N@8@.85$N%j%9%H(B
2495: @item VL
2496: $BJQ?t$N%j%9%H(B
2497: @item DVL
2498: $BJQ?t$N%j%9%H(B(@var{VL} $B$KBP1~$9$kHyJ,:nMQAG$NJ}$NJQ?t(B)
2499: @item W
2500: $B=E$_%Y%/%H%k$rI=$9%j%9%H(B
2501: @end table
2502:
2503: @itemize @bullet
2504: @item
2505: @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
2506: ($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)
2507: @item
2508: $B@5$N=E$_$r;}$DJQ?t$K$D$$$F$N@)8B$r9T$&!#(B
2509: $BNc$($P!"(B@var{VL} @code{=[x,y,z]}, @var{W} @code{=[1,1,0]} $B$G$"$l$P(B
2510: x,y $B$K$D$$$F@)8B$r9T$&!#(B
2511: @end itemize
2512:
2513: $B0J2<$O!"%$%G%"%k(B
2514: @tex
2515: $I = D \cdot \{x \partial_x -1, y \partial_y - 1\} $
2516: @end tex
2517: $B$N(B
2518: @tex $x$ @end tex
2519: $B$K$D$$$F$N@)8B2C72$r7W;;$7$?Nc$G$"$k!#(B
2520: @example
2521: [1432] nk_restriction.restriction([x*dx-1,y*dy-1],[x,y],[dx,dy],[1,0]);
2522: -- generic_bfct_and_gr :0.001sec(0.001629sec)
2523: generic bfct : [[1,1],[s-1,1]]
2524: S0 : 1
2525: B_{S0} length : 2
2526: -- fctr(BF) + base :0.000999sec(0.0005109sec)
2527: [[y*dy-1,(y*dy-1)*dx,-1],[[1],[0]]]
2528: [1433]
2529: @end example
2530:
2531: @node nk_restriction.restriction_ideal,,, D $B2C72$N@)8B$K4X$9$k4X?t(B
2532: @subsection @code{nk_restriction.restriction_ideal}
2533: @comment --- $B:w0zMQ%-!<%o!<%I(B
2534: @findex nk_restriction.restriction_ideal
2535:
2536: @comment --- $B4X?t$N4JC1$J@bL@(B ---
2537: @table @t
2538: @item nk_restriction.restriction_ideal(@var{Id}, @var{VL}, @var{DVL}, @var{W})
2539: :: $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
2540: @end table
2541:
2542: @comment --- $B0z?t$N4JC1$J@bL@(B ---
2543: @table @var
2544: @item Id
2545: $B%$%G%"%k$N@8@.85$N%j%9%H(B
2546: @item VL
2547: $BJQ?t$N%j%9%H(B
2548: @item DVL
2549: $BJQ?t$N%j%9%H(B(@var{VL} $B$KBP1~$9$kHyJ,:nMQAG$NJ}$NJQ?t(B)
2550: @item W
2551: $B=E$_%Y%/%H%k$rI=$9%j%9%H(B
2552: @end table
2553:
2554: @itemize @bullet
2555: @item
2556: @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
2557: ($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)
2558: @item
2559: $B@5$N=E$_$r;}$DJQ?t$K$D$$$F$N@)8B$r9T$&!#(B
2560: $BNc$($P!"(B@var{VL} @code{=[x,y,z]}, @var{W} @code{=[1,1,0]} $B$G$"$l$P(B
2561: x,y $B$K$D$$$F@)8B$r9T$&!#(B
2562: @end itemize
2563:
2564: $B0J2<$O!"%$%G%"%k(B
2565: @tex
2566: $I = D \cdot \{x \partial_x -1, y \partial_y - 1\} $
2567: @end tex
2568: $B$N(B
2569: @tex $x$ @end tex
2570: $B$K$D$$$F$N@)8B%$%G%"%k$r7W;;$7$?Nc$G$"$k!#(B
2571: @example
2572: [1346] nk_restriction.restriction_ideal([x*dx-1,y*dy-1],[x,y],[dx,dy],[1,0]);
2573: -- generic_bfct_and_gr :0.002sec(0.001652sec)
2574: generic bfct : [[1,1],[s-1,1]]
2575: S0 : 1
2576: B_{S0} length : 2
2577: -- fctr(BF) + base :0sec(0.000566sec)
2578: -- restriction_ideal_internal :0.001sec(0.0007441sec)
2579: [-1]
2580: [1347]
2581: @end example
2582:
2583: @node nk_restriction.integration,,, $B<B83E*;EMM$N4X?t(B
2584: @subsection @code{nk_restriction.integration}
2585: @comment --- $B:w0zMQ%-!<%o!<%I(B
2586: @findex nk_restriction.integration
2587:
2588: @comment --- $B4X?t$N4JC1$J@bL@(B ---
2589: @table @t
2590: @item nk_restriction.integration(@var{Id}, @var{VL}, @var{DVL}, @var{W})
2591: :: $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
2592: @end table
2593:
2594: @comment --- $B0z?t$N4JC1$J@bL@(B ---
2595: @table @var
2596: @item Id
2597: $B%$%G%"%k$N@8@.85$N%j%9%H(B
2598: @item VL
2599: $BJQ?t$N%j%9%H(B
2600: @item DVL
2601: $BJQ?t$N%j%9%H(B(@var{VL} $B$KBP1~$9$kHyJ,:nMQAG$NJ}$NJQ?t(B)
2602: @item W
2603: $B=E$_%Y%/%H%k$rI=$9%j%9%H(B
2604: @end table
2605:
2606: @comment --- $B$3$3$G4X?t$N>\$7$$@bL@(B ---
2607: @comment --- @itemize$B!A(B@end itemize $B$O2U>r=q$-(B ---
2608: @comment --- @bullet $B$O9uE@IU$-(B ---
2609: @itemize @bullet
2610: @item
2611: @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
2612: ($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)
2613: @item
2614: $B@5$N=E$_$r;}$DJQ?t$K$D$$$F$N@QJ,$r9T$&!#(B
2615: $BNc$($P!"(B@var{VL} @code{=[x,y,z]}, @var{W} @code{=[1,1,0]} $B$G$"$l$P(B
2616: x,y $B$K$D$$$F@QJ,$r9T$&!#(B
2617: @end itemize
2618:
2619: $B0J2<$O!"%$%G%"%k(B
2620: @tex
2621: $I = D \cdot \{2 t \partial_x + \partial_t, t \partial_t + 2 x \partial_x + 2\} $
2622: @end tex
2623: $B$N(B
2624: @tex $t$ @end tex
2625: $B$K$D$$$F$N@QJ,%$%G%"%k$r7W;;$7$?Nc$G$"$k!#(B([SST, Ex5.5.2, Ex5.5.6])
2626: @example
2627: [1351] nk_restriction.integration([2*t*dx+dt,2*x*dx+t*dt+2],[t,x],
2628: [dt,dx],[1,0]);
2629: -- generic_bfct_and_gr :0.001sec(0.001796sec)
2630: generic bfct : [[1,1],[s,1],[s-1,1]]
2631: S0 : 1
2632: B_{S0} length : 2
2633: -- fctr(BF) + base :0.001sec(0.0006731sec)
2634: [[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]]]
2635: @end example
2636:
2637: @node nk_restriction.integration_ideal,,, $B<B83E*;EMM$N4X?t(B
2638: @subsection @code{nk_restriction.integration_ideal}
2639: @comment --- $B:w0zMQ%-!<%o!<%I(B
2640: @findex nk_restriction.integration_ideal
2641:
2642: @comment --- $B4X?t$N4JC1$J@bL@(B ---
2643: @table @t
2644: @item nk_restriction.integration_ideal(@var{Id}, @var{VL}, @var{DVL}, @var{W})
2645: :: $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
2646: @end table
2647:
2648: @comment --- $B0z?t$N4JC1$J@bL@(B ---
2649: @table @var
2650: @item Id
2651: $B%$%G%"%k$N@8@.85$N%j%9%H(B
2652: @item VL
2653: $BJQ?t$N%j%9%H(B
2654: @item DVL
2655: $BJQ?t$N%j%9%H(B(@var{VL} $B$KBP1~$9$kHyJ,:nMQAG$NJ}$NJQ?t(B)
2656: @item W
2657: $B=E$_%Y%/%H%k$rI=$9%j%9%H(B
2658: @end table
2659:
2660: @comment --- $B$3$3$G4X?t$N>\$7$$@bL@(B ---
2661: @comment --- @itemize$B!A(B@end itemize $B$O2U>r=q$-(B ---
2662: @comment --- @bullet $B$O9uE@IU$-(B ---
2663: @itemize @bullet
2664: @item
2665: @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
2666: ($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)
2667: @item
2668: $B@5$N=E$_$r;}$DJQ?t$K$D$$$F$N@QJ,$r9T$&!#(B
2669: $BNc$($P!"(B@var{VL} @code{=[x,y,z]}, @var{W} @code{=[1,1,0]} $B$G$"$l$P(B
2670: x,y $B$K$D$$$F@QJ,$r9T$&!#(B
2671: @end itemize
2672:
2673: $B0J2<$O!"%$%G%"%k(B
2674: @tex
2675: $I = D \cdot \{2 t \partial_x + \partial_t, t \partial_t + 2 x \partial_x + 2\} $
2676: @end tex
2677: $B$N(B
1.32 ! noro 2678: @tex $t$
! 2679: @end tex
1.29 nakayama 2680: $B$K$D$$$F$N@QJ,%$%G%"%k$r7W;;$7$?Nc$G$"$k!#(B([SST, Ex5.5.2, Ex5.5.6])
2681: @example
2682: [1431] nk_restriction.integration_ideal([2*t*dx+dt,t*dt+2*x*dx+2],[t,x],
2683: [dt,dx],[1,0]);
2684: -- generic_bfct_and_gr :0.002999sec(0.002623sec)
2685: generic bfct : [[1,1],[s,1],[s-1,1]]
2686: S0 : 1
2687: B_{S0} length : 2
2688: -- fctr(BF) + base :0.001sec(0.001091sec)
2689: -- integration_ideal_internal :0.002sec(0.001879sec)
2690: [2*x*dx+1]
2691: [1432]
2692: @end example
2693:
1.30 takayama 2694: @noindent
2695: ChangeLog
2696: @itemize @bullet
2697: @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.
2698: @end itemize
2699:
1.31 noro 2700: @node nd_gr nd_gr_trace nd_weyl_gr nd_weyl_gr_trace (module),,, $B<B83E*;EMM$N4X?t(B
2701: @subsection @code{nd_gr}, @code{nd_gr_trace} ($B2C72(B)
2702: @findex nd_gr (module)
2703: @findex nd_gr_trace (module)
2704: @findex nd_weyl_gr (module)
2705: @findex nd_weyl_gr_trace (module)
1.29 nakayama 2706:
1.31 noro 2707: @comment --- nd_gr, nd_gr_trace $B$K$*$1$k2C72$N%0%l%V%J!<4pDl7W;;(B ---
2708: @table @t
2709: @item nd_gr(@var{gen},@var{vars},@var{char},@var{ord})
2710: @itemx nd_gr_trace(@var{gen},@var{vars},@var{homo},@var{char},@var{ord})
2711: @item nd_weyl_gr(@var{gen},@var{vars},@var{char},@var{ord})
2712: @itemx nd_weyl_gr_trace(@var{gen},@var{vars},@var{homo},@var{char},@var{ord})
2713: :: $BItJ,2C72$N%0%l%V%J!<4pDl$N7W;;(B
2714: @end table
2715:
2716: @table @var
2717: @item gen
2718: $B%j%9%H$N%j%9%H(B
2719: @item ord
2720: @var{[IsPOT,Ord]} $B$J$k%j%9%H(B
2721: @item return
2722: $B%j%9%H$N%j%9%H(B
2723: @end table
2724:
2725: @itemize @bullet
2726: @item $BB?9`<04D$"$k$$$O%o%$%kBe?t>e$N<+M32C72$NItJ,2C72$N%0%l%V%J!<4pDl(B
2727: $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
2728: $B85$G$"$k%Y%/%H%k$H$_$J$9(B.
2729: @item @var{ord} $B$H$7$F(B @var{[IsPOT,Ord]} $B$H$$$&(B2$BMWAG%j%9%H$,;XDj$5$l$?(B
2730: $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
2731: $B$N%j%9%H$N%j%9%H$H$7$FM?$($kI,MW$,$"$k(B.
2732: @item @var{IsPOT} $B$,(B 1 $B$N>l9g(B, POT (position over term), 0 $B$N(B
2733: $B>l9g(B TOP (term over position) $B$GHf3S$9$k(B. $B4pAC4D$G$N9`Hf3S$O(B @var{Ord}
2734: $B$G9T$&(B.
2735: @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.
2736: @end itemize
2737:
2738: @example
2739: [0] Gen=[[x,y,z],[y^2+x,x^2,z],[y^2,z^3+x,x+z]];
2740: [[x,y,z],[x+y^2,x^2,z],[y^2,x+z^3,x+z]]
2741: [1] nd_gr(Gen,[x,y,z],0,[0,0]);
2742: [[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,
2743: -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
2744: +(-y^3+z*y^2-z*y)*x+z^4*y^2]]
2745: @end example
2746:
2747: @table @t
2748: @item $B;2>H(B
2749: @ref{nd_gr}, @ref{nd_gr_trace}
2750: @end table
2751:
2752: @node nd_gr nd_gr_trace nd_weyl_gr nd_weyl_gr_trace (option),,, $B<B83E*;EMM$N4X?t(B
2753: @subsection @code{nd_gr}, @code{nd_gr_trace} (option)
2754: @findex nd_gr (option)
2755: @findex nd_gr_trace (option)
2756: @findex nd_weyl_gr (option)
2757: @findex nd_weyl_gr_trace (option)
2758:
2759: @comment --- nd_gr, nd_gr_trace $B$N%*%W%7%g%s(B ---
2760:
2761: @table @t
2762: @item nd_gr(@var{...}[|@var{opt},@var{opt},@dots{}])
2763: @itemx nd_gr_trace(@var{...}[|@var{opt},@var{opt},@dots{}])
2764: @itemx nd_weyl_gr(@var{...}[|@var{opt},@var{opt},@dots{}])
2765: @itemx nd_weyl_gr_trace(@var{...}[|@var{opt},@var{opt},@dots{}])
2766: :: $B%0%l%V%J!<4pDl7W;;$K4X$9$k<o!9$N%*%W%7%g%s$N@bL@(B
2767: @end table
2768:
2769: @table @var
2770: @item opt
2771: @var{key=value} $B$J$k%*%W%7%g%s@_Dj(B
2772: @item return
2773: $B%*%W%7%g%s$K$h$j0[$J$k(B
2774: @end table
2775:
2776: @itemize @bullet
2777: @item $B%0%l%V%J!<4pDl7W;;$r%*%W%7%g%s$K$h$j@)8f$9$k(B.
2778: @item $B8=>u$G$O<!$N(B 3 $B$D$N%*%W%7%g%s$r<u$1IU$1$k(B.
2779:
2780: @table @var
2781: @item gentrace
2782: @var{value} $B$,(B 0 $B$G$J$$$H$-(B, $B%0%l%V%J!<4pDl$N7W;;7P2a>pJs$r=PNO$9$k(B.
2783: @item gentsyz
2784: @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.
2785: @item nora
2786: @var{value} $B$,(B 0 $B$G$J$$$H$-(B, $B:G=*%9%F%C%W$GAj8_4JLs$r9T$o$J$$(B.
2787: @end table
2788:
2789: @item @var{gentrace} $B$,;XDj$5$l$?>l9g(B, $B=PNO$O(B,
2790: @var{[GB,Homo,Trace,IntRed,Ind,InputRed,SpairTrace]} $B$J$k%j%9%H$G$"$k(B. $B3FMWAG$N0UL#$O(B
2791: $B<!$NDL$j$G$"$k(B.
2792: @table @var
2793: @item GB
2794: $B%0%l%V%J!<4pDl(B
2795: @item Homo
2796: $BCf4V4pDl$,@F<!2=$5$l$F$$$k>l9g(B 1, $B$=$&$G$J$$>l9g(B 0.
2797: @item Trace
2798: $BA4Cf4V4pDl$KBP$9$k7W;;7P2a>pJs(B
2799: @item IntRed
2800: $BAj8_4JLs$KBP$9$k7W;;7P2a>pJs(B
2801: @item Ind
2802: $B4JLs%0%l%V%J!<4pDl$N3FMWAG$N(B, $BA4Cf4V4pDl$N$K$*$1$k%$%s%G%C%/%9(B
2803: @item InputRed
2804: $B3FF~NOB?9`<0$r%0%l%V%J!<4pDl$G4JLs$7$F>jM>(B 0 $B$rF@$k$^$G$N7W;;7P2a>pJs(B
2805: (@var{gensyz} $B$,;XDj$5$l$?>l9g(B)
2806: @item SpairTrace
2807: $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
2808: (syzygy $B2C72$N@8@.7O$NMWAG$N$_(B; @var{gensyz} $B$,;XDj$5$l$?>l9g(B)
2809: @end table
2810: @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
2811: $B4X?t$N9`$G@bL@$9$kM=Dj(B.
2812: @end itemize
2813:
2814: @example
2815: [0] C=[c3*c2*c1*c0-1,((c2+c3)*c1+c3*c2)*c0+c3*c2*c1,...]
2816: [1] D=nd_gr_trace(C,[c0,c1,c2,c3,c4],0,1,0|gentrace=1,gensyz=1)$
2817: [2] D[0];
2818: [c0+c1+c2+c3,-c1^2-2*c3*c1-c3^2,...]
2819: [3] D[2];
2820: [[[0,0,1],[1,1,1],[2,2,1],[3,3,1]],[4,[[1,2,(1)*<<0,0,0,0>>,1],...]
2821: [4] D[6];
2822: [[-1,[[1,0,(1)*<<0,0,2,4>>,1],[1,6,(-1)*<<1,0,0,0>>,1],...]
2823: @end example
2824:
2825: @table @t
2826: @item $B;2>H(B
2827: @ref{nd_gr}, @ref{nd_gr_trace}
2828: @end table
1.29 nakayama 2829:
1.23 takayama 2830: @comment ----------- $B0J2<$O8+K\(B. $B>C$9$J(B.
1.19 takayama 2831: @comment ****************************************************************
1.8 takayama 2832: @comment --- $B"~"~"~"~(B $B0J2<B>$N4X?t$K$D$$$F??;w$7$F5-=R$9$k(B. $B"~"~"~"~(B
1.3 takayama 2833: @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.4 takayama 2834: @comment --- $B"~"~"~"~(B $B4X?t(B syz_pqr, xyz_stu $B$N@bL@(B $B"~"~"~"~(B
2835: @comment --- $BJ#?t$N4X?t$r$^$H$a$F@bL@$9$kNc(B ---
2836: @node xyz_pqr,,, $B<B83E*;EMM$N4X?t(B
2837: @subsection @code{xyz_pqr}, @code{syz_stu}
2838: @findex xyz_pqr
2839: @findex xyz_stu
2840:
1.3 takayama 2841: @comment --- $B4X?t$N4JC1$J@bL@(B ---
2842: @comment --- @itemx $B$OJ#?t$KBP$7$F@bL@$r0l$D$D$1$k>l9g$K;H$&(B ---
2843: @table @t
1.1 takayama 2844: @item xyz_pqr(@var{arg1},@var{arg2}[,@var{flag}])
2845: @itemx xyz_stu(@var{arg1},@var{arg2})
2846: :: xyz $B$K4X$9$kA`:n(B.
2847: @end table
2848:
2849: @table @var
2850: @item return
2851: $B@0?t(B
2852: @item arg1, arg2
2853: $B@0?t(B
2854: @item flag
2855: 0 $B$^$?$O(B 1
2856: @end table
2857:
2858: @itemize @bullet
1.3 takayama 2859: @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 2860: @item
2861: @code{xyz_pqr()} $B$O(B, @var{arg1}, @var{arg2} $B$r(B pqr $B$9$k(B.
2862: @item
2863: @var{flag} $B$,(B 0 $B$G$J$$$H$-(B, $B%b%8%e%i7W;;$r9T$&(B.
2864: @item
2865: @code{xyz_stu()} $B$O(B stu $B%"%k%4%j%:%`$rMQ$$$k(B.
2866: @end itemize
2867:
2868: @example
2869: [219] xyz_pqr(1,2);
2870: 3
2871: [220] xyz_pqr(1,2,1);
2872: 3
2873: 0
2874: [221] xyz_stu(1,2);
2875: 3
2876: @end example
2877:
2878: @table @t
2879: @item $B;2>H(B
2880: @ref{xyz_abc}
2881: @end table
2882:
1.3 takayama 2883: @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
2884: @comment --- openxm $B$N30It$+$i$N4sM?$b=R$Y$k(B. Credit.
1.1 takayama 2885: @noindent
2886: ChangeLog
2887: @itemize @bullet
2888: @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
2889: http://www.afo.org/xyz.pdf ) $B$rMQ$$$F=q$-D>$5$l$?(B.
2890: $BJQ99$r$&$1$?%=!<%9%3!<%I$O(B xxxyy.rr, ppp.c $B$G$"$k(B.
2891: @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.
2892: @end itemize
2893:
2894: @comment --- $B$*$^$8$J$$(B ---
2895: @node Index,,, Top
2896: @unnumbered Index
2897: @printindex fn
2898: @printindex cp
2899: @iftex
2900: @vfill @eject
2901: @end iftex
2902: @summarycontents
2903: @contents
2904: @bye
2905: @comment --- $B$*$^$8$J$$=*$j(B ---
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>