version 1.5, 2005/04/06 09:26:28 |
version 1.7, 2005/04/21 10:54:50 |
|
|
/*&generate-prologue |
|
*/ |
|
$Id$ |
$Id$ |
$OpenXM: OpenXM/src/asir-contrib/testing/tr-ja.oxt,v 1.4 2005/04/03 11:05:21 takayama Exp $ |
$OpenXM: OpenXM/src/asir-contrib/testing/tr-ja.oxt,v 1.6 2005/04/15 12:47:14 takayama Exp $ |
|
|
$BCm0U(B: testing/tr.rr $B$G$O(B quote $B$r(B quotetolist $B$G(B list $B$KJQ49$7$F07$&$?$a(B, |
$BCm0U(B: testing/tr.rr $B$G$O(B quote $B$r(B quotetolist $B$G(B list $B$KJQ49$7$F07$&$?$a(B, |
$B2<$N;EMM$H$O$3$H$J$j(B, list $B7?$G%G!<%?$rLa$9>l9g$bB?$$(B. |
$B2<$N;EMM$H$O$3$H$J$j(B, list $B7?$G%G!<%?$rLa$9>l9g$bB?$$(B. |
Line 71 begin: qt_is_integer(Q) |
|
Line 69 begin: qt_is_integer(Q) |
|
example: qt_is_integer(quote(0)) |
example: qt_is_integer(quote(0)) |
end: |
end: |
|
|
begin: qt_depend(Q,x) |
begin: qt_is_dependent(Q,x) |
quote $B%G!<%?(B {Q} $B$,ITDj85(B {x} $B$r4^$`$H(B 1, $B4^$^$J$$$H(B 0. |
quote $B%G!<%?(B {Q} $B$,ITDj85(B {x} $B$r4^$`$H(B 1, $B4^$^$J$$$H(B 0. |
example: qt_depend(quote(1+1/x),x) |
example: qt_is_dependent(quote(1+1/x),x) |
end: |
end: |
|
|
begin: qt_is_function(Q) |
begin: qt_is_function(Q) |
Line 400 begin: new-functions| |
|
Line 398 begin: new-functions| |
|
|
|
qt_ltor, qt_rtol ; $BLZ$N9=B$$NJQ49(B; $BNc(B (x*y)*z --> x*(y*z) |
qt_ltor, qt_rtol ; $BLZ$N9=B$$NJQ49(B; $BNc(B (x*y)*z --> x*(y*z) |
|
|
|
end: |
|
|
|
begin: idx| |
|
|
@subsection Index $B$D$-JQ?t(B |
@subsection Index $B$D$-JQ?t(B |
|
|
idxtov(x,i) x_i $B$r@8@.(B. x_i $B$N(B index (idx) $BB0@-(B $B$r(B i $B$K(B. |
end: |
base_name $BB0@-$r(B x $B$K(B. |
|
idxtov(x,[i,j]) x_i_j $B$r@8@.(B. x_i_i $B$N(B index (idx) $BB0@-(B $B$r(B [i,j] $B$K(B. |
|
vtoidx(x_i) $B$O(B i $B$rLa$9(B. $BB0@-$N8!:w$J$N$G9bB.(B. idx $BB0@-$,L5$$>l9g$O(B i $B$r@_Dj(B. |
|
|
|
idxtov $B4X?t$O(B $B4X?tL>$K$b;H$($k$h$&$K$9$k(B --> $BHyJ,4DBP1~(B. |
begin: idxtov(X,I) |
|
idxtov({X},{I}) $B$OJQ?t(B {X}_{I} $B$rLa$9(B. |
|
{I} $B$O%9%+%i!<$+%j%9%H(B. |
|
example: |
|
idxtov(x,i) $B$O(B x_i $B$rLa$9(B. |
|
description: |
|
idxtov(x,[i,j]) $B$O(B x_i_j $B$r@8@.(B. x_i_i $B$N(B index (idx) $BB0@-(B $B$r(B [i,j] $B$K(B. |
|
|
|
@code{util_v()} $B$H$[$\F1$8(B. |
|
|
|
x_i $B$N(B index (idx) $BB0@-(B $B$r(B i $B$K(B. |
|
base_name $BB0@-$r(B x $B$K(B. |
|
$BITDj85$NB0@-$rMxMQ$9$k$3$H$K$h$j9bB.$K(B index $B$r$H$j$@$;$F(B index $B$D$-JQ?t$N(B |
|
$BBe$j$,$G$-$k(B. |
|
|
|
end: |
|
|
|
begin: vtoidx(X) |
|
vtoidx(x_i) $B$O(B [x,i] $B$rLa$9(B. |
|
description: |
|
@code{util_index()} $B$H$[$\F1MM(B. |
|
|
|
$BB0@-$N8!:w$J$N$G9bB.(B. idx $BB0@-$,L5$$>l9g$O(B i $B$r@_Dj(B. |
|
|
|
idxtov $B4X?t$O(B $B4X?tL>$K$b;H$($k$h$&$K$9$k(B? --> $BHyJ,4DBP1~(B. |
|
|
qt_function($BL>A0(B, $B0z?t(B) --> quote($BL>A0(B($B0z?t(B)) $B$r@8@.(B. |
qt_function($BL>A0(B, $B0z?t(B) --> quote($BL>A0(B($B0z?t(B)) $B$r@8@.(B. |
index $BIU$-4X?t$OHyJ,4D$N<h07$KI,MW(B. |
index $BIU$-4X?t$OHyJ,4D$N<h07$KI,MW(B. |
|
end: |
|
|
|
begin: powerSeries| |
|
|
@subsection $BQQ5i?t(B, dp $B$N(B pretty print. |
@subsection $BQQ5i?t(B, dp $B$N(B pretty print. |
|
|
$B6R5i?t$N<h07(B, dp $B$N(B pretty print $B$N$?$a(B. |
$B6R5i?t$N<h07(B, dp $B$N(B pretty print $B$N$?$a(B. |
Line 424 begin: new-functions| |
|
Line 449 begin: new-functions| |
|
|
|
end: |
end: |
|
|
/*&generate-epilogue |
begin: MonomialSimplifier| |
*/ |
|
|
@subsection $B%b%N%_%"%k$rI8=`7A$X(B (builtin$B$G(B?) |
|
|
|
example: |
|
x^1 --> x |
|
(x*y)*(z*t) --> x*y*z*t |
|
x*2*y*4 --> 8*x*y ($B;XDj$7$?JQ?t0J30$O2D49$H$9$k(B) |
|
x*x^3 --> x^4 |
|
x*(-y)*z --> -x*y*z |
|
((x)) --> x $B$3$l$O(B noro_simplify.rr noro_simplify.remove_paren() $B$,BP1~(B |
|
|
|
|
|
end: |
|
|
|
4/15 $BLk(B. $B<BAu$OL@F|9V5A$N=`Hw$N=*N;8e$+(B? |
|
begin: qt.gtlex(f,g) |
|
{f} $B$O(B {g} $B$h$j(B quote tree $B$N(B lex order $B$GBg$-$$(B. |
|
description: |
|
quote tree $B$N(B lex order $B$O<!$N$h$&$K7h$a$k(B. |
|
@itemize |
|
@item $BITDj85$OITDj85$N=g=x(B. |
|
@item $BITDj85$h$j(B +, - , *, /, ^ $BEy$N(B node $B$OBg$-$$(B. |
|
$B$?$H$($P(B x < power(x,2) (power(x,2) $B$O(B x^2 $B$N0UL#(B) |
|
@item $B$"$H$O:F5"E*(B. times(x,y) < power(x,y) $B$@$,(B, |
|
times(x,y) $B$H(B times(p,q) $B$O(B x $B$H(B p $B$NHf3S(B, $B$3$l$G$-$^$i$J$$$J$i(B, |
|
y, q $B$NHf3S(B. |
|
@end itemize |
|
|
|
end: |
|
|
|
begin: qt.dtoq(F,V) |
|
$BJ,;6I=8=B?9`<0(B {F} $B$r(B quote $B$KJQ49$9$k(B. |
|
{V} $B$OJQ?t%j%9%H(B. |
|
description: |
|
$BJQ?t%j%9%H$,6u$N$H$-$O(B x_1, x_2, ... $B$rMQ$$$k(B. |
|
example: |
|
F=dp_ptod((x-y-z)^3,[x,y]); |
|
qt.dtoq(F,[]); |
|
quote(x_1^3+-3*x_1^2*x_2+3*x_1*x_2^2-x_2^3+-3*z*x_1^2+6*z*x_1*x_2 |
|
+-3*z*x_2^2+3*z^2*x_1+-3*z^2*x_2+-z^3) |
|
ref: qt.qtod |
|
end: |
|
|
|
begin: qt.qtod(F,V) |
|
quote {F} $B$r(B $BJ,;6I=8=B?9`<0$KJQ49$9$k(B. |
|
{V} $B$OJQ?t%j%9%H(B. |
|
description: |
|
$BJQ?t%j%9%H$,6u$N$H$-$O(B x_1, x_2, ... $B$rMQ$$$k(B. |
|
ref: qt.qtod |
|
end: |