Annotation of OpenXM/src/kan96xx/Doc/oxasir.sm1, Revision 1.11
1.11 ! takayama 1: % $OpenXM: OpenXM/src/kan96xx/Doc/oxasir.sm1,v 1.10 2002/09/30 02:01:37 takayama Exp $
1.1 maekawa 2: %% kxx/oxasir.sm1 1998, 2/12 (this version is at Old/oxasir.sm1.19980212
3: %% 3/1, 1995, 11/5, 11/21
4: %% This file is error clean.
5: %%%%%%% How to install.
6: %%% Set ASIR_LIBDIR if necessary. Ex. /u/nobuki/lib/asir
1.7 takayama 7: %%% write ~/.asirrc : load("gr")$ load("primdec")$ load("bfct")$ end$
8: %%% or it is written in OpenXM/rc/asirrc in OpenXM env, it's fine.
1.1 maekawa 9: %%% oxasir.asir must be in
10: %%% LOAD_SM1_PATH or oxasirpath.asirlib
11: %%% Edit below
12: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
13: %%% /usr/local/lib/sm1, SM1_LOAD_PATH, /usr/local/lib/asir, ASIR_LOAD_PATH
14: /oxasirpath.oxasir (ox_asir) def %% loadmethod is 1
15: /oxasirpath.asirlib (oxasir.asir) def
16:
17: /ox_asirConnectMethod { asirconnectr /oxasir.ccc set } def
18: %/ox_asirConnectMethod { asirconnect2 } def
19:
20: %% Old path
21: %/oxasirpath.oxasir (/home/nobuki/kxx/ox_asir) def %% loadmethod is 1
22: %/oxasirpath.asirlib (/home/nobuki/kxx/oxasir.asir) def
23: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
24: /oxasir.loadmethod 1 def %% "..." oxsendcmo (load) ox...
25: %/oxasir.loadmethod 0 def %% load("..."); %% at MSRI
26: %%%%%%%%%%%%%%%% end of configuration.
27: /initializePathNamesForOxAsir {
28: [oxasirpath.oxasir] getPathNameAsir /oxasirpath.oxasir set
29: [oxasirpath.asirlib] getPathNameSm1 /oxasirpath.asirlib set
30: } def
31:
32:
33: /oxasir.verbose 0 def
34: /oxasir.version (2.981105) def
35: oxasir.version [(Version)] system_variable gt
36: { [(This package requires the latest version of kan/sm1) nl
37: (Please get it from http://www.math.kobe-u.ac.jp/KAN) ] cat
38: error
39: } { } ifelse
40: (oxasir.sm1, --- open asir protocol module 3/1 1998, 6/5 1999) message-quiet
41: ( asirconnect, asir, fctr, primadec, (C) M.Noro, N.Takayama ) message-quiet
42:
43: /oxasir.ccc load isArray
44: { }
45: { /oxasir.ccc [ ] def } ifelse
46:
47: [(parse) (ox.sm1) pushfile] extension pop
48: oxasir.verbose {
49: (type in asirconnect to connect, asir is used to execute asir command. )
50: message
51: (type in asirconnect2 to open a new window for ox_asir, connect, asir is used to execute asir command [you need to edit asirconnect2 to tell the path to load ox_asir] )
52: message
53: } { } ifelse
54:
55: /loadAsirFile {
56: /arg1 set
57: [/in-loadAsirFile /peer /fname] pushVariables
58: [
59: /peer arg1 0 get def
60: /fname arg1 1 get def
61: oxasir.loadmethod {
62: peer fname oxsendcmo peer 1 oxsendcmo
63: peer (load) oxexec
64: }{
65: peer [$load("$ fname $");$] cat oxsubmit
66: }ifelse
67: ] pop
68: popVariables
69: } def
70: [(loadAsirFile)
71: [$[client fname] loadAsirFile (ox_asir function)$
72: $Load a file into the client$
73: ]] putUsages
74:
75: /asirinit {
76: %% gr and primdec are loaded by .asirrc
77: /asirinit.peer set
1.4 takayama 78: [(ostype)] extension 0 get (windows) eq {
1.6 takayama 79: [(getenv) (OSTYPE)] extension tag 0 eq {
80: [asirinit.peer (oxasir-win.rr)] oxasirParseFile
81: }{
1.5 takayama 82: [(getenv) (OSTYPE)] extension (cygwin) eq {
83: [asirinit.peer oxasirpath.asirlib] loadAsirFile
84: }{
85: [asirinit.peer (oxasir-win.rr)] oxasirParseFile
86: } ifelse
1.6 takayama 87: } ifelse
1.4 takayama 88: }{
89: [asirinit.peer oxasirpath.asirlib] loadAsirFile
1.11 ! takayama 90: } ifelse
! 91: asirinit.peer oxmathcap
! 92: asirinit.peer oxsetmathcap
1.1 maekawa 93: } def
94: /asirconnect {
95: [(localhost) 1300 1200] oxconnect /oxasir.ccc set
96: /ccc oxasir.ccc def %% for compatibility.
97: oxasir.ccc asirinit
98: } def
99: /asirconnect2 {
100: [oxpath.oxlog.xterm oxpath.ox ( -ox ) oxasirpath.oxasir
101: oxpath.null
1.2 takayama 102: ( & )] cat system-csh
103: % (xterm -e /home/nobuki/kxx/ox -ox /home/nobuki/kxx/ox_asir &) system-csh
104: % (kterm -iconic -e /home/nobuki/kxx/ox -ox /home/nobuki/kxx/ox_asir &) system-csh
1.1 maekawa 105: % For MSRI
106: % Eterm is also nice (including kanji). rxvt is also nice.
1.2 takayama 107: %(xterm -icon -e /u/nobuki/tmp/kxx/ox -ox /u/nobuki/tmp/Ox/ox_asir2 &) system-csh
108: %(kterm2 -e /u/nobuki/tmp/kxx/ox -ox /u/nobuki/tmp/Ox/ox_asir2 &) system-csh
1.1 maekawa 109: % (If you start the server automatically, you may have a trouble to) message
110: % (oxreset. In order to avoid this trouble, start the server by hand.) message
1.2 takayama 111: (sleep 5) system-csh
1.1 maekawa 112: [(localhost) 1300 1200] oxconnect /oxasir.ccc set
113: /ccc oxasir.ccc def %% for compatibility.
114: oxasir.ccc asirinit
115: } def
116:
117: [(asirconnect2)
118: [(asirconnect2 starts ox_asir server. (ox_asir function))
119: (Open xxx protocol is used for the communication between sm1 and ox_asir.)
120: (cf. oxhelp, asir.)
121: (You need to install ox_asir server to use this function. cf. oxasir)
122: ]] putUsages
123:
124: /asirconnect3 {
125: [oxpath.oxlog.xterm oxpath.ox ( -ox ) oxasirpath.oxasir
126: ( -data 2300 -control 2200) oxpath.null
1.2 takayama 127: ( & )] cat system-csh
1.1 maekawa 128: % (If you start the server automatically, you may have a trouble to) message
129: % (oxreset. In order to avoid this trouble, start the server by hand.) message
1.2 takayama 130: (sleep 5) system-csh
1.1 maekawa 131: [(localhost) 2300 2200] oxconnect /oxasir.ccc2 set
132: /ccc2 oxasir.ccc2 def %% for compatibility.
133: oxasir.ccc2 asirinit
134: (The client is stored in oxasir.ccc2.) message
135: } def
136:
137: [(asir)
138: [(pid [asir-command, asir-arg1, asir-arg2, ...] asir result (ox_asir function))
139: (Call open asir server. You need to install ox_asir on your system)
140: (to use this function. cf. primadec, fctr, asirconnect2, asirconnectr.)
141: (If you interrupted the computation by typing ctrl-C, type in )
142: ( oxasir.ccc oxreset ; )
143: (to interrupt the ox_asir server.)
144: (Example: oxasir.ccc [(fctr) (x^10-1).] asir )
145: ( )
146: (This function requires plugins cmo, socket and ox_asir server. cf. oxasir)
147: (See, ftp://endeavor.fujitsu.co.jp/pub/isis/asir on asir)
148: ]
149: ] putUsages
150:
151: /asir {
152: /arg2 set
153: /arg1 set
154: [/pid /asir-comm /comm /n /i /rr] pushVariables
155: [(CurrentRingp)] pushEnv
156: [
157: /pid arg1 def
158: /asir-comm arg2 def
159: pid tag 6 eq { } { (Invalid pid. See asir.) error } ifelse
160: pid 0 get (client) eq { } { (Invalid pid. See asir.) error } ifelse
161: asir-comm tag 6 eq { } { (Invalid argument asir-comm. See asir) error } ifelse
162:
163: [ %% Change the current ring if necessary to send a correct OxVlist.
164: asir-comm oxasir.changeRing
165: ] pop
166: %%% Setting OxVlist to tell asir a way to change dist-poly <==> poly.
167: (OxVlist=) getVlist2 toString (;) 3 cat_n /comm set
168: %% comm message
169: pid comm oxsubmit
170: pid (print(OxVlist);) oxsubmit
171:
172:
173: /n asir-comm length def
174: n 1 sub -1 1 {
175: /i set
176: pid asir-comm i get oxsendcmo
177: pid 1 oxsendcmo pid (ox_dtop) oxexec
178: } for
179: pid n 1 sub oxsendcmo
180: pid asir-comm 0 get oxexec
181:
182: pid 1 oxsendcmo pid (ox_ptod) oxexec
183: pid oxpopcmo /arg1 set
184:
185:
186: ] pop
187: popEnv
188: popVariables
189: arg1
190: } def
191:
192: /oxasir.changeRing {
193: /arg1 set
194: [/in-oxasir.changeRing /f /rr] pushVariables
195: [
196: /f arg1 def
197: f isArray {
198: f {oxasir.changeRing} map
199: }{
200: f isPolynomial {
201: f (0). eq { }
202: { f (ring) dc /rr set [(CurrentRingp) rr] system_variable } ifelse
203: } { } ifelse
204: } ifelse
205: ] pop
206: popVariables
207: } def
208:
209: /fctr {
210: /arg1 set
211: [/f /comm /vv] pushVariables
212: [(CurrentRingp)] pushEnv
213: [
214: /f arg1 def
215: oxasir.ccc [ ] eq {
216: (Starting ox_asir server.) message
217: ox_asirConnectMethod
218: } { } ifelse
219:
220: f isPolynomial not {
221: /vv f 1 get def
222: vv isArray { /vv vv from_records def } { } ifelse
223: /f f 0 get def
224: [vv ring_of_polynomials 0] define_ring
225: f . /f set
226: }{ } ifelse
227: oxasir.ccc [(fctr) f] asir /arg1 set
228: ] pop
229: popEnv
230: popVariables
231: arg1
232: } def
233:
234: [(fctr)
235: [(You need to install ox_asir server to use this function. (ox_asir function))
236: (f fctr g)
237: (poly f; array g;)
238: ([f v] fctr g ; string f, string or array of string v)
239: (This function factors the polynomial f over Q.)
240: ( )
241: (Example 1: [(x^10-y^10) (x,y)] fctr ::)
242: (Example 2: (x^10-1). fctr ::)
243: ( )
244: (If you interrupted the computation by typing ctrl-C, type in )
245: ( oxasir.ccc oxreset ; )
246: (to interrupt the ox_asir server.)
247: ( )
248: (This function requires plugins cmo, socket and ox_asir server. cf.oxasir)
249: ]] putUsages
250:
251:
252: [(primadec)
253: [(You need to install ox_asir server to use this function. (ox_asir function))
254: ([ ii ] primadec [[q1 p1] [q2 p2] ... ] )
255: ( array of poly ii; array of poly q1, p1, q2, p2 ...;)
256: ( q1, q2, ... are primary components of the primary ideal decomposition)
257: ( of the ideal generated by << ii >>.)
258: ( )
259: ([ ii v ] primadec [[q1 p1] [q2 p2] ... ] )
260: ( array of poly or string ii; array of string v; array of poly q1, p1, q2, p2 ...;)
261: (<< v >> is an array of independent variables.)
262: ( )
263: ([ ii v ] primadec [[q1 p1] [q2 p2] ... ] )
264: ( array of poly or string ii; array of string v; array of poly q1, p1, q2, p2 ...;)
265: ( v is a string of variables separated by , )
266: ( )
267: (Example: [(x,y) ring_of_polynomials 0] define_ring)
268: ( [ [(x^2-1). (x y).] ] primadec pmat ;)
269: ( )
270: (Example: [ [(x^2-1) (x y)] [(x) (y)]] primadec pmat ;)
271: ( )
272: (If you interrupted the computation by typing ctrl-C, type in )
273: ( oxasir.ccc oxreset ; )
274: (to interrupt the ox_asir server.)
275: ( )
276: (This function requires plugins cmo, socket and ox_asir server. cf.oxasir)
277: ]] putUsages
278:
279: /primadec {
280: /arg1 set
281: [/in-primadec /aa /f /comm /vvv /r /setarg] pushVariables
282: [(CurrentRingp)] pushEnv
283: [
284: /aa arg1 def
285: aa isArray { } { (<<array>> primadec) error } ifelse
286: /setarg 0 def
287: oxasir.ccc [ ] eq {
288: (Starting ox_asir server.) message
289: ox_asirConnectMethod
290: } { } ifelse
291: aa { tag } map /typev set
292: typev [ ArrayP ] eq
293: { /f aa 0 get def
294: f 0 get (ring) dc /r set
295: [(CurrentRingp) r] system_variable
296: /vvv getVariableNames def
297: /setarg 1 def
298: } { } ifelse
299: typev [ArrayP StringP] eq
300: { /f aa 0 get def
301: /vvv [ aa 1 get to_records pop ] def
302: /setarg 1 def
303: } { } ifelse
304: typev [ArrayP ArrayP] eq
305: { /f aa 0 get def
306: /vvv aa 1 get {toString} map def
307: /setarg 1 def
308: } { } ifelse
309: setarg { } { (primadec : Argument mismatch) error } ifelse
310:
311: f 0 get isPolynomial {
312: /r f 0 get (ring) dc def
313: /vvv vvv { r ,, } map def
314: }
315: {
316: [vvv from_records ring_of_polynomials 0] define_ring
317: f { toString . } map /f set
318: vvv { . } map /vvv set
319: } ifelse
320: oxasir.ccc [(primadec) f vvv] asir /arg1 set
321: ] pop
322: popEnv
323: popVariables
324: arg1
325: } def
326:
327:
328: /getVlist2 {
329: [/n /i ] pushVariables
330: [
331: /n [(N)] system_variable def
332: [
333: 0 1 n 1 sub { /i set (x) i (dollar) dc 2 cat_n } for
334: 0 1 n 1 sub { /i set (d) i (dollar) dc 2 cat_n } for
335: ] /arg1 set
336: ] pop
337: popVariables
338: arg1
339: } def
340:
341: %%%%%%%%%%%%%%%%%%%
342: /getVlist {
343: [/n /i ] pushVariables
344: [
345: /n [(N)] system_variable def
346: [
347: 0 1 n 1 sub { /i set [(x) (var) i] system_variable } for
348: 0 1 n 1 sub { /i set [(D) (var) i] system_variable } for
349: ] /arg1 set
350: ] pop
351: popVariables
352: arg1
353: } def
354:
355: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
356: [(chattr) 0 /findIntegralRoots] extension pop
357: oxasir.verbose {
358: (Overloaded on findIntegralRoots.) message
359: } { } ifelse
360: /findIntegralRoots {
361: /arg1 set
362: [/in-findIntegralRoots /pp ] pushVariables
363: [
364: /pp arg1 def
365: oxasir.ccc [ ] eq {
366: (Starting ox_asir server.) message
367: ox_asirConnectMethod
368: } { } ifelse
369: oxasir.ccc oxIsServerReady
370: { pp findIntegralRoots.oxasir /arg1 set}
371: { pp findIntegralRoots.slow /arg1 set} ifelse
372: ] pop
373: popVariables
374: arg1
375: } def
376:
377: /findIntegralRoots.oxasir {
378: /arg1 set
379: [/in-findIntegralRoots /f /r /g /aa /rlist] pushVariables
380: [(CurrentRingp) (KanGBmessage)] pushEnv
381: [
382: /f arg1 def
383: [(s) ring_of_polynomials 0] define_ring
384: f toString . /f set
385: f fctr rest /g set
386: g {
387: 0 get /aa set
388: aa (s). degree 1 eq {
389: aa (s). coeff 1 get /aa set
390: aa length 1 eq { 0 }
391: { aa 0 get (1). eq {
392: 0 << aa 1 get (integer) dc >> sub
393: } { } ifelse
394: } ifelse
395: }{ } ifelse
396: } map
397: /rlist set
398: %% rlist ::
399: [-1000000] rlist join shell rest /arg1 set
400: ] pop
401: popEnv
402: popVariables
403: arg1
404: } def
405:
406:
407: %%%%%%%%%%%%%%%%%%%%%%%%%%
408:
409: /asirconnectr {
410: [/in-asirconnectr /pass /peer /data /control /oxasir] pushVariables
411: [
412: /pass [(oxGenPass)] extension def
413: /peer [(oxGetPort) (localhost)] extension def
414: /data peer 1 get toString def
415: /control peer 3 get toString def
416: peer message
417: [oxpath.oxlog.xterm oxpath.ox ( -reverse -ox ) oxasirpath.oxasir
418: ( -data ) data ( -control ) control ( -pass ) pass
419: oxpath.null
1.2 takayama 420: ( &)] cat system-csh
1.1 maekawa 421: [(oxCreateClient2) peer 0 pass] extension /oxasir set
422: %% 0 means connect from only localhost.
423: oxasir asirinit
424: /arg1 oxasir def
425: ] pop
426: popVariables
427: arg1
428: } def
429: [(asirconnectr)
430: [(asirconnectr server (ox_asir function))
431: (array server;)
432: (Example: asirconnectr /oxasir.ccc set)
433: ]] putUsages
434:
435:
436: %%%%%%%%%%%%% From gbhg3/Int/intw.sm1
437: %% This function needs solv1.asir and ox_asir.
438: %% See solv1.asir for the usage of this function.
439: /rationalRoots2 {
440: /arg1 set
441: [/in-rationalRoots2 /aa /f /comm /vvv /r /setarg
442: /w /ans
443: ] pushVariables
444: [(CurrentRingp) (KanGBmessage)] pushEnv
445: [
446: /aa arg1 def
447: aa isArray { } { (<<array>> rationalRoots2) error } ifelse
448: /setarg 0 def
449: oxasir.ccc [ ] eq {
450: (Starting ox_asir server.) message
451: ox_asirConnectMethod
452: } { } ifelse
453: aa { tag } map /typev set
454: typev [ArrayP StringP ArrayP] eq
455: { /f aa 0 get def
456: /vvv [ aa 1 get to_records pop ] def
457: /w aa 2 get def
458: /setarg 1 def
459: } { } ifelse
460: typev [ArrayP ArrayP ArrayP] eq
461: { /f aa 0 get def
462: /vvv aa 1 get {toString} map def
463: /setarg 1 def
464: /w aa 2 get def
465: } { } ifelse
466: setarg { } { (rationalRoots2 : Argument mismatch) error } ifelse
467:
468:
469: [vvv from_records ring_of_polynomials 0] define_ring
470: f { toString . } map /f set
471: vvv { . } map /vvv set
472: w { toString . } map /w set
473:
474: (rationalRoots2 -- f = ) messagen f messagen
475: ( , vvv= ) messagen vvv messagen ( , w = ) messagen w message
476:
477: vvv length 1 eq w 0 get (1). eq and
478: {
479: [(KanGBmessage) 0] system_variable
480: [f] groebner_sugar 0 get /f set
481: vvv 0 get toString (s) eq {
482: }{ [[vvv 0 get toString (s)] from_records ring_of_polynomials 0] define_ring}
483: ifelse
484: f 0 get toString . [[vvv 0 get toString . (s).]] replace
485: findIntegralRoots /ans set
486: }
487: {
488: oxasir.ccc [(sm1_rationalRoots2) f vvv w] asir
489: {(integer) dc} map
490: /ans set
491: } ifelse
492:
493: /arg1 ans def
494: ] pop
495: popEnv
496: popVariables
497: arg1
498: } def
499: [(rationalRoots2)
500: [(rationalRoots2 (ox_asir function) called from intw.sm1 to analyze integral)
501: (roots.)
502: ]] putUsages
503:
504: /ptozp_subst {
505: /arg1 set
506: [/in-ptozp_subst /aaa /fff /xxx /vvv /vlist] pushVariables
507: [(CurrentRingp)] pushEnv
508: [
509: /aaa arg1 def
510: /fff aaa 0 get def
511: /xxx aaa 1 get toString def
512: /vvv aaa 2 get {toString ..} map def
513: aaa length 4 eq {
514: /vlist aaa 3 get def
515: } {
516: /vlist 0 def
517: } ifelse
518: oxasir.ccc [ ] eq {
519: (Starting ox_asir server.) message
520: ox_asirConnectMethod
521: } { } ifelse
522: fff isPolynomial {
523: fff (ring) dc ring_def
524: fff toString /fff set
525: }
526: { vlist isInteger { (ptozp_subst: need variable names.) error } { } ifelse
527: [vlist ring_of_differential_operators 0] define_ring
528: } ifelse
529: oxasir.ccc [(sm1_ptozp_subst) fff . xxx . vvv] asir
530: /arg1 set
531: ] pop
532: popEnv
533: popVariables
534: arg1
535: } def
536:
537: [(ptozp_subst)
538: [$[f s [p q] v] ptozp_subst g (ox_asir function)$
539: $It returns ptozp(subst(f,s,p/q))$
540: $Example 1: [ (x Dx - s) (s) [2 3] (x,s)] ptozp_subst $
541: $ ===> 3 x Dx - 2 $
542: ]] putUsages
543:
544: /reduceByAsir {
545: /arg1 set
546: [/in-reduceByAsir /aaa /fff /fff0 /fff1 /vlist] pushVariables
547: [(CurrentRingp)] pushEnv
548: [
549: /aaa arg1 def
550: /fff aaa 0 get def
551: aaa length 2 eq {
552: /vlist aaa 1 get def
553: } {
554: /vlist 0 def
555: } ifelse
556: oxasir.ccc [ ] eq {
557: (Starting ox_asir server.) message
558: ox_asirConnectMethod
559: } { } ifelse
560: fff isArray {
561: fff length 2 eq {
562: /fff0 fff 0 get def
563: /fff1 fff 1 get def
564: } {
565: ([ << [f g] >> vlist ] reduceByAsir ) error
566: } ifelse
567: } {
568: ([ << [f g] >> vlist ] reduceByAsir ) error
569: } ifelse
570: fff0 isPolynomial fff1 isPolynomial and {
571: fff0 (ring) dc ring_def
572: fff0 toString . /fff0 set
573: fff1 (ring) dc ring_def
574: fff1 toString . /fff1 set
575: }
576: { vlist isInteger { (reduceByAsir: need variable names.) error } { } ifelse
577: [vlist ring_of_differential_operators 0] define_ring
578: fff0 toString . /fff0 set
579: fff1 toString . /fff1 set
580: } ifelse
581: oxasir.ccc [(sm1_rat2plist2) [fff0 fff1]] asir
582: /arg1 set
583: ] pop
584: popEnv
585: popVariables
586: arg1
587: } def
588:
589: [(reduceByAsir)
590: [$ [[f g] v] reduceByAsir [ff gg] (ox_asir function)$
591: $ [[f g]] reduceByAsir [ff gg] $
592: $Example 1: [[(2 x -2) (4 x - 8)] (x)] reduceByAsir $
593: (Note that there may be a gcd that is more than 1 among the coefficients.)
594: ]] putUsages
1.4 takayama 595:
596: %% File should be preprocessed by OpenXM/misc/packages/Windows/oxpp
597: %% and ./oxapp --removeSharp
598: [(oxasirParseFile)
599: [$[peer filename] oxasirParseFile $
600: $File should be preprocessed by OpenXM/misc/packages/Windows/oxpp$
601: $and ./oxapp --removeSharp $
602: ]] putUsages
603:
604: /oxasirParseFile {
605: /arg1 set
606: [/in-oxasirParseFile /fname /sss] pushVariables
607: [
608: /fname arg1 1 get def
609: /peer arg1 0 get def
610: fname pushfile /sss set
611: peer
612: [$if (1) { ; $ sss (}$)] cat
613: oxsubmit
614: ] pop
615: popVariables
1.7 takayama 616: } def
617:
618: [(bfct)
1.8 takayama 619: [
1.7 takayama 620: ( f bfct b )
621: ( poly f; poly b)
622: ([f v] bfct b)
623: ( string f )
624: ( b is the global b-function of the polynomial f.)
1.10 takayama 625: (Example: [(x^3-y^2) (x,y)] bfct fctr :: )
1.9 takayama 626: (Algorithm: M.Noro, Mathematical Software, icms 2002, pp.147--157.)
1.7 takayama 627: ( )
628: (If you interrupted the computation by typing ctrl-C, type in )
629: ( oxasir.ccc oxreset ; )
630: (to interrupt the ox_asir server.)
631: ( )
632: (This function requires plugins cmo, socket and ox_asir server. cf.oxasir)
1.8 takayama 633: (You need to install ox_asir server to use this function. (ox_asir function))
1.7 takayama 634: ]] putUsages
635:
636: /bfct {
637: /arg1 set
638: [/in-bfct /f /comm /vv] pushVariables
639: [(CurrentRingp)] pushEnv
640: [
641: /f arg1 def
642: oxasir.ccc [ ] eq {
643: (Starting ox_asir server.) message
644: ox_asirConnectMethod
645: } { } ifelse
646:
647: f isPolynomial not {
648: /vv f 1 get def
649: vv isArray { /vv vv from_records def } { } ifelse
650: /f f 0 get def
651: [vv ring_of_polynomials 0] define_ring
652: f . /f set
653: }{ } ifelse
654: oxasir.ccc [(oxasir_bfct) f] asir /f set
655: [(s) ring_of_polynomials 0] define_ring
656: f . /f set
657: [f f fctr] /arg1 set
658: ] pop
659: popEnv
660: popVariables
661: arg1
1.4 takayama 662: } def
663:
1.8 takayama 664: [(generic_bfct)
665: [
666: ( [ii weight] generic_bfct b )
667: ( list of poly ii; list weight)
668: ([ii weight variables] generic_bfct b)
669: ( list of string ii; list weight; list variables)
670: ( b is the general b-function of the ideal ii w.r.t the weight.)
671: (Example: [[(Dx^2) (Dy^2)] [(x) -1 (Dx) 1] [(x) (y)]] generic_bfct :: )
672: (Notion: Saito, Sturmfels, Takayama, Grobner deformations of hypergeometric differential equaitons)
1.9 takayama 673: (Algorithm: M.Noro, Mathematical Software, icms 2002, pp.147--157.)
1.8 takayama 674: ( )
675: (If you interrupted the computation by typing ctrl-C, type in )
676: ( oxasir.ccc oxreset ; )
677: (to interrupt the ox_asir server.)
678: ( )
679: (This function requires plugins cmo, socket and ox_asir server. cf.oxasir)
680: (You need to install ox_asir server to use this function. (ox_asir function))
681: ]] putUsages
682:
683: /generic_bfct {
684: /arg1 set
685: [/in-generic_bfct /aa /f /comm /vvv0 /n /vvv /ddd /r /setarg
686: /bf /wt ] pushVariables
687: [(CurrentRingp)] pushEnv
688: [
689: /aa arg1 def
690: aa isArray { } { (<<array>> generic_bfct) error } ifelse
691: /setarg 0 def
692: aa { tag } map /typev set
693: typev [ ArrayP ArrayP] eq
694: { /f aa 0 get def
695: f 0 tag PolyP { } { (The first argument must be a list of differential operators. Give the third variable: a list of variables) error } ifelse
696: f 0 get (ring) dc /r set
697: [(CurrentRingp) r] system_variable
698: /wt aa 1 get def
699:
700: /vvv0 getVariableNames def
701: /n [(N)] system_variable def
702: /vvv vvv0 n carN rest reverse rest reverse def
703: /ddd vvv0 reverse n carN reverse
704: rest reverse rest reverse def
705:
706: /wt wt generic_bfct.aux1 def
707:
708: /setarg 1 def
709: } { } ifelse
710: typev [ArrayP ArrayP StringP] eq
711: { /f aa 0 get def
712: /vvv [ aa 2 get to_records pop ] def
713: /wt aa 1 get def
714:
715: /n vvv length def
716: /ddd vvv { (D) 2 1 roll 2 cat_n } map def
717:
718: /setarg 1 def
719: } { } ifelse
720: typev [ArrayP ArrayP ArrayP] eq
721: { /f aa 0 get def
722: /vvv aa 2 get {toString} map def
723: /wt aa 1 get def
724:
725: /n vvv length def
726: /ddd vvv { (D) 2 1 roll 2 cat_n } map def
727:
728: /setarg 1 def
729: } { } ifelse
730: setarg { } { (generic_bfct : Argument mismatch) error } ifelse
731:
732: f 0 get isPolynomial {
733:
734: }
735: {
736: [vvv from_records ring_of_differential_operators 0] define_ring
737: f { toString . } map /f set
738: vvv { . } map /vvv set
739: ddd { . } map /ddd set
740: /wt wt generic_bfct.aux1 def
741: } ifelse
742: [f vvv ddd wt] message
743:
744: oxasir.ccc [ ] eq {
745: (Starting ox_asir server.) message
746: ox_asirConnectMethod
747: } { } ifelse
748:
749: oxasir.ccc [(oxasir_generic_bfct) f vvv ddd wt] asir /bf set
750: [(s) ring_of_polynomials 0] define_ring
751: bf . /bf set
752: [bf bf fctr] /arg1 set
753: ] pop
754: popEnv
755: popVariables
756: arg1
757: } def
758:
759: /generic_bfct.aux1 {
760: /arg1 set
761: [/in-generic_bfct.aux1 /wt /wtx /wtd /n] pushVariables
762: [
763: arg1 /wt set
764: /n [(N)] system_variable def
765: wt { dup tag PolyP eq { toString } { } ifelse } map /wt set
766: wt weightv /wt set
767: /wtx wt n carN rest reverse rest reverse def
768: /wtd wt reverse n carN reverse
769: rest reverse rest reverse def
770: wtx wtd join /wt set
771: wt { dup tag IntegerP eq { (universalNumber) dc } { } ifelse } map /wt set
772: wt /arg1 set
773: ] pop
774: popVariables
775: arg1
776: } def
1.1 maekawa 777:
778: /oxasir.sm1.loaded 1 def
1.3 takayama 779: [(ostype)] extension 0 get (windows) eq {
780: [(parse) (oxasir-win.sm1) pushfile ] extension
781: }{
782: initializePathNamesForOxAsir %% This should be the last.
783: } ifelse
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>