/* $OpenXM: OpenXM/src/asir-contrib/packages/doc/dsolv.oxweave,v 1.6 2004/03/05 15:30:50 ohara Exp $ */
/* dsolv.oxweave */
/*&C-texi
@node DSOLV Functions,,, Top
*/
/*&en
@chapter DSOLV Functions
This section is a collection of functions to solve regular holonomic
systems in terms of series.
Algorithms are explained in the book [SST].
You can load this package by the command
@code{load("dsolv")$}
This package requires @code{Diff} and @code{dmodule}.
To use the functions of the package @code{dsolv} in OpenXM/Risa/Asir,
executing the command @code{load("dsolv")$}
is necessary at first.
This package uses @code{ox_sm1}, so the variables you can use
is as same as those you can use in the package @code{sm1}.
@section Functions
*/
/*&ja
@chapter DSOLV $BH!?t(B
$B$3$N@a$O@5B'%[%m%N%_%C%/7O$r5i?t$G2r$/$?$a$N(B
$BH!?t$r$"$D$a$F$"$k(B.
$B%"%k%4%j%:%`$K$D$$$F$O(B [SST] $B$K@bL@$,$"$k(B.
$B$3$N%Q%C%1!<%8$O<!$N%3%^%s%I(B @code{load("dsolv");}
$B$G%m!<%I$G$-$k(B.
$B$3$N%Q%C%1!<%8$O(B @code{Diff} $B$*$h$S(B @code{Dmodule} $B$r;HMQ$9$k(B.
OpenXM/Risa/Asir $B$G$NMxMQ$K$"$?$C$F$O(B,
@example
load("dsolv");$
@end example
$B$,;O$a$KI,MW(B.
$B$3$N%Q%C%1!<%8$O(B @code{ox_sm1} $B$rMxMQ$7$F$$$k(B.
$B$7$?$,$C$F;HMQ$G$-$kJQ?t$O(B @code{sm1} $B%Q%C%1!<%8$HF1MM$NJQ?t$7$+$D$+$($J$$(B.
@section $BH!?t0lMw(B
*/
/*&C-texi
@menu
* dsolv_dual::
* dsolv_starting_term::
@end menu
*/
/*&en
@node dsolv_dual,,, DSOLV Functions
@subsection @code{dsolv_dual}
@findex dsolv_dual
@table @t
@item dsolv_dual(@var{f},@var{v})
:: Grobner dual of @var{f}.
@end table
@table @var
@item return
List
@item f, v
List
@end table
@itemize @bullet
@item It returns the Grobner dual of @var{f} in the ring of polynomials
with variables @var{v}.
@item The ideal generated by @var{f} must be primary to the maximal ideal
generated by @var{v}.
If it is not primary to the maximal ideal, then this function falls into
an infinite loop.
@end itemize
@noindent
Algorithm:
This is an implementation of Algorithm 2.3.14 of the book [SST].
If we replace variables x, y, ... in the output by log(x), log(y), ...,
then these polynomials in log are solutions of the system of differential
equations @var{f}@code{_(x->x*dx, y->y*dy, ...)}.
*/
/*&ja
@node dsolv_dual,,, DSOLV Functions
@subsection @code{dsolv_dual}
@findex dsolv_dual
@table @t
@item dsolv_dual(@var{f},@var{v})
:: @var{f} $B$N%0%l%V%JAPBP(B
@end table
@table @var
@item $BLa$jCM(B
$B%j%9%H(B
@item f, v
$B%j%9%H(B
@end table
@itemize @bullet
@item $BJQ?t(B @var{v} $B>e$NB?9`<04D$K$*$$$F(B,
@var{f} $B$N%0%l%V%JAPBP$r5a$a$k(B.
@item @var{f} $B$G@8@.$5$l$k%$%G%"%k$O(B, @var{v} $B$G@8@.$5$l$k6KBg%$%G%"%k$K(B
$BBP$7$F(B, primary $B$G$J$$$H$$$1$J$$(B.
primary $B$G$J$$>l9g(B, $B$3$NH!?t$OL58B%k!<%W$K$*$A$$$k(B.
@end itemize
@noindent
Algorithm:
$B$3$NH!?t$OK\(B [SST] $B$N(B Algorithm 2.3.14 $B$N<BAu$G$"$k(B.
$B=PNOCf$NJQ?t(B x, y, ... $B$r$=$l$>$l(B log(x), log(y), ..., $B$G$*$-$+$($k$H(B,
$B$3$l$i$N(B log $BB?9`<0$O(B,
@var{f}@code{_(x->x*dx, y->y*dy, ...)}
$B$G@8@.$5$l$kHyJ,J}Dx<07O(B
$B$N2r$H$J$C$F$$$k(B.
*/
/*&C-texi
@example
[435] dsolv_dual([y-x^2,y+x^2],[x,y]);
[x,1]
[436] dsolv_act(y*dy-sm1_mul(x*dx,x*dx,[x,y]),log(x),[x,y]);
0
[437] dsolv_act(y*dy+sm1_mul(x*dx,x*dx,[x,y]),log(x),[x,y]);
0
[439] primadec([y^2-x^3,x^2*y^2],[x,y]);
[[[y^2-x^3,y^4,x^2*y^2],[y,x]]]
[440] dsolv_dual([y^2-x^3,x^2*y^2],[x,y]);
[x*y^3+1/4*x^4*y, x^2*y, x*y^2+1/12*x^4, y^3+x^3*y,
x^2, x*y, y^2+1/3*x^3, x, y, 1]
[441] dsolv_test_dual();
Output is omitted.
@end example
*/
/*&en
@node dsolv_starting_term,,, DSOLV Functions
@subsection @code{dsolv_starting_term}
@findex dsolv_starting_term
@table @t
@item dsolv_starting_term(@var{f},@var{v},@var{w})
:: Find the starting term of the solutions of
the regular holonomic system @var{f}
to the direction @var{w}.
@end table
@table @var
@item return
List
@item f, v, w
List
@end table
@itemize @bullet
@item Find the starting term of the solutions of
the regular holonomic system @var{f}
to the direction @var{w}.
@item The return value is of the form
[[@var{e1}, @var{e2}, ...],
[@var{s1}, @var{s2}, ...]]
where @var{e1} is an exponent vector and @var{s1} is the corresponding
solution set, and so on.
@item If you set @code{Dsolv_message_starting_term} to 1,
then this function outputs messages during the computation.
@end itemize
*/
/*&ja
@node dsolv_starting_term,,, DSOLV Functions
@subsection @code{dsolv_starting_term}
@findex dsolv_starting_term
@table @t
@item dsolv_starting_term(@var{f},@var{v},@var{w})
:: $B@5B'%[%m%N%_%C%/7O(B @var{f} $B$NJ}8~(B @var{w} $B$G$N5i?t2r$N(B
Staring terms $B$r7W;;$9$k(B. $B$3$3$G(B, @var{v} $B$OJQ?t$N=89g(B.
@end table
@table @var
@item $BLa$jCM(B
$B%j%9%H(B
@item f, v, w
$B%j%9%H(B
@end table
@itemize @bullet
@item $B@5B'%[%m%N%_%C%/7O(B @var{f} $B$NJ}8~(B @var{w} $B$G$N5i?t2r$N(B
Staring terms $B$r7W;;$9$k(B. $B$3$3$G(B, @var{v} $B$OJQ?t$N=89g(B.
@item $BLa$jCM$O<!$N7A$r$7$F$$$k(B:
[[@var{e1}, @var{e2}, ...],
[@var{s1}, @var{s2}, ...]]
$B$3$3$G(B @var{e1} $B$O(B exponent $B%Y%/%H%k$G$"$j(B @var{s1} $B$O$3$N%Y%/%H%k$K(B
$BBP1~$9$k2r$N=89g(B, $B0J2<F1MM(B.
@item $BJQ?t(B @code{Dsolv_message_starting_term} $B$r(B 1 $B$K$7$F$*$/$H(B,
$B$3$NH!?t$O7W;;$NESCf$K$$$m$$$m$H%a%C%;!<%8$r=PNO$9$k(B.
@end itemize
*/
/*&C-texi
@noindent
Algorithm: Saito, Sturmfels, Takayama, Grobner Deformations of Hypergeometric
Differential Equations ([SST]), Chapter 2.
@example
[1076] F = sm1_gkz( [ [[1,1,1,1,1],[1,1,0,-1,0],[0,1,1,-1,0]], [1,0,0]]);
[[x5*dx5+x4*dx4+x3*dx3+x2*dx2+x1*dx1-1,-x4*dx4+x2*dx2+x1*dx1,
-x4*dx4+x3*dx3+x2*dx2,
-dx2*dx5+dx1*dx3,dx5^2-dx2*dx4],[x1,x2,x3,x4,x5]]
[1077] A= dsolv_starting_term(F[0],F[1],[1,1,1,1,0])$
Computing the initial ideal.
Done.
Computing a primary ideal decomposition.
Primary ideal decomposition of the initial Frobenius ideal
to the direction [1,1,1,1,0] is
[[[x5+2*x4+x3-1,x5+3*x4-x2-1,x5+2*x4+x1-1,3*x5^2+(8*x4-6)*x5-8*x4+3,
x5^2-2*x5-8*x4^2+1,x5^3-3*x5^2+3*x5-1],
[x5-1,x4,x3,x2,x1]]]
----------- root is [ 0 0 0 0 1 ]
----------- dual system is
[x5^2+(-3/4*x4-1/2*x3-1/4*x2-1/2*x1)*x5+1/8*x4^2
+(1/4*x3+1/4*x1)*x4+1/4*x2*x3-1/8*x2^2+1/4*x1*x2,
x4-2*x3+3*x2-2*x1,x5-x3+x2-x1,1]
[1078] A[0];
[[ 0 0 0 0 1 ]]
[1079] map(fctr,A[1][0]);
[[[1/8,1],[x5,1],[log(x2)+log(x4)-2*log(x5),1],
[2*log(x1)-log(x2)+2*log(x3)+log(x4)-4*log(x5),1]],
[[1,1],[x5,1],[-2*log(x1)+3*log(x2)-2*log(x3)+log(x4),1]],
[[1,1],[x5,1],[-log(x1)+log(x2)-log(x3)+log(x5),1]],
[[1,1],[x5,1]]]
@end example
*/