Annotation of OpenXM/src/asir-contrib/packages/doc/sm1.oxweave, Revision 1.2
1.2 ! takayama 1: /*$OpenXM: OpenXM/src/asir-contrib/packages/doc/sm1.oxweave,v 1.1 2001/07/11 01:00:23 takayama Exp $ */
1.1 takayama 2:
3: /*&C-texi
4: @c DO NOT EDIT THIS FILE oxphc.texi
5: */
6: /*&jp-texi
7: @node SM1 $BH!?t(B,,, Top
8: @chapter SM1 $BH!?t(B
9:
10: $B$3$N@a$G$O(B sm1 $B$N(B ox $B%5!<%P(B @code{ox_sm1_forAsir}
11: $B$H$N%$%s%?%U%'!<%94X?t$r2r@b$9$k(B.
12: $B$3$l$i$N4X?t$O%U%!%$%k(B @file{sm1} $B$GDj5A$5$l$F$$$k(B.
13: @file{sm1} $B$O(B @file{$(OpenXM_HOME)/lib/asir-contrib} $B$K$"$k(B.
14: $B%7%9%F%`(B @code{sm1} $B$OHyJ,:nMQAG4D$G7W;;$9$k$?$a$N%7%9%F%`$G$"$k(B.
15: $B7W;;Be?t4v2?$N$$$m$$$m$JITJQNL$N7W;;$,HyJ,:nMQAG$N7W;;$K5"Ce$9$k(B.
16: @code{sm1} $B$K$D$$$F$NJ8=q$O(B @code{OpenXM/doc/kan96xx} $B$K$"$k(B.
17:
18: $B$H$3$KCG$j$,$J$$$+$.$j$3$N@a$N$9$Y$F$N4X?t$O(B,
19: $BM-M}?t78?t$N<0$rF~NO$H$7$F$&$1$D$1$J$$(B.
20: $B$9$Y$F$NB?9`<0$N78?t$O@0?t$G$J$$$H$$$1$J$$(B.
21:
22: @tex
23: $B6u4V(B
24: $X:={\bf C} \setminus \{ 0, 1 \} = {\bf C} \setminus V(x(x-1))$
25: $B$N%I%i!<%`%3%[%b%m%872C#$N<!85$r7W;;$7$F$_$h$&(B.
26: $X$ $B$OJ?LL$KFs$D$N7j$r$"$1$?6u4V$G$"$k$N$G(B, $BE@(B $x=0$, $x=1$ $B$N$^$o$j$r(B
27: $B$^$o$kFs$D$N%k!<%W$,(B1$B<!85$N%[%b%m%8!<72$N6u4V$r$O$k(B.
28: $B$7$?$,$C$F(B, 1$B<!85%I%i!<%`%3%[%b%m%872$N<!85$O(B $2$ $B$G$"$k(B.
29: @code{sm1} $B$O(B $0$ $B<!85$N%3%[%b%m%872$N<!85$*$h$S(B $1$ $B<!85$N%3%[%b%m%872$N(B
30: $B<!85$rEz$($k(B.
31: @end tex
32: */
33: /*&eg-texi
34: @node SM1 Functions,,, Top
35: @chapter SM1 Functions
36:
37: This chapter describes interface functions for
38: sm1 ox server @code{ox_sm1_forAsir}.
39: These interface functions are defined in the file @file{sm1}.
40: The file @file{sm1} is @*
41: at @file{$(OpenXM_HOME)/lib/asir/contrib-packages}.
42: The system @code{sm1} is a system to compute in the ring of differential
43: operators.
44: Many constructions of invariants
45: in the computational algebraic geometry reduce
46: to constructions in the ring of differential operators.
47: Documents on @code{sm1} are in
48: the directory @code{OpenXM/doc/kan96xx}.
49:
50: All the coefficients of input polynomials should be
51: integers for most functions in this section.
52: Other functions accept rational numbers as inputs
53: and it will be explicitely noted in each explanation
54: of these functions.
55:
56:
57:
58: @tex
59: Let us evaluate the dimensions of the de Rham cohomology groups
60: of
61: $X:={\bf C} \setminus \{ 0, 1 \} = {\bf C} \setminus V(x(x-1))$.
62: The space $X$ is a two punctured plane, so two loops that encircles the
63: points $x=0$ and $x=1$ respectively spans the first homology group.
64: Hence, the dimension of the first de Rham cohomology group is $2$.
65: @code{sm1} answers the dimensions of the 0th and the first
66: cohomology groups.
67: @end tex
68: */
69: /*&C-texi
70: @example
71:
72: This is Risa/Asir, Version 20000126.
73: Copyright (C) FUJITSU LABORATORIES LIMITED.
74: 1994-1999. All rights reserved.
75: xm version 20000202. Copyright (C) OpenXM Developing Team. 2000.
76: ox_help(0); ox_help("keyword"); ox_grep("keyword"); for help message
77: Loading ~/.asirrc
78:
79: [283] sm1_deRham([x*(x-1),[x]]);
80: [1,2]
81: @end example
82: */
83: /*&C-texi
84: @noindent
85: The author of @code{sm1} : Nobuki Takayama, @code{takayama@@math.sci.kobe-u.ac.jp} @*
86: The author of sm1 packages : Toshinori Oaku, @code{oaku@@twcu.ac.jp} @*
87: Reference: [SST] Saito, M., Sturmfels, B., Takayama, N.,
88: Grobner Deformations of Hypergeometric Differential Equations,
89: 1999, Springer.
90: See the appendix.
91: */
92: /*&jp-texi
93: @section @code{ox_sm1_forAsir} $B%5!<%P(B
94: */
95: /*&eg-texi
96: @section @code{ox_sm1_forAsir} Server
97: */
98:
99: /*&eg-texi
100: @menu
101: * ox_sm1_forAsir::
102: @end menu
103: @node ox_sm1_forAsir,,, Top
104: @subsection @code{ox_sm1_forAsir}
105: @findex ox_sm1_forAsir
106: @table @t
107: @item ox_sm1_forAsir
108: :: @code{sm1} server for @code{asir}.
109: @end table
110: @itemize @bullet
111: @item
112: @code{ox_sm1_forAsir} is the @code{sm1} server started from asir
113: by the command @code{sm1_start}.
114: In the standard setting, @*
115: @code{ox_sm1_forAsir} =
116: @file{$(OpenXM_HOME)/lib/sm1/bin/ox_sm1}
117: +
118: @file{$(OpenXM_HOME)/lib/sm1/callsm1.sm1} (macro file) @*
119: +
120: @file{$(OpenXM_HOME)/lib/sm1/callsm1b.sm1} (macro file) @*
121: The macro files @file{callsm1.sm1} and @file{callsm1b.sm1}
122: are searched from
123: current directory, @code{$(LOAD_SM1_PATH)},
124: @code{$(OpenXM_HOME)/lib/sm1},
125: @code{/usr/local/lib/sm1}
126: in this order.
127: @item Note for programmers: See the files
128: @file{$(OpenXM_HOME)/src/kxx/oxserver00.c},
129: @file{$(OpenXM_HOME)/src/kxx/sm1stackmachine.c}
130: to build your own server by reading @code{sm1} macros.
131: @end itemize
132: */
133: /*&jp-texi
134: @menu
135: * ox_sm1_forAsir::
136: @end menu
137: @node ox_sm1_forAsir,,, Top
138: @subsection @code{ox_sm1_forAsir}
139: @findex ox_sm1_forAsir
140: @table @t
141: @item ox_sm1_forAsir
142: :: @code{asir} $B$N$?$a$N(B @code{sm1} $B%5!<%P(B.
143: @end table
144: @itemize @bullet
145: @item
146: $B%5!<%P(B @code{ox_sm1_forAsir} $B$O(B @code{asir} $B$h$j%3%^%s%I(B
147: @code{sm1_start} $B$G5/F0$5$l$k(B @code{sm1} $B%5!<%P$G$"$k(B.
148:
149: $BI8=`E*@_Dj$G$O(B, @*
150: @code{ox_sm1_forAsir} =
151: @file{$(OpenXM_HOME)/lib/sm1/bin/ox_sm1}
152: +
153: @file{$(OpenXM_HOME)/lib/sm1/callsm1.sm1} (macro file) @*
154: +
155: @file{$(OpenXM_HOME)/lib/sm1/callsm1b.sm1} (macro file) @*
156: $B$G$"$j(B, $B$3$l$i$N%^%/%m%U%!%$%k$O(B, $B0lHL$K$O(B
157: current directory, @code{$(LOAD_SM1_PATH)},
158: @code{$(OpenXM_HOME)/lib/sm1},
159: @code{/usr/local/lib/sm1}
160: $B$N=gHV$G$5$,$5$l$k(B.
161: @item $B%W%m%0%i%^!<$N$?$a$N%N!<%H(B:
162: @code{sm1} $B%^%/%m$rFI$_9~$s$G<+J,FH<+$N%5!<%P$r:n$k$K$O(B
163: $B<!$N%U%!%$%k$b8+$h(B
164: @file{$(OpenXM_HOME)/src/kxx/oxserver00.c},
165: @file{$(OpenXM_HOME)/src/kxx/sm1stackmachine.c}
166: @end itemize
167: */
168:
169: def sm1_check_server(P) {
170: M=ox_get_serverinfo(P);
171: if (M == []) {
172: return(sm1_start());
173: }
174: if (M[0][1] != "Ox_system=ox_sm1_ox_sm1_forAsir") {
175: print("Warning: the server number ",0)$
176: print(P,0)$
177: print(" is not ox_sm1_forAsir server.")$
178: print("Starting ox_sm1_forAsir server on the localhost.")$
179: return(sm1_start());
180: }
181: return(P);
182: }
183:
184: /*&jp-texi
185: @section $BH!?t0lMw(B
186: */
187: /*&eg-texi
188: @section Functions
189: */
190:
191: /*&eg-texi
192: @c sort-sm1_start
193: @menu
194: * sm1_start::
195: @end menu
196: @node sm1_start,,, SM1 Functions
197: @subsection @code{sm1_start}
198: @findex sm1_start
199: @table @t
200: @item sm1_start()
201: :: Start @code{ox_sm1_forAsir} on the localhost.
202: @end table
203:
204: @table @var
205: @item return
206: Integer
207: @end table
208:
209: @itemize @bullet
210: @item Start @code{ox_sm1_forAsir} on the localhost.
211: It returns the descriptor of @code{ox_sm1_forAsir}.
212: @item Set @code{Xm_noX = 1} to start @code{ox_sm1_forAsir}
213: without a debug window.
214: @item You might have to set suitable orders of variable by the command
215: @code{ord}. For example,
216: when you are working in the
217: ring of differential operators on the variable @code{x} and @code{dx}
218: (@code{dx} stands for
219: @tex $\partial/\partial x$
220: @end tex
221: ),
222: @code{sm1} server assumes that
223: the variable @code{dx} is collected to the right and the variable
224: @code{x} is collected to the left in the printed expression.
225: In the example below, you must not use the variable @code{cc}
226: for computation in @code{sm1}.
227: @item The variables from @code{a} to @code{z} except @code{d} and @code{o}
228: and @code{x0}, ..., @code{x20}, @code{y0}, ..., @code{y20},
229: @code{z0}, ..., @code{z20} can be used as variables for ring of
230: differential operators in default. (cf. @code{Sm1_ord_list} in @code{sm1}).
231: @item The descriptor is stored in @code{Sm1_proc}.
232: @end itemize
233: */
234: /*&jp-texi
235: @c sort-sm1_start
236: @menu
237: * sm1_start::
238: @end menu
239: @node sm1_start,,, SM1 $BH!?t(B
240: @subsection @code{sm1_start}
241: @findex sm1_start
242: @table @t
243: @item sm1_start()
244: :: localhost $B$G(B @code{ox_sm1_forAsir} $B$r%9%?!<%H$9$k(B.
245: @end table
246:
247: @table @var
248: @item return
249: $B@0?t(B
250: @end table
251:
252: @itemize @bullet
253: @item localhost $B$G(B @code{ox_sm1_forAsir} $B$r%9%?!<%H$9$k(B.
254: $B%5!<%P(B @code{ox_sm1_forAsir} $B$N<1JLHV9f$rLa$9(B.
255: @item @code{Xm_noX = 1} $B$H$*$/$H%5!<%P(B @code{ox_sm1_forAsir} $B$r%G%P%C%0MQ$N(B
256: $B%&%#%s%I%&$J$7$K5/F0$G$-$k(B.
257: @item $B%3%^%s%I(B @code{ord} $B$rMQ$$$FJQ?t=g=x$r@5$7$/@_Dj$7$F$*$/I,MW$,(B
258: $B$"$k(B.
259: $B$?$H$($P(B,
260: $BJQ?t(B @code{x} $B$H(B @code{dx} $B>e$NHyJ,:nMQAG4D(B
261: (@code{dx} $B$O(B
262: @tex $\partial/\partial x$
263: @end tex
264: $B$KBP1~(B)
265: $B$G7W;;$7$F$$$k$H$-(B,
266: @code{sm1} $B%5!<%P$O<0$r0u:~$7$?$H$-(B,
267: $BJQ?t(B @code{dx} $B$O1&B&$K=8$a$lJQ?t(B
268: @code{x} $B$O:8B&$K$"$D$a$i$l$F$$$k$H2>Dj$7$F$$$k(B.
269: $B<!$NNc$G$O(B, $BJQ?t(B @code{cc} $B$r(B @code{sm1} $B$G$N7W;;$N$?$a$KMQ$$$F$O$$$1$J$$(B.
270: @item @code{a} $B$h$j(B @code{z} $B$N$J$+$G(B, @code{d} $B$H(B @code{o} $B$r=|$$$?$b$N(B,
271: $B$=$l$+$i(B, @code{x0}, ..., @code{x20}, @code{y0}, ..., @code{y20},
272: @code{z0}, ..., @code{z20} $B$O(B, $B%G%U%)!<%k%H$GHyJ,:nMQAG4D$NJQ?t$H$7$F(B
273: $B;H$($k(B (cf. @code{Sm1_ord_list} in @code{sm1}).
274: @item $B<1JLHV9f$O(B @code{Sm1_proc} $B$K3JG<$5$l$k(B.
275: @end itemize
276: */
277: /*&C-texi
278: @example
279: [260] ord([da,a,db,b]);
280: [da,a,db,b,dx,dy,dz,x,y,z,dt,ds,t,s,u,v,w,
281: ......... omit ..................
282: ]
283: [261] a*da;
284: a*da
285: [262] cc*dcc;
286: dcc*cc
287: [263] sm1_mul(da,a,[a]);
288: a*da+1
289: [264] sm1_mul(a,da,[a]);
290: a*da
291: @end example
292: */
293: /*&eg-texi
294: @table @t
295: @item Reference
296: @code{ox_launch}, @code{sm1_push_int0}, @code{sm1_push_poly0},
297: @code{ord}
298: @end table
299: */
300: /*&jp-texi
301: @table @t
302: @item $B;2>H(B
303: @code{ox_launch}, @code{sm1_push_int0}, @code{sm1_push_poly0},
304: @code{ord}
305: @end table
306: */
307:
308:
309: def sm1_start() {
310: extern Sm1_lib;
311: extern Xm_noX;
312: extern Sm1_proc;
313: if (Xm_noX) {
314: P = ox_launch_nox(0,Sm1_lib+"/bin/ox_sm1_forAsir");
315: }else{
316: P = ox_launch(0,Sm1_lib+"/bin/ox_sm1_forAsir");
317: }
318: if (Xm_noX) {
319: sm1(P," oxNoX ");
320: }
321: ox_check_errors(P);
322: Sm1_proc = P;
323: return(P);
324: }
325:
326:
327: /* ox_sm1 */
328: /* P is the process number */
329: def sm1flush(P) {
330: ox_execute_string(P,"[(flush)] extension pop");
331: }
332:
333: def sm1push(P,F) {
334: G = ox_ptod(F);
335: ox_push_cmo(P,G);
336: }
337:
338: /*&eg-texi
339: @c sort-sm1
340: @menu
341: * sm1::
342: @end menu
343: @node sm1,,, SM1 Functions
344: @subsection @code{sm1}
345: @findex sm1
346: @table @t
347: @item sm1(@var{p},@var{s})
348: :: ask the @code{sm1} server to execute the command string @var{s}.
349: @end table
350:
351: @table @var
352: @item return
353: Void
354: @item p
355: Number
356: @item s
357: String
358: @end table
359:
360: @itemize @bullet
361: @item It asks the @code{sm1} server of the descriptor number @var{p}
362: to execute the command string @var{s}.
363: @end itemize
364: */
365: /*&jp-texi
366: @menu
367: * sm1::
368: @end menu
369: @node sm1,,, SM1 $BH!?t(B
370: @subsection @code{sm1}
371: @findex sm1
372: @table @t
373: @item sm1(@var{p},@var{s})
374: :: $B%5!<%P(B @code{sm1} $B$K%3%^%s%INs(B @var{s} $B$r<B9T$7$F$/$l$k$h$&$K$?$N$`(B.
375: @end table
376:
377: @table @var
378: @item return
379: $B$J$7(B
380: @item p
381: $B?t(B
382: @item s
383: $BJ8;zNs(B
384: @end table
385:
386: @itemize @bullet
387: @item $B<1JLHV9f(B @var{p} $B$N(B @code{sm1} $B%5!<%P$K(B
388: $B%3%^%s%INs(B @var{s} $B$r<B9T$7$F$/$l$k$h$&$KMj$`(B.
389: @end itemize
390: */
391: /*&C-texi
392: @example
393: [261] sm1(0," ( (x-1)^2 ) . ");
394: 0
395: [262] ox_pop_string(0);
396: x^2-2*x+1
397: [263] sm1(0," [(x*(x-1)) [(x)]] deRham ");
398: 0
399: [264] ox_pop_string(0);
400: [1 , 2]
401: @end example
402: */
403: def sm1(P,F) {
404: ox_execute_string(P,F);
405: sm1flush(P);
406: }
407: /*&jp-texi
408: @table @t
409: @item $B;2>H(B
410: @code{sm1_start}, @code{ox_push_int0}, @code{sm1_push_poly0}.
411: @end table
412: */
413: /*&eg-texi
414: @table @t
415: @item Reference
416: @code{sm1_start}, @code{ox_push_int0}, @code{sm1_push_poly0}.
417: @end table
418: */
419:
420: def sm1pop(P) {
421: return(ox_pop_cmo(P));
422: }
423:
424: def sm1_to_asir_form(V) { return(toAsirForm(V)); }
425: def toAsirForm(V) {
426: extern ToAsirForm_V; /* for debug */
427: if (type(V) == 4) { /* list */
428: if((length(V) == 3) && (V[0] == "sm1_dp")) {
429: /* For debugging. */
430: if (ToAsir_Debug != 0) {
431: ToAsirForm_V = V;
432: print(map(type,V[1]));
433: print(V);
434: }
435: /* */
436: Vlist = map(strtov,V[1]);
437: return(dp_dtop(V[2],Vlist));
438: } else {
439: return(map(toAsirForm,V));
440: }
441: }else{
442: return(V);
443: }
444: }
445:
446: def sm1_toOrdered(V) {
447: if (type(V) == 4) { /* list */
448: if((length(V) == 3) && (V[0] == "sm1_dp")) {
449: Vlist = map(strtov,V[1]);
450: Ans = "";
451: F = V[2];
452: while (F != 0) {
453: G = dp_hm(F);
454: F = dp_rest(F);
455: if (dp_hc(G)>0) {
456: Ans += "+";
457: }
458: Ans += rtostr(dp_dtop(G,Vlist));
459: }
460: return Ans;
461: } else {
462: return(map(sm1_toOrdered,V));
463: }
464: }else{
465: return(V);
466: }
467: }
468:
469:
470: def sm1_push_poly0_R(A,P,Vlist) {
471: return(sm1_push_poly0(P,A,Vlist));
472: }
473: def sm1_push_poly0(P,A,Vlist) {
474: if (type(Vlist[0]) == 4) {
475: Vlist = Vlist[2];
476: }
477: /* if Vlist=[[e,x,y,H,E,Dx,Dy,h],[e,x,y,hH,eE,dx,dy,h],[e,x,y,hH,eE,dx,dy,h]]
478: list of str (sm1) list of str (asir) list of var (asir)
479: then we execute the code above.
480: */
481: if (type(A) == 2 || type(A) == 1) { /* recursive poly or number*/
482: A = dp_ptod(A,Vlist);
483: ox_push_cmo(P,A);
484: return;
485: }
486: if (type(A) == 0) { /* zero */
487: sm1(P," (0). ");
488: return;
489: }
490: if (type(A) == 4) { /* list */
491: ox_execute_string(P," [ ");
492: map(sm1_push_poly0_R,A,P,Vlist);
493: ox_execute_string(P," ] ");
494: return;
495: }
496: ox_push_cmo(P,A);
497: ox_check_errors2(P);
498: return;
499: }
500: /* sm1_push_poly0(0,[0,1,x+y,["Hello",y^3]],[x,y]); */
501:
502: def sm1_pop_poly0(P,Vlist) {
503: if (type(Vlist[0]) == 4) {
504: Vlist = Vlist[2];
505: }
506: A = ox_pop_cmo(P);
507: return(sm1_pop_poly0_0(P,A,Vlist));
508: }
509: def sm1_pop_poly0_0_R(A,P,Vlist) {
510: return(sm1_pop_poly0_0(P,A,Vlist));
511: }
512: def sm1_pop_poly0_0(P,A,Vlist) {
513: if (type(A) == 4) {
514: return(map(sm1_pop_poly0_0_R,A,P,Vlist));
515: }
516: if (type(A)== 9) {return(dp_dtop(A,Vlist));}
517: return(A);
518: }
519:
520: def sm1_push_int0_R(A,P) {
521: return(sm1_push_int0(P,A));
522: }
523:
524: /*&eg-texi
525: @c sort-sm1_push_int0
526: @menu
527: * sm1_push_int0::
528: @end menu
529: @node sm1_push_int0,,, SM1 Functions
530: @subsection @code{sm1_push_int0}
531: @findex sm1_push_int0
532: @table @t
533: @item sm1_push_int0(@var{p},@var{f})
534: :: push the object @var{f} to the server with the descriptor number @var{p}.
535: @end table
536:
537: @table @var
538: @item return
539: Void
540: @item p
541: Number
542: @item f
543: Object
544: @end table
545:
546: @itemize @bullet
547: @item When @code{type(@var{f})} is 2 (recursive polynomial),
548: @var{f} is converted to a string (type == 7)
549: and is sent to the server by @code{ox_push_cmo}.
550: @item When @code{type(@var{f})} is 0 (zero),
551: it is translated to the 32 bit integer zero
552: on the server.
553: Note that @code{ox_push_cmo(@var{p},0)} sends @code{CMO_NULL} to the server.
554: In other words, the server does not get the 32 bit integer 0 nor
555: the bignum 0.
556: @item @code{sm1} integers are classfied into the 32 bit integer and
557: the bignum.
558: When @code{type(@var{f})} is 1 (number), it is translated to the
559: 32 bit integer on the server.
560: Note that @code{ox_push_cmo(@var{p},1234)} send the bignum 1234 to the
561: @code{sm1} server.
562: @item In other cases, @code{ox_push_cmo} is called without data conversion.
563: @end itemize
564: */
565: /*&jp-texi
566: @c sort-sm1_push_int0
567: @menu
568: * sm1_push_int0::
569: @end menu
570: @node sm1_push_int0,,, SM1 $BH!?t(B
571: @subsection @code{sm1_push_int0}
572: @findex sm1_push_int0
573: @table @t
574: @item sm1_push_int0(@var{p},@var{f})
575: :: $B%*%V%8%'%/%H(B @var{f} $B$r<1JL;R(B @var{p} $B$N%5!<%P$XAw$k(B.
576: @end table
577:
578: @table @var
579: @item return
580: $B$J$7(B
581: @item p
582: $B?t(B
583: @item f
584: $B%*%V%8%'%/%H(B
585: @end table
586:
587: @itemize @bullet
588: @item @code{type(@var{f})} $B$,(B 2 ($B:F5"B?9`<0(B) $B$N$H$-(B,
589: @var{f} $B$OJ8;zNs(B (type == 7) $B$KJQ49$5$l$F(B,
590: @code{ox_push_cmo} $B$rMQ$$$F%5!<%P$XAw$i$l$k(B.
591: @item @code{type(@var{f})} $B$,(B 0 (zero) $B$N$H$-$O(B,
592: $B%5!<%P>e$G$O(B, 32 bit $B@0?t$H2r<a$5$l$k(B.
593: $B$J$*(B @code{ox_push_cmo(P,0)} $B$O%5!<%P$KBP$7$F(B @code{CMO_NULL}
594: $B$r$*$/$k$N$G(B, $B%5!<%PB&$G$O(B, 32 bit $B@0?t$r<u$1<h$k$o$1$G$O$J$$(B.
595: @item @code{sm1} $B$N@0?t$O(B, 32 bit $B@0?t$H(B bignum $B$K$o$1$k$3$H$,$G$-$k(B.
596: @code{type(@var{f})} $B$,(B 1 ($B?t(B)$B$N$H$-(B, $B$3$N4X?t$O(B 32 bit integer $B$r%5!<%P$K(B
597: $B$*$/$k(B.
598: @code{ox_push_cmo(@var{p},1234)} $B$O(B bignum $B$N(B 1234 $B$r(B
599: @code{sm1} $B%5!<%P$K$*$/$k$3$H$KCm0U$7$h$&(B.
600: @item $B$=$NB>$N>l9g$K$O(B @code{ox_push_cmo} $B$r%G!<%?7?$NJQ49$J$7$K8F$S=P$9(B.
601: @end itemize
602: */
603: /*&C
604: @example
605: [219] P=sm1_start();
606: 0
607: [220] sm1_push_int0(P,x*dx+1);
608: 0
609: [221] A=ox_pop_cmo(P);
610: x*dx+1
611: [223] type(A);
612: 7 (string)
613: @end example
614:
615: @example
616: [271] sm1_push_int0(0,[x*(x-1),[x]]);
617: 0
618: [272] ox_execute_string(0," deRham ");
619: 0
620: [273] ox_pop_cmo(0);
621: [1,2]
622: @end example
623: */
624: /*&eg-texi
625: @table @t
626: @item Reference
627: @code{ox_push_cmo}
628: @end table
629: */
630: /*&jp-texi
631: @table @t
632: @item Reference
633: @code{ox_push_cmo}
634: @end table
635: */
636:
637:
638: def sm1_push_int0(P,A) {
639: if (type(A) == 1 || type(A) == 0) {
640: /* recursive poly or number or 0*/
641: A = rtostr(A);
642: ox_push_cmo(P,A);
643: sm1(P," . (integer) dc ");
644: return;
645: }
646: if (type(A) == 2) {
647: A = rtostr(A); ox_push_cmo(P,A);
648: return;
649: }
650: if (type(A) == 4) { /* list */
651: ox_execute_string(P," [ ");
652: map(sm1_push_int0_R,A,P);
653: ox_execute_string(P," ] ");
654: return;
655: }
656: ox_push_cmo(P,A);
657: return;
658: }
659:
660: def sm1_push_0_R(A,P) {
661: return(sm1_push_0(P,A));
662: }
663: def sm1_push_0(P,A) {
664: if (type(A) == 0) {
665: /* 0 */
666: A = rtostr(A);
667: ox_push_cmo(P,A);
668: sm1(P," .. ");
669: return;
670: }
671: if (type(A) == 2) {
672: /* Vlist = vars(A); One should check Vlist is a subset of Vlist3. */
673: Vlist2 = sm1_vlist(P);
674: Vlist3 = map(strtov,Vlist2[1]);
675: B = dp_ptod(A,Vlist3);
676: ox_push_cmo(P,B);
677: return;
678: }
679: if (type(A) == 4) { /* list */
680: ox_execute_string(P," [ ");
681: map(sm1_push_0_R,A,P);
682: ox_execute_string(P," ] ");
683: return;
684: }
685: ox_push_cmo(P,A);
686: return;
687: }
688:
689: def sm1_push(P,A) {
690: sm1_push_0(P,A);
691: }
692:
693:
694: def sm1_pop(P) {
695: extern V_sm1_pop;
696: sm1(P," toAsirForm ");
697: V_sm1_pop = ox_pop_cmo(P);
698: return(toAsirForm(V_sm1_pop));
699: }
700:
701: def sm1_pop2(P) {
702: extern V_sm1_pop;
703: sm1(P," toAsirForm ");
704: V_sm1_pop = ox_pop_cmo(P);
705: return([toAsirForm(V_sm1_pop),V_sm1_pop]);
706: }
707:
708: def sm1_check_arg_gb(A,Fname) {
709: /* A = [[x^2+y^2-1,x*y],[x,y],[[x,-1,y,-1]]] */
710: if (type(A) != 4) {
711: error(Fname+" : argument should be a list.");
712: }
713: if (length(A) < 2) {
714: error(Fname+" : argument should be a list of 2 or 3 elements.");
715: }
716: if (type(A[0]) != 4) {
717: error(Fname+" : example: [[dx^2+dy^2-4,dx*dy-1]<== it should be a list,[x,y]]");
718: }
719: if (!sm1_isListOfPoly(A[0])) {
720: error(Fname+" : example: [[dx^2+dy^2-4,dx*dy-1]<== it should be a list of polynomials or strings,[x,y]]");
721: }
722: if (!sm1_isListOfVar(A[1])) {
723: error(Fname+" : example: [[dx^2+dy^2-4,dx*dy-1],[x,y]<== list of variables or \"x,y\"]");
724: }
725: if (length(A) >= 3) {
726: if (type(A[2]) != 4) {
727: error(Fname+" : example:[[dx^2+dy^2-4,dx*dy-1],[x,y],[[x,-1,dx,1]]<== a list of weights]");
728: }
729: if (type(A[2][0]) != 4) {
730: error(Fname+" : example:[[dx^2+dy^2-4,dx*dy-1],[x,y],[[x,-1,dx,1],[dy,1]]<== a list of lists of weight]");
731: }
732: }
733: return(1);
734: }
735:
736: def sm1_isListOfPoly(A) {
737: if (type(A) !=4 ) return(0);
738: N = length(A);
739: for (I=0; I<N; I++) {
740: if (!(type(A[I]) == 0 || type(A[I]) == 1 || type(A[I]) == 2 ||
741: type(A[I]) == 7 || type(A[I]) == 9)) {
742: return(0);
743: }
744: }
745: return(1);
746: }
747:
748: def sm1_isListOfVar(A) {
749: if (type(A) == 7) return(1); /* "x,y" */
750: if (type(A) != 4) return(0);
751: N = length(A);
752: for (I=0; I<N; I++) {
753: if (!(type(A[I]) == 2 || type(A[I]) == 7 )) {
754: return(0);
755: }
756: }
757: return(1);
758: }
759:
760: /*&eg-texi
761: @c sort-sm1_gb
762: @menu
763: * sm1_gb::
764: @end menu
765: @node sm1_gb,,, SM1 Functions
766: @node sm1_gb_d,,, SM1 Functions
767: @subsection @code{sm1_gb}
768: @findex sm1_gb
769: @findex sm1_gb_d
770: @table @t
1.2 ! takayama 771: @item sm1_gb([@var{f},@var{v},@var{w}]|proc=@var{p},sorted=@var{q})
1.1 takayama 772: :: computes the Grobner basis of @var{f} in the ring of differential
773: operators with the variable @var{v}.
774: @item sm1_gb_d([@var{f},@var{v},@var{w}]|proc=@var{p})
775: :: computes the Grobner basis of @var{f} in the ring of differential
776: operators with the variable @var{v}.
777: The result will be returned as a list of distributed polynomials.
778: @end table
779:
780: @table @var
781: @item return
782: List
1.2 ! takayama 783: @item p, q
1.1 takayama 784: Number
785: @item f, v, w
786: List
787: @end table
788:
789: @itemize @bullet
790: @item
791: It returns the Grobner basis of the set of polynomials @var{f}
792: in the ring of deferential operators with the variables @var{v}.
793: @item
794: The weight vectors are given by @var{w}, which can be omitted.
795: If @var{w} is not given,
796: the graded reverse lexicographic order will be used to compute Grobner basis.
797: @item
798: The return value of @code{sm1_gb}
799: is the list of the Grobner basis of @var{f} and the initial
800: terms (when @var{w} is not given) or initial ideal (when @var{w} is given).
801: @item
802: @code{sm1_gb_d} returns the results by a list of distributed polynomials.
803: Monomials in each distributed polynomial are ordered in the given order.
804: The return value consists of
805: [variable names, order matrix, grobner basis in districuted polynomials,
806: initial monomials or initial polynomials].
807: @item
808: When a non-term order is given, the Grobner basis is computed in
809: the homogenized Weyl algebra (See Section 1.2 of the book of SST).
810: The homogenization variable h is automatically added.
1.2 ! takayama 811: @item
! 812: When the optional variable @var{q} is set, @code{sm1_gb} returns,
! 813: as the third return value, a list of
! 814: the Grobner basis and the initial ideal
! 815: with sums of monomials sorted by the given order.
! 816: Each polynomial is expressed as a string temporally for now.
1.1 takayama 817: @end itemize
818: */
819: /*&jp-texi
820: @c sort-sm1_gb
821: @menu
822: * sm1_gb::
823: @end menu
824: @node sm1_gb,,, SM1 $BH!?t(B
825: @node sm1_gb_d,,, SM1 $BH!?t(B
826: @subsection @code{sm1_gb}
827: @findex sm1_gb
828: @findex sm1_gb_d
829: @table @t
1.2 ! takayama 830: @item sm1_gb([@var{f},@var{v},@var{w}]|proc=@var{p},sorted=@var{q})
1.1 takayama 831: :: @var{v} $B>e$NHyJ,:nMQAG4D$K$*$$$F(B @var{f} $B$N%0%l%V%J4pDl$r7W;;$9$k(B.
832: @item sm1_gb_d([@var{f},@var{v},@var{w}]|proc=@var{p})
833: :: @var{v} $B>e$NHyJ,:nMQAG4D$K$*$$$F(B @var{f} $B$N%0%l%V%J4pDl$r7W;;$9$k(B. $B7k2L$rJ,;6B?9`<0$N%j%9%H$GLa$9(B.
834: @end table
835:
836: @table @var
837: @item return
838: $B%j%9%H(B
1.2 ! takayama 839: @item p, q
1.1 takayama 840: $B?t(B
841: @item f, v, w
842: $B%j%9%H(B
843: @end table
844:
845: @itemize @bullet
846: @item
847: @var{v} $B>e$NHyJ,:nMQAG4D$K$*$$$F(B @var{f} $B$N%0%l%V%J4pDl$r7W;;$9$k(B.
848: @item
849: Weight $B%Y%/%H%k(B @var{w} $B$O>JN,$7$F$h$$(B.
850: $B>JN,$7$?>l9g(B, graded reverse lexicographic order $B$r$D$+$C$F(B
851: $B%V%l%V%J4pDl$r7W;;$9$k(B.
852: @item
853: @code{sm1_gb} $B$NLa$jCM$O(B @var{f} $B$N%0%l%V%J4pDl$*$h$S%$%K%7%c%k%b%N%_%"%k(B
854: ( @var{w} $B$,$J$$$H$-(B ) $B$^$?$O(B $B%$%K%7%!%kB?9`<0(B ( @var{w} $B$,M?$($i$?$H$-(B)
855: $B$N%j%9%H$G$"$k(B.
856: @item
857: @code{sm1_gb_d} $B$O7k2L$rJ,;6B?9`<0$N%j%9%H$GLa$9(B.
858: $BB?9`<0$NCf$K8=$l$k%b%N%_%"%k$O%0%l%V%J4pDl$r7W;;$9$k$H$-$KM?$($i$?=g=x$G%=!<%H$5$l$F$$$k(B.
859: $BLa$jCM$O(B
860: [$BJQ?tL>$N%j%9%H(B, $B=g=x$r$-$a$k9TNs(B, $B%0%l%V%J4pDl(B, $B%$%K%7%c%k%b%N%_%"%k$^$?$O%$%K%7%!%kB?9`<0(B]
861: $B$G$"$k(B.
862: @item
863: Term order $B$G$J$$=g=x$,M?$($i$l$?>l9g$O(B, $BF1<!2=%o%$%kBe?t$G%0%l%V%J4pDl$,7W;;$5$l$k(B (SST $B$NK\$N(B Section 1.2 $B$r8+$h(B).
864: $BF1<!2=JQ?t(B @code{h} $B$,7k2L$K2C$o$k(B.
1.2 ! takayama 865: @item $B%*%W%7%g%J%kJQ?t(B @var{q} $B$,%;%C%H$5$l$F$$$k$H$-$O(B,
! 866: 3 $BHVL\$NLa$jCM$H$7$F(B, $B%0%l%V%J4pDl$*$h$S%$%K%7%!%k$N%j%9%H$,(B
! 867: $BM?$($i$l$?=g=x$G%=!<%H$5$l$?%b%N%_%"%k$NOB$H$7$FLa$5$l$k(B.
! 868: $B$$$^$N$H$3$m$3$NB?9`<0$O(B, $BJ8;zNs$GI=8=$5$l$k(B.
1.1 takayama 869: @end itemize
870: */
871: /*&C-texi
872: @example
873: [293] sm1_gb([[x*dx+y*dy-1,x*y*dx*dy-2],[x,y]]);
874: [[x*dx+y*dy-1,y^2*dy^2+2],[x*dx,y^2*dy^2]]
875: @end example
876: */
877: /*&eg-texi
878: In the example above,
879: @tex the set $\{ x \partial_x + y \partial_y -1,
880: y^2 \partial_y^2+2\}$
881: is the Gr\"obner basis of the input with respect to the
882: graded reverse lexicographic order such that
883: $ 1 \leq \partial_y \leq \partial_x \leq y \leq x \leq \cdots$.
884: The set $\{x \partial_x, y^2 \partial_y\}$ is the leading monomials
885: (the initial monominals) of the Gr\"obner basis.
886: @end tex
887: */
888: /*&jp-texi
889: $B>e$NNc$K$*$$$F(B,
890: @tex $B=89g(B $\{ x \partial_x + y \partial_y -1,
891: y^2 \partial_y^2+2\}$
892: $B$O(B
893: $ 1 \leq \partial_y \leq \partial_x \leq y \leq x \leq \cdots$
894: $B$G$"$k$h$&$J(B
895: graded reverse lexicographic order $B$K4X$9$k%0%l%V%J4pDl$G$"$k(B.
896: $B=89g(B $\{x \partial_x, y^2 \partial_y\}$ $B$O%0%l%V%J4pDl$N3F85$K(B
897: $BBP$9$k(B leading monomial (initial monomial) $B$G$"$k(B.
898: @end tex
899: */
900: /*&C-texi
901: @example
902: [294] sm1_gb([[dx^2+dy^2-4,dx*dy-1],[x,y],[[dx,50,dy,2,x,1]]]);
903: [[dx+dy^3-4*dy,-dy^4+4*dy^2-1],[dx,-dy^4]]
904: @end example
905: */
906: /*&eg-texi
907: In the example above, two monomials
908: @tex
909: $m = x^a y^b \partial_x^c \partial_y^d$ and
910: $m' = x^{a'} y^{b'} \partial_x^{c'} \partial_y^{d'}$
911: are firstly compared by the weight vector
912: {\tt (dx,dy,x,y) = (50,2,1,0)}
913: (i.e., $m$ is larger than $m'$ if $50c+2d+a > 50c'+2d'+a'$)
914: and when the comparison is tie, then these are
915: compared by the reverse lexicographic order
916: (i.e., if $50c+2d+a = 50c'+2d'+a'$, then use the reverse lexicogrpahic order).
917: @end tex
918: */
919: /*&jp-texi
920: $B>e$NNc$K$*$$$FFs$D$N%b%N%_%"%k(B
921: @tex
922: $m = x^a y^b \partial_x^c \partial_y^d$ $B$*$h$S(B
923: $m' = x^{a'} y^{b'} \partial_x^{c'} \partial_y^{d'}$
924: $B$O:G=i$K(B weight vector
925: {\tt (dx,dy,x,y) = (50,2,1,0)} $B$rMQ$$$FHf3S$5$l$k(B
926: ($B$D$^$j(B $m$ $B$O(B $50c+2d+a > 50c'+2d'+a'$ $B$N$H$-(B
927: $m'$ $B$h$jBg$-$$(B )
928: $B<!$K$3$NHf3S$G>!Ii$,$D$+$J$$$H$-$O(B reverse lexicographic order $B$GHf3S$5$l$k(B
929: ($B$D$^$j(B $50c+2d+a = 50c'+2d'+a'$ $B$N$H$-(B reverse lexicographic order $B$GHf3S(B
930: $B$5$l$k(B).
931: @end tex
1.2 ! takayama 932: */
! 933: /*&C-texi
! 934: @example
! 935: [294] F=sm1_gb([[dx^2+dy^2-4,dx*dy-1],[x,y],[[dx,50,dy,2,x,1]]]|sorted=1);
! 936: map(print,F[2][0])$
! 937: map(print,F[2][1])$
! 938: @end example
1.1 takayama 939: */
940: /*&C-texi
941: @example
942: [595]
943: sm1_gb([["dx*(x*dx +y*dy-2)-1","dy*(x*dx + y*dy -2)-1"],
944: [x,y],[[dx,1,x,-1],[dy,1]]]);
945:
946: [[x*dx^2+(y*dy-h^2)*dx-h^3,x*dy*dx+y*dy^2-h^2*dy-h^3,h^3*dx-h^3*dy],
947: [x*dx^2+(y*dy-h^2)*dx,x*dy*dx+y*dy^2-h^2*dy-h^3,h^3*dx]]
948:
949: [596]
950: sm1_gb_d([["dx (x dx +y dy-2)-1","dy (x dx + y dy -2)-1"],
951: "x,y",[[dx,1,x,-1],[dy,1]]]);
952: [[[e0,x,y,H,E,dx,dy,h],
953: [[0,-1,0,0,0,1,0,0],[0,0,0,0,0,0,1,0],[1,0,0,0,0,0,0,0],
954: [0,1,1,1,1,1,1,0],[0,0,0,0,0,0,-1,0],[0,0,0,0,0,-1,0,0],
955: [0,0,0,0,-1,0,0,0],[0,0,0,-1,0,0,0,0],[0,0,-1,0,0,0,0,0],
956: [0,0,0,0,0,0,0,1]]],
957: [[(1)*<<0,0,1,0,0,1,1,0>>+(1)*<<0,1,0,0,0,2,0,0>>+(-1)*<<0,0,0,0,0,1,0,2>>+(-1)*
958: <<0,0,0,0,0,0,0,3>>,(1)*<<0,0,1,0,0,0,2,0>>+(1)*<<0,1,0,0,0,1,1,0>>+(-1)*<<0,0,0
959: ,0,0,0,1,2>>+(-1)*<<0,0,0,0,0,0,0,3>>,(1)*<<0,0,0,0,0,1,0,3>>+(-1)*<<0,0,0,0,0,0
960: ,1,3>>],
961: [(1)*<<0,0,1,0,0,1,1,0>>+(1)*<<0,1,0,0,0,2,0,0>>+(-1)*<<0,0,0,0,0,1,0,2>>,(1)*<
962: <0,0,1,0,0,0,2,0>>+(1)*<<0,1,0,0,0,1,1,0>>+(-1)*<<0,0,0,0,0,0,1,2>>+(-1)*<<0,0,0
963: ,0,0,0,0,3>>,(1)*<<0,0,0,0,0,1,0,3>>]]]
964: @end example
965: */
966:
967: /*&eg-texi
968: @table @t
969: @item Reference
970: @code{sm1_reduction}, @code{sm1_rat_to_p}
971: @end table
972: */
973: /*&jp-texi
974: @table @t
975: @item $B;2>H(B
976: @code{sm1_reduction}, @code{sm1_rat_to_p}
977: @end table
978: */
979:
980:
981: def sm1_gb(A) {
982: SM1_FIND_PROC(P);
983: P = sm1_check_server(P);
984: sm1_check_arg_gb(A,"Error in sm1_gb");
985: sm1_push_int0(P,A);
986: sm1(P," gb ");
987: T = sm1_pop2(P);
988: return(append(T[0],[sm1_toOrdered(T[1])]));
989: }
990: def sm1_gb_d(A) {
991: SM1_FIND_PROC(P);
992: P = sm1_check_server(P);
993: sm1_check_arg_gb(A,"Error in sm1_gb_d");
994: sm1_push_int0(P,A);
995: sm1(P," gb /gb.tmp1 set ");
996: sm1(P," gb.tmp1 getOrderMatrix {{(universalNumber) dc} map } map /gb.tmp2 set ");
997: sm1(P," gb.tmp1 0 get 0 get getvNamesCR { [(class) (indeterminate)] dc } map /gb.tmp3 set ");
998: sm1(P," gb.tmp1 getRing ring_def "); /* Change the current ring! */
999: sm1(P,"[[ gb.tmp3 gb.tmp2] gb.tmp1] ");
1000: return(ox_pop_cmo(P));
1001: }
1002:
1003: def sm1_pgb(A) {
1004: SM1_FIND_PROC(P);
1005: P = sm1_check_server(P);
1006: sm1_check_arg_gb(A,"Error in sm1_pgb");
1007: sm1(P," set_timer ");
1008: sm1_push_int0(P,A);
1009: sm1(P," pgb ");
1010: B = sm1_pop(P);
1011: sm1(P," set_timer ");
1012: return(B);
1013: }
1014:
1015: /*&eg-texi
1016: @c sort-sm1_deRham
1017: @menu
1018: * sm1_deRham::
1019: @end menu
1020: @node sm1_deRham,,, SM1 Functions
1021: @subsection @code{sm1_deRham}
1022: @findex sm1_deRham
1023: @table @t
1024: @item sm1_deRham([@var{f},@var{v}]|proc=@var{p})
1025: :: ask the server to evaluate the dimensions of the de Rham cohomology groups
1026: of C^n - (the zero set of @var{f}=0).
1027: @end table
1028:
1029: @table @var
1030: @item return
1031: List
1032: @item p
1033: Number
1034: @item f
1035: String or polynomial
1036: @item v
1037: List
1038: @end table
1039:
1040: @itemize @bullet
1041: @item It returns the dimensions of the de Rham cohomology groups
1042: of X = C^n \ V(@var{f}).
1043: In other words, it returns
1044: [dim H^0(X,C), dim H^1(X,C), dim H^2(X,C), ..., dim H^n(X,C)].
1045: @item @var{v} is a list of variables. n = @code{length(@var{v})}.
1046: @item
1047: @code{sm1_deRham} requires huge computer resources.
1048: For example, @code{sm1_deRham(0,[x*y*z*(x+y+z-1)*(x-y),[x,y,z]])}
1049: is already very hard.
1050: @item
1051: To efficiently analyze the roots of b-function, @code{ox_asir} should be used
1052: from @code{ox_sm1_forAsir}.
1053: It is recommended to load the communication module for @code{ox_asir}
1054: by the command @*
1055: @code{sm1(0,"[(parse) (oxasir.sm1) pushfile] extension");}
1056: This command is automatically executed when @code{ox_sm1_forAsir} is started.
1057: @item If you make an interruption to the function @code{sm1_deRham}
1058: by @code{ox_reset(Sm1_proc);}, the server might get out of the standard
1059: mode. So, it is strongly recommended to execute the command
1060: @code{ox_shutdown(Sm1_proc);} to interrupt and restart the server.
1061: @end itemize
1062: */
1063: /*&jp-texi
1064: @c sort-sm1_deRham
1065: @menu
1066: * sm1_deRham::
1067: @end menu
1068: @node sm1_deRham,,, SM1 $BH!?t(B
1069: @subsection @code{sm1_deRham}
1070: @findex sm1_deRham
1071: @table @t
1072: @item sm1_deRham([@var{f},@var{v}]|proc=@var{p})
1073: :: $B6u4V(B C^n - (the zero set of @var{f}=0) $B$N%I%i!<%`%3%[%b%m%872$N<!85$r7W;;$7$F$/$l$k$h$&$K%5!<%P$KMj$`(B.
1074: @end table
1075:
1076: @table @var
1077: @item return
1078: $B%j%9%H(B
1079: @item p
1080: $B?t(B
1081: @item f
1082: $BJ8;zNs(B $B$^$?$O(B $BB?9`<0(B
1083: @item v
1084: $B%j%9%H(B
1085: @end table
1086:
1087: @itemize @bullet
1088: @item $B$3$NH!?t$O6u4V(B X = C^n \ V(@var{f}) $B$N%I%i!<%`%3%[%b%m%872$N<!85$r7W;;$9$k(B.
1089: $B$9$J$o$A(B,
1090: [dim H^0(X,C), dim H^1(X,C), dim H^2(X,C), ..., dim H^n(X,C)]
1091: $B$rLa$9(B.
1092: @item @var{v} $B$OJQ?t$N%j%9%H(B. n = @code{length(@var{v})} $B$G$"$k(B.
1093: @item
1094: @code{sm1_deRham} $B$O7W;;5!$N;q8;$rBgNL$K;HMQ$9$k(B.
1095: $B$?$H$($P(B @code{sm1_deRham(0,[x*y*z*(x+y+z-1)*(x-y),[x,y,z]])}
1096: $B$N7W;;$9$i$9$G$KHs>o$KBgJQ$G$"$k(B.
1097: @item
1098: b-$B4X?t$N:,$r8zN($h$/2r@O$9$k$K$O(B, @code{ox_asir} $B$,(B @code{ox_sm1_forAsir}
1099: $B$h$j;HMQ$5$l$k$Y$-$G$"$k(B. $B%3%^%s%I(B @*
1100: @code{sm1(0,"[(parse) (oxasir.sm1) pushfile] extension");}
1101: $B$rMQ$$$F(B, @code{ox_asir} $B$H$NDL?.%b%8%e!<%k$r$"$i$+$8$a%m!<%I$7$F$*$/$H$h$$(B.
1102: $B$3$N%3%^%s%I$O(B @code{ox_asir_forAsir} $B$N%9%?!<%H;~$K<+F0E*$K<B9T$5$l$F$$$k(B.
1103: @item
1104: @code{sm1_deRham} $B$r(B @code{ox_reset(Sm1_proc);} $B$GCfCG$9$k$H(B,
1105: $B0J8e(B sm1 $B%5!<%P$,HsI8=`%b!<%I$KF~$jM=4|$7$J$$F0:n$r$9$k>l9g(B
1106: $B$,$"$k$N$G(B, $B%3%^%s%I(B @code{ox_shutdown(Sm1_proc);} $B$G(B, @code{ox_sm1_forAsir}
1107: $B$r0l;~(B shutdown $B$7$F%j%9%?!<%H$7$?J}$,0BA4$G$"$k(B.
1108: @end itemize
1109: */
1110: /*&C-texi
1111: @example
1112: [332] sm1_deRham([x^3-y^2,[x,y]]);
1113: [1,1,0]
1114: [333] sm1_deRham([x*(x-1),[x]]);
1115: [1,2]
1116: @end example
1117: */
1118: /*&eg-texi
1119: @table @t
1120: @item Reference
1121: @code{sm1_start}, @code{deRham} (sm1 command)
1122: @item Reference paper
1123: Oaku, Takayama, An algorithm for de Rham cohomology groups of the
1124: complement of an affine variety via D-module computation,
1125: Journal of pure and applied algebra 139 (1999), 201--233.
1126: @end table
1127: */
1128: /*&jp-texi
1129: @table @t
1130: @item $B;2>H(B
1131: @code{sm1_start}, @code{deRham} (sm1 command)
1132: @item $B;29MO@J8(B
1133: Oaku, Takayama, An algorithm for de Rham cohomology groups of the
1134: complement of an affine variety via D-module computation,
1135: Journal of pure and applied algebra 139 (1999), 201--233.
1136: @end table
1137: */
1138:
1139:
1140: def sm1_deRham(A) {
1141: SM1_FIND_PROC(P);
1142: P = sm1_check_server(P);
1143: sm1(P," set_timer ");
1144: sm1_push_int0(P,A);
1145: sm1(P," deRham ");
1146: B = sm1_pop(P);
1147: sm1(P," set_timer ");
1148: ox_check_errors2(P);
1149: return(B);
1150: }
1151:
1152: def sm1_vlist(P) {
1153: sm1(P," getvNamesC ");
1154: B=ox_pop_cmo(P);
1155: sm1(P," getvNamesC toAsirVar ");
1156: C=ox_pop_cmo(P);
1157: return([B,C,map(strtov,C)]);
1158: }
1159: /* [ sm1 names(string), asir names(string), asir names(var)] */
1160: /* Vlist = sm1_vlist(P);
1161: sm1_push_poly0( x + 20*x, Vlist[2]);
1162: sm1_pop_poly0(Vlist[2]);
1163: */
1164:
1165: /* ring of Differential operators */
1166: def sm1_ringD(V,W) {
1167: SM1_FIND_PROC(P);
1168: sm1(P," [ ");
1169: if (type(V) == 7) { /* string */
1170: ox_push_cmo(P,V);
1171: }else if (type(V) == 4) {/* list */
1172: V = map(rtostr,V);
1173: ox_push_cmo(P,V);
1174: sm1(P," from_records ");
1175: }else { printf("Error: sm1_ringD"); return(-1); }
1176: sm1(P," ring_of_differential_operators ");
1177: if (type(W) != 0) {
1178: sm1_push_int0(P,W); sm1(P," weight_vector ");
1179: }
1180: sm1(P," pstack ");
1181: sm1(P," 0 ] define_ring getOrderMatrix {{(universalNumber) dc}map}map ");
1182: ox_check_errors2(P);
1183: M = ox_pop_cmo(P);
1184: return([sm1_vlist(P)[2],M]);
1185: }
1186:
1187: def sm1_expand_d(F) {
1188: SM1_FIND_PROC(P);
1189: ox_push_cmo(P,F);
1190: sm1(P, " expand ");
1191: return(ox_pop_cmo(P));
1192: }
1193:
1194: def sm1_mul_d(A,B) {
1195: SM1_FIND_PROC(P);
1196: ox_push_cmo(P,A);
1197: ox_push_cmo(P,B);
1198: sm1(P," mul ");
1199: return(ox_pop_cmo(P));
1200: }
1201:
1202: def sm1_dehomogenize_d(A) {
1203: SM1_FIND_PROC(P);
1204: ox_push_cmo(P,A);
1205: sm1(P," dehomogenize ");
1206: return(ox_pop_cmo(P));
1207: }
1208:
1209: def sm1_homogenize_d(A) {
1210: SM1_FIND_PROC(P);
1211: ox_push_cmo(P,A);
1212: sm1(P," homogenize ");
1213: return(ox_pop_cmo(P));
1214: }
1215:
1216: def sm1_groebner_d(A) {
1217: SM1_FIND_PROC(P);
1218: ox_push_cmo(P,A);
1219: sm1(P," groebner ");
1220: return(ox_pop_cmo(P));
1221: }
1222:
1223: def sm1_reduction_d(F,G) {
1224: SM1_FIND_PROC(P);
1225: ox_push_cmo(P,F);
1226: ox_push_cmo(P,G);
1227: sm1(P," reduction ");
1228: return(ox_pop_cmo(P));
1229: }
1230:
1231: def sm1_reduction_noH_d(F,G) {
1232: SM1_FIND_PROC(P);
1233: ox_push_cmo(P,F);
1234: ox_push_cmo(P,G);
1235: sm1(P," reduction-noH ");
1236: return(ox_pop_cmo(P));
1237: }
1238:
1239:
1240: /*&eg-texi
1241: @c sort-sm1_hilbert
1242: @menu
1243: * sm1_hilbert::
1244: * hilbert_polynomial::
1245: @end menu
1246: @node sm1_hilbert,,, SM1 Functions
1247: @subsection @code{sm1_hilbert}
1248: @findex sm1_hilbert
1249: @findex hilbert_polynomial
1250: @table @t
1251: @item sm1_hilbert([@var{f},@var{v}]|proc=@var{p})
1252: :: ask the server to compute the Hilbert polynomial for the set of polynomials @var{f}.
1253: @item hilbert_polynomial(@var{f},@var{v})
1254: :: ask the server to compute the Hilbert polynomial for the set of polynomials @var{f}.
1255: @end table
1256:
1257: @table @var
1258: @item return
1259: Polynomial
1260: @item p
1261: Number
1262: @item f, v
1263: List
1264: @end table
1265:
1266: @itemize @bullet
1267: @item It returns the Hilbert polynomial h(k) of the set of polynomials
1268: @var{f}
1269: with respect to the set of variables @var{v}.
1270: @item
1271: h(k) = dim_Q F_k/I \cap F_k where F_k the set of polynomials of which
1272: degree is less than or equal to k and I is the ideal generated by the
1273: set of polynomials @var{f}.
1274: @item
1275: Note for sm1_hilbert:
1276: For an efficient computation, it is preferable that
1277: the set of polynomials @var{f} is a set of monomials.
1278: In fact, this function firstly compute a Grobner basis of @var{f}, and then
1279: compute the Hilbert polynomial of the initial monomials of the basis.
1280: If the input @var{f} is already a Grobner
1281: basis, a Grobner basis is recomputed in this function,
1282: which is a waste of time and Grobner basis computation in the ring of
1283: polynomials in @code{sm1} is slower than in @code{asir}.
1284: @end itemize
1285: */
1286: /*&jp-texi
1287: @c sort-sm1_hilbert
1288: @menu
1289: * sm1_hilbert::
1290: * hilbert_polynomial::
1291: @end menu
1292: @node sm1_hilbert,,, SM1 $BH!?t(B
1293: @subsection @code{sm1_hilbert}
1294: @findex sm1_hilbert
1295: @findex hilbert_polynomial
1296: @table @t
1297: @item sm1_hilbert([@var{f},@var{v}]|proc=@var{p})
1298: :: $BB?9`<0$N=89g(B @var{f} $B$N%R%k%Y%k%HB?9`<0$r7W;;$9$k(B.
1299: @item hilbert_polynomial(@var{f},@var{v})
1300: :: $BB?9`<0$N=89g(B @var{f} $B$N%R%k%Y%k%HB?9`<0$r7W;;$9$k(B.
1301: @end table
1302:
1303: @table @var
1304: @item return
1305: $BB?9`<0(B
1306: @item p
1307: $B?t(B
1308: @item f, v
1309: $B%j%9%H(B
1310: @end table
1311:
1312: @itemize @bullet
1313: @item $BB?9`<0$N=89g(B @var{f} $B$NJQ?t(B @var{v} $B$K$+$s$9$k%R%k%Y%k%HB?9`<0(B h(k)
1314: $B$r7W;;$9$k(B.
1315: @item
1316: h(k) = dim_Q F_k/I \cap F_k $B$3$3$G(B F_k $B$O<!?t$,(B k $B0J2<$G$"$k$h$&$J(B
1317: $BB?9`<0$N=89g$G$"$k(B. I $B$OB?9`<0$N=89g(B @var{f} $B$G@8@.$5$l$k%$%G%"%k$G$"$k(B.
1318: @item
1319: sm1_hilbert $B$K$+$s$9$k%N!<%H(B:
1320: $B8zN($h$/7W;;$9$k$K$O(B @var{f} $B$O%b%N%_%"%k$N=89g$K$7$?J}$,$$$$(B.
1321: $B<B:](B, $B$3$NH!?t$O$^$:(B @var{f} $B$N%0%l%V%J4pDl$r7W;;$7(B, $B$=$l$+$i$=$N(B initial
1322: monomial $BC#$N%R%k%Y%k%HB?9`<0$r7W;;$9$k(B.
1323: $B$7$?$,$C$F(B, $BF~NO(B @var{f} $B$,$9$G$K%0%l%V%J4pDl$@$H$3$NH!?t$N$J$+$G$b$&0lEY(B
1324: $B%0%l%V%J4pDl$N7W;;$,$*$3$J$o$l$k(B. $B$3$l$O;~4V$NL5BL$G$"$k$7(B, @code{sm1} $B$N(B
1325: $BB?9`<0%0%l%V%J4pDl7W;;$O(B @code{asir} $B$h$jCY$$(B.
1326: @end itemize
1327: */
1328:
1329: /*&C-texi
1330: @example
1331:
1332: [346] load("katsura")$
1333: [351] A=hilbert_polynomial(katsura(5),[u0,u1,u2,u3,u4,u5]);
1334: 32
1335:
1336: @end example
1337:
1338: @example
1339: [279] load("katsura")$
1340: [280] A=gr(katsura(5),[u0,u1,u2,u3,u4,u5],0)$
1341: [281] dp_ord();
1342: 0
1343: [282] B=map(dp_ht,map(dp_ptod,A,[u0,u1,u2,u3,u4,u5]));
1344: [(1)*<<1,0,0,0,0,0>>,(1)*<<0,0,0,2,0,0>>,(1)*<<0,0,1,1,0,0>>,(1)*<<0,0,2,0,0,0>>,
1345: (1)*<<0,1,1,0,0,0>>,(1)*<<0,2,0,0,0,0>>,(1)*<<0,0,0,1,1,1>>,(1)*<<0,0,0,1,2,0>>,
1346: (1)*<<0,0,1,0,2,0>>,(1)*<<0,1,0,0,2,0>>,(1)*<<0,1,0,1,1,0>>,(1)*<<0,0,0,0,2,2>>,
1347: (1)*<<0,0,1,0,1,2>>,(1)*<<0,1,0,0,1,2>>,(1)*<<0,1,0,1,0,2>>,(1)*<<0,0,0,0,3,1>>,
1348: (1)*<<0,0,0,0,4,0>>,(1)*<<0,0,0,0,1,4>>,(1)*<<0,0,0,1,0,4>>,(1)*<<0,0,1,0,0,4>>,
1349: (1)*<<0,1,0,0,0,4>>,(1)*<<0,0,0,0,0,6>>]
1350: [283] C=map(dp_dtop,B,[u0,u1,u2,u3,u4,u5]);
1351: [u0,u3^2,u3*u2,u2^2,u2*u1,u1^2,u5*u4*u3,u4^2*u3,u4^2*u2,u4^2*u1,u4*u3*u1,
1352: u5^2*u4^2,u5^2*u4*u2,u5^2*u4*u1,u5^2*u3*u1,u5*u4^3,u4^4,u5^4*u4,u5^4*u3,
1353: u5^4*u2,u5^4*u1,u5^6]
1354: [284] sm1_hilbert([C,[u0,u1,u2,u3,u4,u5]]);
1355: 32
1356: @end example
1357: */
1358:
1359: /*&eg-texi
1360: @table @t
1361: @item Reference
1362: @code{sm1_start}, @code{sm1_gb}, @code{longname}
1363: @end table
1364: */
1365: /*&jp-texi
1366: @table @t
1367: @item $B;2>H(B
1368: @code{sm1_start}, @code{sm1_gb}, @code{longname}
1369: @end table
1370: */
1371:
1372: def sm1_hilbert(A) {
1373: SM1_FIND_PROC(P);
1374: P = sm1_check_server(P);
1375: sm1(P,"[ ");
1376: sm1_push_int0(P,A[0]);
1377: sm1_push_int0(P,A[1]);
1378: sm1(P," ] pgb /sm1_hilbert.gb set ");
1379: sm1(P," sm1_hilbert.gb 0 get { init toString } map ");
1380: sm1_push_int0(P,A[1]);
1381: sm1(P, " hilbert ");
1382: B = sm1_pop(P);
1383: return(B[1]/fac(B[0]));
1384: }
1385:
1386: /*&eg-texi
1387: @c sort-sm1_genericAnn
1388: @menu
1389: * sm1_genericAnn::
1390: @end menu
1391: @node sm1_genericAnn,,, SM1 Functions
1392: @subsection @code{sm1_genericAnn}
1393: @findex sm1_genericAnn
1394: @table @t
1395: @item sm1_genericAnn([@var{f},@var{v}]|proc=@var{p})
1396: :: It computes the annihilating ideal for @var{f}^s.
1397: @var{v} is the list of variables. Here, s is @var{v}[0] and
1398: @var{f} is a polynomial in the variables @code{rest}(@var{v}).
1399: @end table
1400:
1401: @table @var
1402: @item return
1403: List
1404: @item p
1405: Number
1406: @item f
1407: Polynomial
1408: @item v
1409: List
1410: @end table
1411:
1412: @itemize @bullet
1413: @item This function computes the annihilating ideal for @var{f}^s.
1414: @var{v} is the list of variables. Here, s is @var{v}[0] and
1415: @var{f} is a polynomial in the variables @code{rest}(@var{v}).
1416: @end itemize
1417: */
1418: /*&jp-texi
1419: @c sort-sm1_genericAnn
1420: @menu
1421: * sm1_genericAnn::
1422: @end menu
1423: @node sm1_genericAnn,,, SM1 $BH!?t(B
1424: @subsection @code{sm1_genericAnn}
1425: @findex sm1_genericAnn
1426: @table @t
1427: @item sm1_genericAnn([@var{f},@var{v}]|proc=@var{p})
1428: :: @var{f}^s $B$N$_$?$9HyJ,J}Dx<0A4BN$r$b$H$a$k(B.
1429: @var{v} $B$OJQ?t$N%j%9%H$G$"$k(B. $B$3$3$G(B, s $B$O(B @var{v}[0] $B$G$"$j(B,
1430: @var{f} $B$OJQ?t(B @code{rest}(@var{v}) $B>e$NB?9`<0$G$"$k(B.
1431: @end table
1432:
1433: @table @var
1434: @item return
1435: $B%j%9%H(B
1436: @item p
1437: $B?t(B
1438: @item f
1439: $BB?9`<0(B
1440: @item v
1441: $B%j%9%H(B
1442: @end table
1443:
1444: @itemize @bullet
1445: @item $B$3$NH!?t$O(B,
1446: @var{f}^s $B$N$_$?$9HyJ,J}Dx<0A4BN$r$b$H$a$k(B.
1447: @var{v} $B$OJQ?t$N%j%9%H$G$"$k(B. $B$3$3$G(B, s $B$O(B @var{v}[0] $B$G$"$j(B,
1448: @var{f} $B$OJQ?t(B @code{rest}(@var{v}) $B>e$NB?9`<0$G$"$k(B.
1449: @end itemize
1450: */
1451: /*&C-texi
1452: @example
1453: [595] sm1_genericAnn([x^3+y^3+z^3,[s,x,y,z]]);
1454: [-x*dx-y*dy-z*dz+3*s,z^2*dy-y^2*dz,z^2*dx-x^2*dz,y^2*dx-x^2*dy]
1455: @end example
1456: */
1457: /*&eg-texi
1458: @table @t
1459: @item Reference
1460: @code{sm1_start}
1461: @end table
1462: */
1463: /*&jp-texi
1464: @table @t
1465: @item $B;2>H(B
1466: @code{sm1_start}
1467: @end table
1468: */
1469:
1470:
1471: def sm1_genericAnn(F) {
1472: SM1_FIND_PROC(P);
1473: sm1_push_int0(P,F[0]);
1474: sm1_push_int0(P,F[1]);
1475: sm1(P, " genericAnn ");
1476: B = sm1_pop(P);
1477: return(B);
1478: }
1479:
1480: def sm1_tensor0(F) {
1481: SM1_FIND_PROC(P);
1482: sm1_push_int0(P,F);
1483: sm1(P, " tensor0 ");
1484: B = sm1_pop(P);
1485: return(B);
1486: }
1487:
1488: /*&eg-texi
1489: @c sort-sm1_wTensor0
1490: @menu
1491: * sm1_wTensor0::
1492: @end menu
1493: @node sm1_wTensor0,,, SM1 Functions
1494: @subsection @code{sm1_wTensor0}
1495: @findex sm1_wTensor0
1496: @table @t
1497: @item sm1_wTensor0([@var{f},@var{g},@var{v},@var{w}]|proc=@var{p})
1498: :: It computes the D-module theoretic 0-th tensor product
1499: of @var{f} and @var{g}.
1500: @end table
1501:
1502: @table @var
1503: @item return
1504: List
1505: @item p
1506: Number
1507: @item f, g, v, w
1508: List
1509: @end table
1510:
1511: @itemize @bullet
1512: @item
1513: It returns the D-module theoretic 0-th tensor product
1514: of @var{f} and @var{g}.
1515: @item
1516: @var{v} is a list of variables.
1517: @var{w} is a list of weights. The integer @var{w}[i] is
1518: the weight of the variable @var{v}[i].
1519: @item
1520: @code{sm1_wTensor0} calls @code{wRestriction0} of @code{ox_sm1},
1521: which requires a generic weight
1522: vector @var{w} to compute the restriction.
1523: If @var{w} is not generic, the computation fails.
1524: @item Let F and G be solutions of @var{f} and @var{g} respectively.
1525: Intuitively speaking, the 0-th tensor product is a system of
1526: differential equations which annihilates the function FG.
1527: @item The answer is a submodule of a free module D^r in general even if
1528: the inputs @var{f} and @var{g} are left ideals of D.
1529: @end itemize
1530: */
1531:
1532: /*&jp-texi
1533: @c sort-sm1_wTensor0
1534: @menu
1535: * sm1_wTensor0::
1536: @end menu
1537: @node sm1_wTensor0,,, SM1 $BH!?t(B
1538: @subsection @code{sm1_wTensor0}
1539: @findex sm1_wTensor0
1540: @table @t
1541: @item sm1_wTensor0([@var{f},@var{g},@var{v},@var{w}]|proc=@var{p})
1542: :: @var{f} $B$H(B @var{g} $B$N(B D-module $B$H$7$F$N(B 0 $B<!%F%s%=%k@Q$r(B
1543: $B7W;;$9$k(B.
1544: @end table
1545:
1546: @table @var
1547: @item return
1548: $B%j%9%H(B
1549: @item p
1550: $B?t(B
1551: @item f, g, v, w
1552: $B%j%9%H(B
1553: @end table
1554:
1555: @itemize @bullet
1556: @item
1557: @var{f} $B$H(B @var{g} $B$N(B
1558: D-$B2C72$H$7$F$N(B 0 $B<!%F%s%=%k@Q$r7W;;$9$k(B.
1559: @item
1560: @var{v} $B$OJQ?t$N%j%9%H$G$"$k(B.
1561: @var{w} $B$O(B weight $B$N%j%9%H$G$"$k(B.
1562: $B@0?t(B @var{w}[i] $B$OJQ?t(B @var{v}[i] $B$N(B weight $B$G$"$k(B.
1563: @item
1564: @code{sm1_wTensor0} $B$O(B @code{ox_sm1} $B$N(B @code{wRestriction0}
1565: $B$r$h$s$G$$$k(B.
1566: @code{wRestriction0} $B$O(B, generic $B$J(B weight $B%Y%/%H%k(B @var{w}
1567: $B$r$b$H$K$7$F@)8B$r7W;;$7$F$$$k(B.
1568: Weight $B%Y%/%H%k(B @var{w} $B$,(B generic $B$G$J$$$H7W;;$,%(%i!<$GDd;_$9$k(B.
1569: @item F $B$*$h$S(B G $B$r(B @var{f} $B$H(B @var{g} $B$=$l$>$l$N2r$H$9$k(B.
1570: $BD>4QE*$K$$$($P(B, 0 $B<!$N%F%s%=%k@Q$O(B $B4X?t(B FG $B$N$_$?$9HyJ,J}Dx<07O$G$"$k(B.
1571: @item $BF~NO(B @var{f}, @var{g} $B$,(B D $B$N:8%$%G%"%k$G$"$C$F$b(B,
1572: $B0lHL$K(B, $B=PNO$O<+M32C72(B D^r $B$NItJ,2C72$G$"$k(B.
1573: @end itemize
1574: */
1575: /*&C-texi
1576: @example
1577: [258] sm1_wTensor0([[x*dx -1, y*dy -4],[dx+dy,dx-dy^2],[x,y],[1,2]]);
1578: [[-y*x*dx-y*x*dy+4*x+y],[5*x*dx^2+5*x*dx+2*y*dy^2+(-2*y-6)*dy+3],
1579: [-25*x*dx+(-5*y*x-2*y^2)*dy^2+((5*y+15)*x+2*y^2+16*y)*dy-20*x-8*y-15],
1580: [y^2*dy^2+(-y^2-8*y)*dy+4*y+20]]
1581: @end example
1582: */
1583:
1584:
1585: def sm1_wTensor0(F) {
1586: SM1_FIND_PROC(P);
1587: sm1_push_int0(P,F);
1588: sm1(P, " wTensor0 ");
1589: B = sm1_pop(P);
1590: return(B);
1591: }
1592:
1593:
1594: /*&eg-texi
1595: @c sort-sm1_reduction
1596: @menu
1597: * sm1_reduction::
1598: @end menu
1599: @node sm1_reduction,,, SM1 Functions
1600: @subsection @code{sm1_reduction}
1601: @findex sm1_reduction
1602: @table @t
1603: @item sm1_reduction([@var{f},@var{g},@var{v},@var{w}]|proc=@var{p})
1604: ::
1605: @end table
1606:
1607: @table @var
1608: @item return
1609: List
1610: @item f
1611: Polynomial
1612: @item g, v, w
1613: List
1614: @item p
1615: Number (the process number of ox_sm1)
1616: @end table
1617:
1618: @itemize @bullet
1619: @item It reduces @var{f} by the set of polynomial @var{g}
1620: in the homogenized Weyl algebra; it applies the
1621: division algorithm to @var{f}. The set of variables is @var{v} and
1622: @var{w} is weight vectors to determine the order, which can be ommited.
1623: @code{sm1_reduction_noH} is for the Weyl algebra.
1624: @item The return value is of the form
1625: [r,c0,[c1,...,cm],[g1,...gm]] where @var{g}=[g1, ..., gm] and
1626: r/c0 + c1 g1 + ... + cm gm = 0.
1627: r/c0 is the normal form.
1628: @item The function reduction reduces reducible terms that appear
1629: in lower order terms.
1630: @item The functions
1631: sm1_reduction_d(P,F,G) and sm1_reduction_noH_d(P,F,G)
1632: are for distributed polynomials.
1633: @end itemize
1634: */
1635: /*&jp-texi
1636: @menu
1637: * sm1_reduction::
1638: @end menu
1639: @node sm1_reduction,,, SM1 $BH!?t(B
1640: @subsection @code{sm1_reduction}
1641: @findex sm1_reduction
1642: @table @t
1643: @item sm1_reduction([@var{f},@var{g},@var{v},@var{w}]|proc=@var{p})
1644: ::
1645: @end table
1646:
1647: @table @var
1648: @item return
1649: $B%j%9%H(B
1650: @item f
1651: $BB?9`<0(B
1652: @item g, v, w
1653: $B%j%9%H(B
1654: @item p
1655: $B?t(B (ox_sm1 $B$N%W%m%;%9HV9f(B)
1656: @end table
1657:
1658: @itemize @bullet
1659: @item $B$3$NH!?t$O(B @var{f} $B$r(B homogenized $B%o%$%kBe?t$K$*$$$F(B,
1660: $BB?9`<0=89g(B @var{g} $B$G4JC12=(B (reduce) $B$9$k(B; $B$D$^$j(B,
1661: $B$3$NH!?t$O(B, @var{f} $B$K3d;;%"%k%4%j%:%`$rE,MQ$9$k(B.
1662: $BJQ?t=89g$O(B @var{v} $B$G;XDj$9$k(B.
1663: @var{w} $B$O=g=x$r;XDj$9$k$?$a$N(B $B%&%(%$%H%Y%/%H%k$G$"$j(B,
1664: $B>JN,$7$F$b$h$$(B.
1665: @code{sm1_reduction_noH} $B$O(B, Weyl algebra $BMQ(B.
1666: @item $BLa$jCM$O<!$N7A$r$7$F$$$k(B:
1667: [r,c0,[c1,...,cm],[g1,...gm]] $B$3$3$G(B @var{g}=[g1, ..., gm] $B$G$"$j(B,
1668: r/c0 + c1 g1 + ... + cm gm = 0
1669: $B$,$J$j$?$D(B.
1670: r/c0 $B$,(B normal form $B$G$"$k(B.
1671: @item $B$3$NH!?t$O(B, $BDc<!9`$K$"$i$o$l$k(B reducible $B$J9`$b4JC12=$9$k(B.
1672: @item $BH!?t(B
1673: sm1_reduction_d(P,F,G) $B$*$h$S(B sm1_reduction_noH_d(P,F,G)
1674: $B$O(B, $BJ,;6B?9`<0MQ$G$"$k(B.
1675: @end itemize
1676: */
1677: /*&C-texi
1678: @example
1679: [259] sm1_reduction([x^2+y^2-4,[y^4-4*y^2+1,x+y^3-4*y],[x,y]]);
1680: [x^2+y^2-4,1,[0,0],[x+y^3-4*y,y^4-4*y^2+1]]
1681: [260] sm1_reduction([x^2+y^2-4,[y^4-4*y^2+1,x+y^3-4*y],[x,y],[[x,1]]]);
1682: [0,1,[-y^2+4,-x+y^3-4*y],[x+y^3-4*y,y^4-4*y^2+1]]
1683: @end example
1684: */
1685: /*&eg-texi
1686: @table @t
1687: @item Reference
1688: @code{sm1_start}, @code{sm1_find_proc}, @code{d_true_nf}
1689: @end table
1690: */
1691: /*&jp-texi
1692: @table @t
1693: @item $B;2>H(B
1694: @code{sm1_start}, @code{sm1_find_proc}, @code{d_true_nf}
1695: @end table
1696: */
1697:
1698: def sm1_reduction(A) {
1699: /* Example: sm1_reduction(A|proc=10) */
1700: SM1_FIND_PROC(P);
1701: /* check the arguments */
1702: if (type(A) != 4) {
1703: error("sm1_reduction(A|proc=p): A must be a list.");
1704: }
1705: AA = [rtostr(A[0])];
1706: AA = append(AA,[ map(rtostr,A[1]) ]);
1707: AA = append(AA, cdr(cdr(A)));
1708: sm1(P," /reduction*.noH 0 def ");
1709: sm1_push_int0(P,AA);
1710: sm1(P," reduction* ");
1711: ox_check_errors2(P);
1712: return(sm1_pop(P));
1713: }
1714:
1715: def sm1_reduction_noH(A) {
1716: /* Example: sm1_reduction(A|proc=10) */
1717: SM1_FIND_PROC(P);
1718: /* check the arguments */
1719: if (type(A) != 4) {
1720: error("sm1_reduction_noH(A|proc=p): A must be a list.");
1721: }
1722: AA = [rtostr(A[0])];
1723: AA = append(AA,[ map(rtostr,A[1]) ]);
1724: AA = append(AA, cdr(cdr(A)));
1725: sm1(P," /reduction*.noH 1 def ");
1726: sm1_push_int0(P,AA);
1727: sm1(P," reduction* ");
1728: ox_check_errors2(P);
1729: return(sm1_pop(P));
1730: }
1731:
1732: /*&eg-texi
1733: @menu
1734: * sm1_xml_tree_to_prefix_string::
1735: @end menu
1736: @node sm1_xml_tree_to_prefix_string,,, SM1 Functions
1737: @subsection @code{sm1_xml_tree_to_prefix_string}
1738: @findex sm1_xml_tree_to_prefix_string
1739: @table @t
1740: @item sm1_xml_tree_to_prefix_string(@var{s}|proc=@var{p})
1741: :: Translate OpenMath Tree Expression @var{s} in XML to a prefix notation.
1742: @end table
1743:
1744: @table @var
1745: @item return
1746: String
1747: @item p
1748: Number
1749: @item s
1750: String
1751: @end table
1752:
1753: @itemize @bullet
1754: @item It translate OpenMath Tree Expression @var{s} in XML to a prefix notation.
1755: @item This function should be moved to om_* in a future.
1756: @item @code{om_xml_to_cmo(OpenMath Tree Expression)} returns CMO_TREE.
1757: asir has not yet understood this CMO.
1758: @item @code{java} execution environment is required.
1759: (For example, @code{/usr/local/jdk1.1.8/bin} should be in the
1760: command search path.)
1761: @end itemize
1762: */
1763: /*&jp-texi
1764: @menu
1765: * sm1_xml_tree_to_prefix_string::
1766: @end menu
1767: @node sm1_xml_tree_to_prefix_string,,, SM1 $BH!?t(B
1768: @subsection @code{sm1_xml_tree_to_prefix_string}
1769: @findex sm1_xml_tree_to_prefix_string
1770: @table @t
1771: @item sm1_xml_tree_to_prefix_string(@var{s}|proc=@var{p})
1772: :: XML $B$G=q$+$l$?(B OpenMath $B$NLZI=8=(B @var{s} $B$rA0CV5-K!$K$J$*$9(B.
1773: @end table
1774:
1775: @table @var
1776: @item return
1777: String
1778: @item p
1779: Number
1780: @item s
1781: String
1782: @end table
1783:
1784: @itemize @bullet
1785: @item XML $B$G=q$+$l$?(B OpenMath $B$NLZI=8=(B @var{s} $B$rA0CV5-K!$K$J$*$9(B.
1786: @item $B$3$NH!?t$O(B om_* $B$K>-Mh0\$9$Y$-$G$"$k(B.
1787: @item @code{om_xml_to_cmo(OpenMath Tree Expression)} $B$O(B CMO_TREE
1788: $B$rLa$9(B. @code{asir} $B$O$3$N(B CMO $B$r$^$@%5%]!<%H$7$F$$$J$$(B.
1789: @item @code{java} $B$N<B9T4D6-$,I,MW(B.
1790: ($B$?$H$($P(B, /usr/local/jdk1.1.8/bin $B$r%3%^%s%I%5!<%A%Q%9$KF~$l$k$J$I(B.)
1791: @end itemize
1792: */
1793: /*&C-texi
1794: @example
1795: [263] load("om");
1796: 1
1797: [270] F=om_xml(x^4-1);
1798: control: wait OX
1799: Trying to connect to the server... Done.
1800: <OMOBJ><OMA><OMS name="plus" cd="basic"/><OMA>
1801: <OMS name="times" cd="basic"/><OMA>
1802: <OMS name="power" cd="basic"/><OMV name="x"/><OMI>4</OMI></OMA>
1803: <OMI>1</OMI></OMA><OMA><OMS name="times" cd="basic"/><OMA>
1804: <OMS name="power" cd="basic"/><OMV name="x"/><OMI>0</OMI></OMA>
1805: <OMI>-1</OMI></OMA></OMA></OMOBJ>
1806: [271] sm1_xml_tree_to_prefix_string(F);
1807: basic_plus(basic_times(basic_power(x,4),1),basic_times(basic_power(x,0),-1))
1808: @end example
1809: */
1810: /*&eg-texi
1811: @table @t
1812: @item Reference
1813: @code{om_*}, @code{OpenXM/src/OpenMath}, @code{eval_str}
1814: @end table
1815: */
1816: /*&jp-texi
1817: @table @t
1818: @item $B;2>H(B
1819: @code{om_*}, @code{OpenXM/src/OpenMath}, @code{eval_str}
1820: @end table
1821: */
1822:
1823:
1824: def sm1_xml_tree_to_prefix_string(A) {
1825: SM1_FIND_PROC(P);
1826: /* check the arguments */
1827: if (type(A) != 7) {
1828: error("sm1_xml_tree_to_prefix_string(A|proc=p): A must be a string.");
1829: }
1830: ox_push_cmo(P,A);
1831: sm1(P," xml_tree_to_prefix_string ");
1832: ox_check_errors2(P);
1833: return(ox_pop_cmo(P));
1834: }
1835:
1836:
1837: def sm1_wbf(A) {
1838: SM1_FIND_PROC(P);
1839: /* check the arguments */
1840: if (type(A) != 4) {
1841: error("sm1_wbf(A): A must be a list.");
1842: }
1843: if (length(A) != 3) {
1844: error("sm1_wbf(A): A must be a list of the length 3.");
1845: }
1846: if (type(A[0]) != 4 || type(A[1]) != 4 || type(A[2]) != 4) {
1847: error("sm1_wbf([A,B,C]): A, B, C must be a list.");
1848: }
1849: if (! (type(A[2][0]) == 7 || type(A[2][0]) == 2)) {
1850: error("sm1_wbf([A,B,C]): C must be of a form [v-name, v-weight, ...]");
1851: }
1852: sm1_push_int0(P,A);
1853: sm1(P," wbf ");
1854: ox_check_errors2(P);
1855: return(sm1_pop(P));
1856: }
1857: def sm1_wbfRoots(A) {
1858: SM1_FIND_PROC(P);
1859: /* check the arguments */
1860: if (type(A) != 4) {
1861: error("sm1_wbfRoots(A): A must be a list.");
1862: }
1863: if (length(A) != 3) {
1864: error("sm1_wbfRoots(A): A must be a list of the length 3.");
1865: }
1866: if (type(A[0]) != 4 || type(A[1]) != 4 || type(A[2]) != 4) {
1867: error("sm1_wbfRoots([A,B,C]): A, B, C must be a list.");
1868: }
1869: if (! (type(A[2][0]) == 7 || type(A[2][0]) == 2)) {
1870: error("sm1_wbfRoots([A,B,C]): C must be of a form [v-name, v-weight, ...]");
1871: }
1872: sm1_push_int0(P,A);
1873: sm1(P," wbfRoots ");
1874: ox_check_errors2(P);
1875: return(sm1_pop(P));
1876: }
1877:
1878:
1879: def sm1_res_div(A) {
1880: SM1_FIND_PROC(P);
1881: sm1_push_int0(P,[[A[0],A[1]],A[2]]);
1882: sm1(P," res*div ");
1883: ox_check_errors2(P);
1884: return(sm1_pop(P));
1885: }
1886:
1887:
1888: /*&eg-texi
1889: @c sort-sm1_syz
1890: @menu
1891: * sm1_syz::
1892: @end menu
1893: @node sm1_syz,,, SM1 Functions
1894: @node sm1_syz_d,,, SM1 Functions
1895: @subsection @code{sm1_syz}
1896: @findex sm1_syz
1897: @findex sm1_syz_d
1898: @table @t
1899: @item sm1_syz([@var{f},@var{v},@var{w}]|proc=@var{p})
1900: :: computes the syzygy of @var{f} in the ring of differential
1901: operators with the variable @var{v}.
1902: @end table
1903:
1904: @table @var
1905: @item return
1906: List
1907: @item p
1908: Number
1909: @item f, v, w
1910: List
1911: @end table
1912:
1913: @itemize @bullet
1914: @item
1915: The return values is of the form
1916: [@var{s},[@var{g}, @var{m}, @var{t}]].
1917: Here @var{s} is the syzygy of @var{f} in the ring of differential
1918: operators with the variable @var{v}.
1919: @var{g} is a Groebner basis of @var{f} with the weight vector @var{w},
1920: and @var{m} is a matrix that translates the input matrix @var{f} to the Gr\"obner
1921: basis @var {g}.
1922: @var{t} is the syzygy of the Gr\"obner basis @var{g}.
1923: In summary, @var{g} = @var{m} @var{f} and
1924: @var{s} @var{f} = 0 hold as matrices.
1925: @item
1926: The weight vectors are given by @var{w}, which can be omitted.
1927: If @var{w} is not given,
1928: the graded reverse lexicographic order will be used to compute Grobner basis.
1929: @item
1930: When a non-term order is given, the Grobner basis is computed in
1931: the homogenized Weyl algebra (See Section 1.2 of the book of SST).
1932: The homogenization variable h is automatically added.
1933: @end itemize
1934: */
1935: /*&jp-texi
1936: @c sort-sm1_syz
1937: @menu
1938: * sm1_syz::
1939: @end menu
1940: @node sm1_syz,,, SM1 $BH!?t(B
1941: @node sm1_syz_d,,, SM1 $BH!?t(B
1942: @subsection @code{sm1_syz}
1943: @findex sm1_syz
1944: @findex sm1_syz_d
1945: @table @t
1946: @item sm1_syz([@var{f},@var{v},@var{w}]|proc=@var{p})
1947: :: @var{v} $B>e$NHyJ,:nMQAG4D$K$*$$$F(B @var{f} $B$N(B syzygy $B$r7W;;$9$k(B.
1948: @end table
1949:
1950: @table @var
1951: @item return
1952: $B%j%9%H(B
1953: @item p
1954: $B?t(B
1955: @item f, v, w
1956: $B%j%9%H(B
1957: @end table
1958:
1959: @itemize @bullet
1960: @item
1961: $BLa$jCM$O<!$N7A$r$7$F$$$k(B:
1962: [@var{s},[@var{g}, @var{m}, @var{t}]].
1963: $B$3$3$G(B @var{s} $B$O(B @var{f} $B$N(B @var{v} $B$rJQ?t$H$9$kHyJ,:nMQAG4D$K$*$1$k(B
1964: syzygy $B$G$"$k(B.
1965: @var{g} $B$O(B @var{f} $B$N(B weight vector @var{w} $B$K4X$9$k%0%l%V%J4pDl$G$"$k(B.
1966: @var{m} $B$OF~NO9TNs(B @var{f} $B$r%0%l%V%J4pDl(B
1967: @var{g} $B$XJQ49$9$k9TNs$G$"$k(B.
1968: @var{t} $B$O%0%l%V%J4pDl(B @var{g} $B$N(B syzygy $B$G$"$k(B.
1969: $B$^$H$a$k$H(B, $B<!$NEy<0$,$J$j$?$D(B:
1970: @var{g} = @var{m} @var{f} ,
1971: @var{s} @var{f} = 0.
1972: @item
1973: Weight $B%Y%/%H%k(B @var{w} $B$O>JN,$7$F$h$$(B.
1974: $B>JN,$7$?>l9g(B, graded reverse lexicographic order $B$r$D$+$C$F(B
1975: $B%V%l%V%J4pDl$r7W;;$9$k(B.
1976: @item
1977: Term order $B$G$J$$=g=x$,M?$($i$l$?>l9g$O(B, $BF1<!2=%o%$%kBe?t$G%0%l%V%J4pDl$,7W;;$5$l$k(B (SST $B$NK\$N(B Section 1.2 $B$r8+$h(B).
1978: $BF1<!2=JQ?t(B @code{h} $B$,7k2L$K2C$o$k(B.
1979: @end itemize
1980: */
1981: /*&C-texi
1982: @example
1983: [293] sm1_syz([[x*dx+y*dy-1,x*y*dx*dy-2],[x,y]]);
1984: [[[y*x*dy*dx-2,-x*dx-y*dy+1]], generators of the syzygy
1985: [[[x*dx+y*dy-1],[y^2*dy^2+2]], grobner basis
1986: [[1,0],[y*dy,-1]], transformation matrix
1987: [[y*x*dy*dx-2,-x*dx-y*dy+1]]]]
1988: @end example
1989: */
1990: /*&C-texi
1991: @example
1992: [294]sm1_syz([[x^2*dx^2+x*dx+y^2*dy^2+y*dy-4,x*y*dx*dy-1],[x,y],[[dx,-1,x,1]]]);
1993: [[[y*x*dy*dx-1,-x^2*dx^2-x*dx-y^2*dy^2-y*dy+4]], generators of the syzygy
1994: [[[x^2*dx^2+h^2*x*dx+y^2*dy^2+h^2*y*dy-4*h^4],[y*x*dy*dx-h^4], GB
1995: [h^4*x*dx+y^3*dy^3+3*h^2*y^2*dy^2-3*h^4*y*dy]],
1996: [[1,0],[0,1],[y*dy,-x*dx]], transformation matrix
1997: [[y*x*dy*dx-h^4,-x^2*dx^2-h^2*x*dx-y^2*dy^2-h^2*y*dy+4*h^4]]]]
1998: @end example
1999: */
2000:
2001:
2002: def sm1_syz(A) {
2003: SM1_FIND_PROC(P);
2004: sm1_push_int0(P,A);
2005: sm1(P," syz ");
2006: ox_check_errors2(P);
2007: return(sm1_pop(P));
2008: }
2009:
2010: def sm1_res_solv(A) {
2011: SM1_FIND_PROC(P);
2012: sm1_push_int0(P,[[A[0],A[1]],A[2]]);
2013: sm1(P," res*solv ");
2014: ox_check_errors2(P);
2015: return(sm1_pop(P));
2016: }
2017:
2018: def sm1_res_solv_h(A) {
2019: SM1_FIND_PROC(P);
2020: sm1_push_int0(P,[[A[0],A[1]],A[2]]);
2021: sm1(P," res*solv*h ");
2022: ox_check_errors2(P);
2023: return(sm1_pop(P));
2024: }
2025:
2026:
2027: def sm1_mul(A,B,V) {
2028: SM1_FIND_PROC(P);
2029: sm1_push_int0(P,[[A,B],V]);
2030: sm1(P," res*mul ");
2031: ox_check_errors2(P);
2032: return(sm1_pop(P));
2033: }
2034:
2035: /*&eg-texi
2036: @menu
2037: * sm1_mul::
2038: @end menu
2039: @node sm1_mul,,, SM1 Functions
2040: @subsection @code{sm1_mul}
2041: @findex sm1_mul
2042: @table @t
2043: @item sm1_mul(@var{f},@var{g},@var{v}|proc=@var{p})
2044: :: ask the sm1 server to multiply @var{f} and @var{g} in the ring of differential operators over @var{v}.
2045: @end table
2046:
2047: @table @var
2048: @item return
2049: Polynomial or List
2050: @item p
2051: Number
2052: @item f, g
2053: Polynomial or List
2054: @item v
2055: List
2056: @end table
2057:
2058: @itemize @bullet
2059: @item Ask the sm1 server to multiply @var{f} and @var{g} in the ring of differential operators over @var{v}.
2060: @item @code{sm1_mul_h} is for homogenized Weyl algebra.
2061: @end itemize
2062: */
2063:
2064: /*&jp-texi
2065: @menu
2066: * sm1_mul::
2067: @end menu
2068: @node sm1_mul,,, SM1 $BH!?t(B
2069: @subsection @code{sm1_mul}
2070: @findex sm1_mul
2071: @table @t
2072: @item sm1_mul(@var{f},@var{g},@var{v}|proc=@var{p})
2073: :: sm1$B%5!<%P(B $B$K(B @var{f} $B$+$1$k(B @var{g} $B$r(B @var{v}
2074: $B>e$NHyJ,:nMQAG4D$G$d$C$F$/$l$k$h$&$KMj$`(B.
2075: @end table
2076:
2077: @table @var
2078: @item return
2079: $BB?9`<0$^$?$O%j%9%H(B
2080: @item p
2081: $B?t(B
2082: @item f, g
2083: $BB?9`<0$^$?$O%j%9%H(B
2084: @item v
2085: $B%j%9%H(B
2086: @end table
2087:
2088: @itemize @bullet
2089: @item sm1$B%5!<%P(B $B$K(B @var{f} $B$+$1$k(B @var{g} $B$r(B @var{v}
2090: $B>e$NHyJ,:nMQAG4D$G$d$C$F$/$l$k$h$&$KMj$`(B.
2091: @item @code{sm1_mul_h} $B$O(B homogenized Weyl $BBe?tMQ(B.
2092: @end itemize
2093: */
2094:
2095: /*&C-texi
2096:
2097: @example
2098: [277] sm1_mul(dx,x,[x]);
2099: x*dx+1
2100: [278] sm1_mul([x,y],[1,2],[x,y]);
2101: x+2*y
2102: [279] sm1_mul([[1,2],[3,4]],[[x,y],[1,2]],[x,y]);
2103: [[x+2,y+4],[3*x+4,3*y+8]]
2104: @end example
2105:
2106: */
2107:
2108:
2109:
2110: def sm1_mul_h(A,B,V) {
2111: SM1_FIND_PROC(P);
2112: sm1_push_int0(P,[[A,B],V]);
2113: sm1(P," res*mul*h ");
2114: ox_check_errors2(P);
2115: return(sm1_pop(P));
2116: }
2117:
2118: def sm1_adjoint(A,V) {
2119: SM1_FIND_PROC(P);
2120: sm1_push_int0(P,[A,V]);
2121: sm1(P," res*adjoint ");
2122: ox_check_errors2(P);
2123: return(sm1_pop(P));
2124: }
2125:
2126: def transpose(A) {
2127: if (type(A) == 4) {
2128: N = length(A); M = length(A[0]);
2129: B = newmat(N,M,A);
2130: C = newmat(M,N);
2131: for (I=0; I<N; I++) {
2132: for (J=0; J<M; J++) {
2133: C[J][I] = B[I][J];
2134: }
2135: }
2136: D = newvect(M);
2137: for (J=0; J<M; J++) {
2138: D[J] = C[J];
2139: }
2140: return(map(vtol,vtol(D)));
2141: }else{
2142: print(A)$
2143: error("tranpose: traspose for this argument has not been implemented.");
2144: }
2145: }
2146:
2147: def sm1_resol1(A) {
2148: SM1_FIND_PROC(P);
2149: sm1_push_int0(P,A);
2150: sm1(P," res*resol1 ");
2151: ox_check_errors2(P);
2152: return(sm1_pop(P));
2153: }
2154:
2155:
2156: def sm1_gcd_aux(A,B) {
2157: if (type(A) == 1 && type(B) == 1) return(igcd(A,B));
2158: else return(gcd(A,B));
2159: }
2160:
2161: def sm1_lcm_aux(V) { /* sm1_lcm_aux([3,5,6]); */
2162: N = length(V);
2163: if (N == 0) return(0);
2164: if (N == 1) return(V[0]);
2165: L = V[0];
2166: for (I=1; I<N; I++) {
2167: L = red(L*V[I]/sm1_gcd_aux(L,V[I]));
2168: }
2169: return(L);
2170: }
2171:
2172: def sm1_mul_v(V,S) {
2173: if (type(V) == 4) {
2174: return(map(sm1_mul_v,V,S));
2175: } else {
2176: return(V*S);
2177: }
2178: }
2179:
2180: def sm1_div_v(V,S) {
2181: if (type(V) == 4) {
2182: return(map(sm1_div_v,V,S));
2183: } else {
2184: return(V/S);
2185: }
2186: }
2187:
2188:
2189: def sm1_rat_to_p_aux(T) { /* cf. sm1_rat2plist2 */
2190: T = red(T);
2191: T1 = nm(T); T1a = ptozp(T1);
2192: T1b = red(T1a/T1);
2193: T2 = dn(T);
2194: return([T1a*dn(T1b),T2*nm(T1b)]);
2195: }
2196:
2197: def sm1_denom_aux0(A) {
2198: return(A[1]);
2199: }
2200: def sm1_num_aux0(P) {
2201: return(P[0]);
2202: }
2203:
2204: def sm1_rat_to_p(T) {
2205: if (type(T) == 4) {
2206: A = map(sm1_rat_to_p,T);
2207: D = map(sm1_denom_aux0,A);
2208: N = map(sm1_num_aux0,A);
2209: L = sm1_lcm_aux(D);
2210: B = newvect(length(N));
2211: for (I=0; I<length(N); I++) {
2212: B[I] = sm1_mul_v(N[I],L/D[I]);
2213: }
2214: return([vtol(B),L]);
2215: }else{
2216: return(sm1_rat_to_p_aux(T));
2217: }
2218: }
2219:
2220:
2221:
2222: /* ---------------------------------------------- */
2223: def sm1_distraction(A) {
2224: SM1_FIND_PROC(P);
2225: sm1_push_int0(P,A);
2226: sm1(P," distraction2* ");
2227: ox_check_errors2(P);
2228: return(sm1_pop(P));
2229: }
2230:
2231: /*&eg-texi
2232: @menu
2233: * sm1_distraction::
2234: @end menu
2235: @node sm1_distraction,,, SM1 Functions
2236: @subsection @code{sm1_distraction}
2237: @findex sm1_distraction
2238: @table @t
2239: @item sm1_distraction([@var{f},@var{v},@var{x},@var{d},@var{s}]|proc=@var{p})
2240: :: ask the @code{sm1} server to compute the distraction of @var{f}.
2241: @end table
2242:
2243: @table @var
2244: @item return
2245: List
2246: @item p
2247: Number
2248: @item f
2249: Polynomial
2250: @item v,x,d,s
2251: List
2252: @end table
2253:
2254: @itemize @bullet
2255: @item It asks the @code{sm1} server of the descriptor number @var{p}
2256: to compute the distraction of @var{f} in the ring of differential
2257: operators with variables @var{v}.
2258: @item @var{x} is a list of x-variables and @var{d} is that of d-variables
2259: to be distracted. @var{s} is a list of variables to express the distracted @var{f}.
2260: @item Distraction is roughly speaking to replace x*dx by a single variable x.
2261: See Saito, Sturmfels, Takayama : Grobner Deformations of Hypergeometric Differential Equations at page 68 for details.
2262: @end itemize
2263: */
2264:
2265: /*&jp-texi
2266: @menu
2267: * sm1_distraction::
2268: @end menu
2269: @node sm1_distraction,,, SM1 $BH!?t(B
2270:
2271: @subsection @code{sm1_distraction}
2272: @findex sm1_distraction
2273: @table @t
2274: @item sm1_distraction([@var{f},@var{v},@var{x},@var{d},@var{s}]|proc=@var{p})
2275: :: @code{sm1} $B$K(B @var{f} $B$N(B distraction $B$r7W;;$7$F$b$i$&(B.
2276: @end table
2277:
2278: @table @var
2279: @item return
2280: $B%j%9%H(B
2281: @item p
2282: $B?t(B
2283: @item f
2284: $BB?9`<0(B
2285: @item v,x,d,s
2286: $B%j%9%H(B
2287: @end table
2288:
2289: @itemize @bullet
2290: @item $B<1JL;R(B @var{p} $B$N(B @code{sm1} $B%5!<%P$K(B,
2291: @var{f} $B$N(B distraction $B$r(B @var{v} $B>e$NHyJ,:nMQAG4D$G7W;;$7$F$b$i$&(B.
2292: @item @var{x} , @var{d} $B$O(B, $B$=$l$>$l(B, distract $B$9$Y$-(B x $BJQ?t(B, d $BJQ?t$N(B
2293: $B%j%9%H(B. Distraction $B$7$?$i(B, @var{s} $B$rJQ?t$H$7$F7k2L$rI=$9(B.
2294: @item Distraction $B$H$$$&$N$O(B x*dx $B$r(B x $B$GCV$-49$($k$3$H$G$"$k(B.
2295: $B>\$7$/$O(B Saito, Sturmfels, Takayama : Grobner Deformations of Hypergeometric Differential Equations $B$N(B page 68 $B$r8+$h(B.
2296: @end itemize
2297: */
2298:
2299: /*&C-texi
2300:
2301: @example
2302: [280] sm1_distraction([x*dx,[x],[x],[dx],[x]]);
2303: x
2304: [281] sm1_distraction([dx^2,[x],[x],[dx],[x]]);
2305: x^2-x
2306: [282] sm1_distraction([x^2,[x],[x],[dx],[x]]);
2307: x^2+3*x+2
2308: [283] fctr(@@);
2309: [[1,1],[x+1,1],[x+2,1]]
2310: [284] sm1_distraction([x*dx*y+x^2*dx^2*dy,[x,y],[x],[dx],[x]]);
2311: (x^2-x)*dy+x*y
2312: @end example
2313: */
2314:
2315: /*&eg-texi
2316: @table @t
2317: @item Reference
2318: @code{distraction2(sm1)},
2319: @end table
2320: */
2321:
2322: /*&jp-texi
2323: @table @t
2324: @item $B;2>H(B
2325: @code{distraction2(sm1)},
2326: @end table
2327: */
2328:
2329: /* Temporary functions */
2330: /* Use this function for a while to wait a fix of asir. */
2331: def sm1_ntoint32(I) { /* Fixed */
2332: SM1_FIND_PROC(P);
2333: if (I >= 0) return(ntoint32(I));
2334: sm1(P," "+rtostr(I)+" ");
2335: return(ox_pop_cmo(P));
2336: }
2337: def sm1_to_ascii_array(S) { /* Use strtoascii */
2338: SM1_FIND_PROC(P);
2339: ox_push_cmo(P,S);
2340: sm1(P," (array) dc { (universalNumber) dc } map ");
2341: return(ox_pop_cmo(P));
2342: }
2343: def sm1_from_ascii_array(S) { /* Use asciitostr */
2344: SM1_FIND_PROC(P);
2345: ox_push_cmo(P,S);
2346: sm1(P," { (integer) dc (string) dc } map cat ");
2347: return(ox_pop_cmo(P));
2348: }
2349:
2350: /*
2351: [288] sm1_to_ascii_array("Hello");
2352: [72,101,108,108,111]
2353: [289] sm1_from_ascii_array(@@);
2354: Hello
2355: */
2356:
2357: /* end of temporary functions */
2358:
2359: def sm1_gkz(S) {
2360: SM1_FIND_PROC(P);
2361: A = S[0];
2362: B = S[1];
2363: AA = [ ];
2364: BB = [ ];
2365: for (I=0; I<length(A); I++) {
2366: AA = append(AA,[map(ntoint32,A[I])]);
2367: BB = append(BB,[ntoint32(0)]);
2368: }
2369: sm1(P,"[ ");
2370: sm1_push_int0(P,AA);
2371: sm1_push_int0(P,BB);
2372: sm1(P," ] gkz ");
2373: ox_check_errors2(P);
2374: R = sm1_pop(P);
2375: RR0 = map(eval_str,R[0]);
2376: RR1 = map(eval_str,R[1]);
2377: RR3 = [ ];
2378: for (I=0; I<length(B); I++) {
2379: RR3 = append(RR3,[ sm1_rat_to_p(RR0[I]-B[I])[0] ]);
2380: }
2381: for (I=length(B); I<length(RR0); I++) {
2382: RR3 = append(RR3,[RR0[I]]);
2383: }
2384: return([RR3,RR1]);
2385: }
2386:
2387:
2388: /*&eg-texi
2389: @menu
2390: * sm1_gkz::
2391: @end menu
2392: @node sm1_gkz,,, SM1 Functions
2393: @subsection @code{sm1_gkz}
2394: @findex sm1_gkz
2395: @table @t
2396: @item sm1_gkz([@var{A},@var{B}]|proc=@var{p})
2397: :: Returns the GKZ system (A-hypergeometric system) associated to the matrix
2398: @var{A} with the parameter vector @var{B}.
2399: @end table
2400:
2401: @table @var
2402: @item return
2403: List
2404: @item p
2405: Number
2406: @item A, B
2407: List
2408: @end table
2409:
2410: @itemize @bullet
2411: @item Returns the GKZ hypergeometric system
2412: (A-hypergeometric system) associated to the matrix
2413: @end itemize
2414: */
2415:
2416: /*&jp-texi
2417: @menu
2418: * sm1_gkz::
2419: @end menu
2420: @node sm1_gkz,,, SM1 $BH!?t(B
2421: @subsection @code{sm1_gkz}
2422: @findex sm1_gkz
2423: @table @t
2424: @item sm1_gkz([@var{A},@var{B}]|proc=@var{p})
2425: :: $B9TNs(B @var{A} $B$H%Q%i%a!<%?(B @var{B} $B$KIU?o$7$?(B GKZ $B7O(B (A-hypergeometric system) $B$r$b$I$9(B.
2426: @end table
2427:
2428: @table @var
2429: @item return
2430: $B%j%9%H(B
2431: @item p
2432: $B?t(B
2433: @item A, B
2434: $B%j%9%H(B
2435: @end table
2436:
2437: @itemize @bullet
2438: @item $B9TNs(B @var{A} $B$H%Q%i%a!<%?(B @var{B} $B$KIU?o$7$?(B GKZ $B7O(B (A-hypergeometric system) $B$r$b$I$9(B.
2439: @end itemize
2440: */
2441:
2442: /*&C-texi
2443:
2444: @example
2445:
2446: [280] sm1_gkz([ [[1,1,1,1],[0,1,3,4]], [0,2] ]);
2447: [[x4*dx4+x3*dx3+x2*dx2+x1*dx1,4*x4*dx4+3*x3*dx3+x2*dx2-2,
2448: -dx1*dx4+dx2*dx3,-dx2^2*dx4+dx1*dx3^2,dx1^2*dx3-dx2^3,-dx2*dx4^2+dx3^3],
2449: [x1,x2,x3,x4]]
2450:
2451: @end example
2452:
2453: */
2454:
2455:
2456: def sm1_appell1(S) {
2457: N = length(S)-2;
2458: B = cdr(cdr(S));
2459: A = S[0];
2460: C = S[1];
2461: V = [ ];
2462: for (I=0; I<N; I++) {
2463: V = append(V,[sm1aux_x(I+1)]);
2464: }
2465: Ans = [ ];
2466: Euler = 0;
2467: for (I=0; I<N; I++) {
2468: Euler = sm1aux_x(I+1)*sm1aux_dx(I+1) + Euler;
2469: }
2470: for (I=0; I<N; I++) {
2471: T = sm1_mul(sm1aux_dx(I+1), Euler+C-1,V)-
2472: sm1_mul(Euler+A, sm1aux_x(I+1)*sm1aux_dx(I+1)+B[I],V);
2473: /* Tmp=sm1_rat_to_p(T);
2474: print(Tmp[0]/Tmp[1]-T)$ */
2475: T = sm1_rat_to_p(T)[0];
2476: Ans = append(Ans,[T]);
2477: }
2478: for (I=0; I<N; I++) {
2479: for (J=I+1; J<N; J++) {
2480: T = (sm1aux_x(I+1)-sm1aux_x(J+1))*sm1aux_dx(I+1)*sm1aux_dx(J+1)
2481: - B[J]*sm1aux_dx(I+1) + B[I]*sm1aux_dx(J+1);
2482: /* Tmp=sm1_rat_to_p(T);
2483: print(Tmp[0]/Tmp[1]-T)$ */
2484: T = sm1_rat_to_p(T)[0];
2485: Ans = append(Ans,[T]);
2486: }
2487: }
2488: return([Ans,V]);
2489: }
2490:
2491:
2492: def sm1aux_dx(I) {
2493: return(strtov("dx"+rtostr(I)));
2494: }
2495: def sm1aux_x(I) {
2496: return(strtov("x"+rtostr(I)));
2497: }
2498:
2499:
2500:
2501: /*&eg-texi
2502: @menu
2503: * sm1_appell1::
2504: @end menu
2505: @node sm1_appell1,,, SM1 Functions
2506: @subsection @code{sm1_appell1}
2507: @findex sm1_appell1
2508: @table @t
2509: @item sm1_appell1(@var{a}|proc=@var{p})
2510: :: Returns the Appell hypergeometric system F_1 or F_D.
2511: @end table
2512:
2513: @table @var
2514: @item return
2515: List
2516: @item p
2517: Number
2518: @item a
2519: List
2520: @end table
2521:
2522: @itemize @bullet
2523: @item Returns the hypergeometric system for the Lauricella function
2524: F_D(a,b1,b2,...,bn,c;x1,...,xn)
2525: where @var{a} =(a,c,b1,...,bn).
2526: When n=2, the Lauricella function is called the Appell function F_1.
2527: The parameters a, c, b1, ..., bn may be rational numbers.
2528: @end itemize
2529: */
2530:
2531: /*&jp-texi
2532: @menu
2533: * sm1_appell1::
2534: @end menu
2535: @node sm1_appell1,,, SM1 $BH!?t(B
2536: @subsection @code{sm1_appell1}
2537: @findex sm1_appell1
2538: @table @t
2539: @item sm1_appell1(@var{a}|proc=@var{p})
2540: :: F_1 $B$^$?$O(B F_D $B$KBP1~$9$kJ}Dx<07O$rLa$9(B.
2541: @end table
2542:
2543: @table @var
2544: @item return
2545: $B%j%9%H(B
2546: @item p
2547: $B?t(B
2548: @item a
2549: $B%j%9%H(B
2550: @end table
2551:
2552: @itemize @bullet
2553: @item Appell $B$N4X?t(B F_1 $B$*$h$S(B $B$=$N(B n $BJQ?t2=$G$"$k(B Lauricella $B$N4X?t(B
2554: F_D(a,b1,b2,...,bn,c;x1,...,xn)
2555: $B$N$_$?$9HyJ,J}Dx<07O$rLa$9(B. $B$3$3$G(B,
2556: @var{a} =(a,c,b1,...,bn).
2557: $B%Q%i%a!<%?$OM-M}?t$G$b$h$$(B.
2558: @end itemize
2559: */
2560:
2561: /*&C-texi
2562:
2563: @example
2564:
2565: [281] sm1_appell1([1,2,3,4]);
2566: [[((-x1+1)*x2*dx1-3*x2)*dx2+(-x1^2+x1)*dx1^2+(-5*x1+2)*dx1-3,
2567: (-x2^2+x2)*dx2^2+((-x1*x2+x1)*dx1-6*x2+2)*dx2-4*x1*dx1-4,
2568: ((-x2+x1)*dx1+3)*dx2-4*dx1], equations
2569: [x1,x2]] the list of variables
2570:
2571: [282] sm1_gb(@@);
2572: [[((-x2+x1)*dx1+3)*dx2-4*dx1,((-x1+1)*x2*dx1-3*x2)*dx2+(-x1^2+x1)*dx1^2
2573: +(-5*x1+2)*dx1-3,(-x2^2+x2)*dx2^2+((-x2^2+x1)*dx1-3*x2+2)*dx2
2574: +(-4*x2-4*x1)*dx1-4,
2575: (x2^3+(-x1-1)*x2^2+x1*x2)*dx2^2+((-x1*x2+x1^2)*dx1+6*x2^2
2576: +(-3*x1-2)*x2+2*x1)*dx2-4*x1^2*dx1+4*x2-4*x1],
2577: [x1*dx1*dx2,-x1^2*dx1^2,-x2^2*dx1*dx2,-x1*x2^2*dx2^2]]
2578:
2579: [283] sm1_rank(sm1_appell1([1/2,3,5,-1/3]));
2580: 1
2581:
2582: [285] Mu=2$ Beta = 1/3$
2583: [287] sm1_rank(sm1_appell1([Mu+Beta,Mu+1,Beta,Beta,Beta]));
2584: 4
2585:
2586:
2587: @end example
2588:
2589: */
2590:
2591: def sm1_appell4(S) {
2592: N = length(S)-2;
2593: B = cdr(cdr(S));
2594: A = S[0];
2595: C = S[1];
2596: V = [ ];
2597: for (I=0; I<N; I++) {
2598: V = append(V,[sm1aux_x(I+1)]);
2599: }
2600: Ans = [ ];
2601: Euler = 0;
2602: for (I=0; I<N; I++) {
2603: Euler = sm1aux_x(I+1)*sm1aux_dx(I+1) + Euler;
2604: }
2605: for (I=0; I<N; I++) {
2606: T = sm1_mul(sm1aux_dx(I+1), sm1aux_x(I+1)*sm1aux_dx(I+1)+B[I]-1,V)-
2607: sm1_mul(Euler+A,Euler+C,V);
2608: /* Tmp=sm1_rat_to_p(T);
2609: print(Tmp[0]/Tmp[1]-T)$ */
2610: T = sm1_rat_to_p(T)[0];
2611: Ans = append(Ans,[T]);
2612: }
2613: return([Ans,V]);
2614: }
2615:
2616: /*&eg-texi
2617: @menu
2618: * sm1_appell4::
2619: @end menu
2620: @node sm1_appell4,,, SM1 Functions
2621: @subsection @code{sm1_appell4}
2622: @findex sm1_appell4
2623: @table @t
2624: @item sm1_appell4(@var{a}|proc=@var{p})
2625: :: Returns the Appell hypergeometric system F_4 or F_C.
2626: @end table
2627:
2628: @table @var
2629: @item return
2630: List
2631: @item p
2632: Number
2633: @item a
2634: List
2635: @end table
2636:
2637: @itemize @bullet
2638: @item Returns the hypergeometric system for the Lauricella function
2639: F_4(a,b,c1,c2,...,cn;x1,...,xn)
2640: where @var{a} =(a,b,c1,...,cn).
2641: When n=2, the Lauricella function is called the Appell function F_4.
2642: The parameters a, b, c1, ..., cn may be rational numbers.
2643: @end itemize
2644: */
2645:
2646: /*&jp-texi
2647: @menu
2648: * sm1_appell4::
2649: @end menu
2650: @node sm1_appell4,,, SM1 $BH!?t(B
2651: @subsection @code{sm1_appell4}
2652: @findex sm1_appell4
2653: @table @t
2654: @item sm1_appell4(@var{a}|proc=@var{p})
2655: :: F_4 $B$^$?$O(B F_C $B$KBP1~$9$kJ}Dx<07O$rLa$9(B.
2656: @end table
2657:
2658: @table @var
2659: @item return
2660: $B%j%9%H(B
2661: @item p
2662: $B?t(B
2663: @item a
2664: $B%j%9%H(B
2665: @end table
2666:
2667: @itemize @bullet
2668: @item Appell $B$N4X?t(B F_4 $B$*$h$S(B $B$=$N(B n $BJQ?t2=$G$"$k(B Lauricella $B$N4X?t(B
2669: F_C(a,b,c1,c2,...,cn;x1,...,xn)
2670: $B$N$_$?$9HyJ,J}Dx<07O$rLa$9(B. $B$3$3$G(B,
2671: @var{a} =(a,b,c1,...,cn).
2672: $B%Q%i%a!<%?$OM-M}?t$G$b$h$$(B.
2673: @end itemize
2674: */
2675:
2676: /*&C-texi
2677:
2678: @example
2679:
2680: [281] sm1_appell4([1,2,3,4]);
2681: [[-x2^2*dx2^2+(-2*x1*x2*dx1-4*x2)*dx2+(-x1^2+x1)*dx1^2+(-4*x1+3)*dx1-2,
2682: (-x2^2+x2)*dx2^2+(-2*x1*x2*dx1-4*x2+4)*dx2-x1^2*dx1^2-4*x1*dx1-2],
2683: equations
2684: [x1,x2]] the list of variables
2685:
2686: [282] sm1_rank(@@);
2687: 4
2688:
2689: @end example
2690:
2691: */
2692:
2693:
2694: def sm1_rank(A) {
2695: SM1_FIND_PROC(P);
2696: sm1_push_int0(P,A);
2697: sm1(P," rank toString .. ");
2698: ox_check_errors2(P);
2699: R = sm1_pop(P);
2700: return(R);
2701: }
2702:
2703: def sm1_rrank(A) {
2704: SM1_FIND_PROC(P);
2705: sm1_push_int0(P,A);
2706: sm1(P," rrank toString .. ");
2707: ox_check_errors2(P);
2708: R = sm1_pop(P);
2709: return(R);
2710: }
2711:
2712:
2713: /*&eg-texi
2714: @menu
2715: * sm1_rank::
2716: @end menu
2717: @node sm1_rank,,, SM1 Functions
2718: @subsection @code{sm1_rank}
2719: @findex sm1_rank
2720: @table @t
2721: @item sm1_rank(@var{a}|proc=@var{p})
2722: :: Returns the holonomic rank of the system of differential equations @var{a}.
2723: @end table
2724:
2725: @table @var
2726: @item return
2727: Number
2728: @item p
2729: Number
2730: @item a
2731: List
2732: @end table
2733:
2734: @itemize @bullet
2735: @item It evaluates the dimension of the space of holomorphic solutions
2736: at a generic point of the system of differential equations @var{a}.
2737: The dimension is called the holonomic rank.
2738: @item @var{a} is a list consisting of a list of differential equations and
2739: a list of variables.
2740: @item @code{sm1_rrank} returns the holonomic rank when @var{a} is regular
2741: holonomic. It is generally faster than @code{sm1_rank}.
2742: @end itemize
2743: */
2744:
2745: /*&jp-texi
2746: @menu
2747: * sm1_rank::
2748: @end menu
2749: @node sm1_rank,,, SM1 $BH!?t(B
2750: @subsection @code{sm1_rank}
2751: @findex sm1_rank
2752: @table @t
2753: @item sm1_rank(@var{a}|proc=@var{p})
2754: :: $BHyJ,J}Dx<07O(B @var{a} $B$N(B holonomic rank $B$rLa$9(B.
2755: @end table
2756:
2757: @table @var
2758: @item return
2759: $B?t(B
2760: @item p
2761: $B?t(B
2762: @item a
2763: $B%j%9%H(B
2764: @end table
2765:
2766: @itemize @bullet
2767: @item $BHyJ,J}Dx<07O(B @var{a} $B$N(B, generic point $B$G$N@5B'2r$N<!85$r(B
2768: $BLa$9(B. $B$3$N<!85$r(B, holonomic rank $B$H8F$V(B.
2769: @item @var{a} $B$OHyJ,:nMQAG$N%j%9%H$HJQ?t$N%j%9%H$h$j$J$k(B.
2770: @item @var{a} $B$,(B regular holonomic $B$N$H$-$O(B @code{sm1_rrank}
2771: $B$b(B holonomic rank $B$rLa$9(B.
2772: $B$$$C$Q$s$K$3$N4X?t$NJ}$,(B @code{sm1_rank} $B$h$jAa$$(B.
2773: @end itemize
2774: */
2775:
2776: /*&C-texi
2777:
2778: @example
2779:
2780: [284] sm1_gkz([ [[1,1,1,1],[0,1,3,4]], [0,2] ]);
2781: [[x4*dx4+x3*dx3+x2*dx2+x1*dx1,4*x4*dx4+3*x3*dx3+x2*dx2-2,
2782: -dx1*dx4+dx2*dx3, -dx2^2*dx4+dx1*dx3^2,dx1^2*dx3-dx2^3,-dx2*dx4^2+dx3^3],
2783: [x1,x2,x3,x4]]
2784: [285] sm1_rrank(@@);
2785: 4
2786:
2787: [286] sm1_gkz([ [[1,1,1,1],[0,1,3,4]], [1,2]]);
2788: [[x4*dx4+x3*dx3+x2*dx2+x1*dx1-1,4*x4*dx4+3*x3*dx3+x2*dx2-2,
2789: -dx1*dx4+dx2*dx3,-dx2^2*dx4+dx1*dx3^2,dx1^2*dx3-dx2^3,-dx2*dx4^2+dx3^3],
2790: [x1,x2,x3,x4]]
2791: [287] sm1_rrank(@@);
2792: 5
2793:
2794: @end example
2795:
2796: */
2797:
2798: def sm1_auto_reduce(T) {
2799: SM1_FIND_PROC(P);
2800: sm1(P,"[(AutoReduce) "+rtostr(T)+" ] system_variable ");
2801: ox_check_errors2(P);
2802: R = sm1_pop(P);
2803: return(R);
2804: }
2805:
2806: /*&eg-texi
2807: @menu
2808: * sm1_auto_reduce::
2809: @end menu
2810: @node sm1_auto_reduce,,, SM1 Functions
2811: @subsection @code{sm1_auto_reduce}
2812: @findex sm1_auto_reduce
2813: @table @t
2814: @item sm1_auto_reduce(@var{s}|proc=@var{p})
2815: :: Set the flag "AutoReduce" to @var{s}.
2816: @end table
2817:
2818: @table @var
2819: @item return
2820: Number
2821: @item p
2822: Number
2823: @item s
2824: Number
2825: @end table
2826:
2827: @itemize @bullet
2828: @item If @var{s} is 1, then all Grobner bases to be computed
2829: will be the reduced Grobner bases.
2830: @item If @var{s} is 0, then Grobner bases are not necessarily the reduced
2831: Grobner bases. This is the default.
2832: @end itemize
2833: */
2834:
2835: /*&jp-texi
2836: @menu
2837: * sm1_auto_reduce::
2838: @end menu
2839: @node sm1_auto_reduce,,, SM1 $BH!?t(B
2840: @subsection @code{sm1_auto_reduce}
2841: @findex sm1_auto_reduce
2842: @table @t
2843: @item sm1_auto_reduce(@var{s}|proc=@var{p})
2844: :: $B%U%i%0(B "AutoReduce" $B$r(B @var{s} $B$K@_Dj(B.
2845: @end table
2846:
2847: @table @var
2848: @item $BLa$jCM(B
2849: $B?t(B
2850: @item p
2851: $B?t(B
2852: @item s
2853: $B?t(B
2854: @end table
2855:
2856: @itemize @bullet
2857: @item @var{s} $B$,(B 1 $B$N$H$-(B, $B0J8e7W;;$5$l$k%0%l%V%J4pDl$O$9$Y$F(B,
2858: reduced $B%0%l%V%J4pDl$H$J$k(B.
2859: @item @var{s} $B$,(B 0 $B$N$H$-(B, $B7W;;$5$l$k%0%l%V%J4pDl$O(B
2860: reduced $B%0%l%V%J4pDl$H$O$+$.$i$J$$(B. $B$3$A$i$,%G%U%)!<%k%H(B.
2861: @end itemize
2862: */
2863:
2864:
2865: def sm1_slope(II,V,FF,VF) {
2866: SM1_FIND_PROC(P);
2867: A =[II,V,FF,VF];
2868: sm1_push_int0(P,A);
2869: sm1(P," slope toString ");
2870: ox_check_errors2(P);
2871: R = eval_str(sm1_pop(P));
2872: return(R);
2873: }
2874:
2875:
2876: /*&eg-texi
2877: @menu
2878: * sm1_slope::
2879: @end menu
2880: @node sm1_slope,,, SM1 Functions
2881: @subsection @code{sm1_slope}
2882: @findex sm1_slope
2883: @table @t
2884: @item sm1_slope(@var{ii},@var{v},@var{f_filtration},@var{v_filtration}|proc=@var{p})
2885: :: Returns the slopes of differential equations @var{ii}.
2886: @end table
2887:
2888: @table @var
2889: @item return
2890: List
2891: @item p
2892: Number
2893: @item ii
2894: List (equations)
2895: @item v
2896: List (variables)
2897: @item f_filtration
2898: List (weight vector)
2899: @item v_filtration
2900: List (weight vector)
2901: @end table
2902:
2903: @itemize @bullet
2904: @item @code{sm1_slope} returns the (geometric) slopes
2905: of the system of differential equations @var{ii}
2906: along the hyperplane specified by
2907: the V filtration @var{v_filtration}.
2908: @item @var{v} is a list of variables.
2909: @item As to the algorithm,
2910: see "A.Assi, F.J.Castro-Jimenez and J.M.Granger,
2911: How to calculate the slopes of a D-module, Compositio Math, 104, 1-17, 1996"
2912: Note that the signs of the slopes are negative, but the absolute values
2913: of the slopes are returned.
2914: @item The return value is a list of lists.
2915: The first entry of each list is the slope and the second entry
2916: is the weight vector for which the microcharacteristic variety is
2917: not bihomogeneous.
2918: @end itemize
2919: */
2920:
2921: /*&jp-texi
2922: @menu
2923: * sm1_slope::
2924: @end menu
2925: @node sm1_slope,,, SM1 $BH!?t(B
2926: @subsection @code{sm1_slope}
2927: @findex sm1_slope
2928: @table @t
2929: @item sm1_slope(@var{ii},@var{v},@var{f_filtration},@var{v_filtration}|proc=@var{p})
2930: :: $BHyJ,J}Dx<07O(B @var{ii} $B$N(B slope $B$rLa$9(B.
2931: @end table
2932:
2933: @table @var
2934: @item return
2935: $B?t(B
2936: @item p
2937: $B?t(B
2938: @item ii
2939: $B%j%9%H(B ($BJ}Dx<0(B)
2940: @item v
2941: $B%j%9%H(B ($BJQ?t(B)
2942: @item f_filtration
2943: $B%j%9%H(B (weight vector)
2944: @item v_filtration
2945: $B%j%9%H(B (weight vector)
2946: @end table
2947:
2948: @itemize @bullet
2949: @item @code{sm1_slope} $B$O(B
2950: $BHyJ,J}Dx<07O(B @var{ii} $B$N(B V filtration @var{v_filtration}
2951: $B$G;XDj$9$kD6J?LL$K1h$C$F$N(B (geomeric) slope $B$r7W;;$9$k(B.
2952: @item @var{v} $B$OJQ?t$N%j%9%H(B.
2953: @item $B;HMQ$7$F$$$k%"%k%4%j%:%`$K$D$$$F$O(B,
2954: "A.Assi, F.J.Castro-Jimenez and J.M.Granger,
2955: How to calculate the slopes of a D-module, Compositio Math, 104, 1-17, 1996"
2956: $B$r$_$h(B.
2957: Slope $B$NK\Mh$NDj5A$G$O(B, $BId9f$,Ii$H$J$k$,(B, $B$3$N%W%m%0%i%`$O(B,
2958: Slope $B$N@dBPCM$rLa$9(B.
2959: @item $BLa$jCM$O(B, $B%j%9%H$r@.J,$H$9$k%j%9%H$G$"$k(B.
2960: $B@.J,%j%9%H$NBh(B 1 $BMWAG$,(B slope, $BBh(B 2 $BMWAG$O(B, $B$=$N(B weight vector $B$KBP1~$9$k(B
2961: microcharacteristic variety $B$,(B bihomogeneous $B$G$J$$(B.
2962: @end itemize
2963: */
2964:
2965: /*&C-texi
2966:
2967: @example
2968:
2969: [284] A= sm1_gkz([ [[1,2,3]], [-3] ]);
2970:
2971:
2972: [285] sm1_slope(A[0],A[1],[0,0,0,1,1,1],[0,0,-1,0,0,1]);
2973:
2974: [286] A2 = sm1_gkz([ [[1,1,1,0],[2,-3,1,-3]], [1,0]]);
2975: (* This is an interesting example given by Laura Matusevich,
2976: June 9, 2001 *)
2977:
2978: [287] sm1_slope(A2[0],A2[1],[0,0,0,0,1,1,1,1],[0,0,0,-1,0,0,0,1]);
2979:
2980:
2981: @end example
2982:
2983: */
2984: /*&eg-texi
2985: @table @t
2986: @item Reference
2987: @code{sm_gb}
2988: @end table
2989: */
2990: /*&jp-texi
2991: @table @t
2992: @item $B;2>H(B
2993: @code{sm_gb}
2994: @end table
2995: */
2996:
2997:
2998: end$
2999:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>