Annotation of OpenXM/src/asir-contrib/packages/src/ok_dmodule.rr, Revision 1.2
1.2 ! takayama 1: /* $OpenXM: OpenXM/src/asir-contrib/packages/src/ok_dmodule.rr,v 1.1 2005/04/08 05:29:37 takayama Exp $ */
1.1 takayama 2: /* Old: Dmodule */
3:
4: /*----------------------*/
5: /* package for D-module */
6: /*----------------------*/
7:
8: #define _DEBUG_Dmodule_ 0
9:
10: Odmodule_sm1_PID = -1$
11: Odmodule_Euler2D = [[1],[0,1],[0,1,1]]$
12:
13: def odmodule_sm1_start() {
14: extern Odmodule_sm1_PID;
15: if (Odmodule_sm1_PID < 0) {
16: #if _DEBUG_Dmodule_
17: print("starting ox_sm1_forAsir ...");
18: #endif
19: Odmodule_sm1_PID = sm1.start();
20: #if _DEBUG_Dmodule_
21: print("sm1 process number: ", 0); print(Odmodule_sm1_PID);
22: #endif
23: }
24: return Odmodule_sm1_PID;
25: }
26:
27: def odmodule_sm1_restart() {
28: extern Odmodule_sm1_PID;
29: Odmodule_sm1_PID = sm1.start();
30: return Odmodule_sm1_PID;
31: }
32:
33: /* [x1,x2,...] -> [dx1,dx2,...] */
34: def odmodule_make_dv(V) {
35: return odiff_make_dv(V);
36: }
37:
38: /* [x1,x2,...] -> [tx1,tx2,...] */
39: /* I'm going to use this variable t* as euler operator. */
40: def odmodule_make_tv(V) {
41: if (type(V) != 4) {
42: error("parameter type error.");
43: }
44: Tv = [];
45: for (I = 0; I < length(V); I++) {
46: Tv = append(Tv, [strtov("t" + rtostr(V[I]))]);
47: }
48: return Tv;
49: }
50:
51: /* [x1,x2,...] -> "x1,x2,..." */
52: def odmodule_var_tosm1(V) {
53: if (type(V) != 4) {
54: error("parameter type error.");
55: }
56: if (V == []) {
57: return "";
58: }
59: V_str = rtostr(V[0]);
60: for (I = 1; I < length(V); I++) {
61: V_str += "," + rtostr(V[I]);
62: }
63: #if _DEBUG_Dmodule_
64: print("variables (sm1 format): ", 0); print(V_str);
65: #endif
66: return V_str;
67: }
68:
69: /* differential operators with polynomial coefficients -> sm1 string */
70: /* L_list: [ [[fa(V),[a1,...,an]],...], ... ], coefficient must be polynomial. */
71: def odmodule_d_op_tosm1(L_list, V) {
72: return odiff_op_tosm1(L_list, V);
73: }
74:
75: /* list form -> asir form */
76: def odmodule_d_op_toasir(L_list, V) {
77: return odiff_op_toasir(L_list, V);
78: }
79:
80: /* asir form -> list form */
81: def odmodule_d_op_fromasir(D_list, V) {
82: return odiff_op_fromasir(D_list, V);
83: }
84:
85: def odmodule_filt(V, W) {
86: if (type(V) != 4 || type(W) != 4) {
87: error("parameter type error.");
88: }
89: if (2*length(V) != length(W)) {
90: error("a length of list is no match.");
91: }
92: V = append(V, odmodule_make_dv(V));
93: Filt = [];
94: for (I = 0; I < length(V); I++) {
95: Filt = append(Filt, [V[I], W[I]]);
96: }
97: return Filt;
98: }
99:
100: /* weight (0,...,0,1,...,1) */
101: def odmodule_order_filt(V) {
102: OrderX = []; OrderD = [];
103: for (I = 0; I < length(V); I++) {
104: OrderX = append(OrderX, [V[I], 0]);
105: OrderD = append(OrderD, [strtov("d" + rtostr(V[I])), 1]);
106: }
107: Order = append(OrderX, OrderD);
108: #if _DEBUG_Dmodule_
109: print("order filtration: ", 0); print(Order);
110: #endif
111: return Order;
112: }
113:
114: /* weight (1,...,1,1,...,1) */
115: def odmodule_bernstein_filt(V) {
116: OrderX = []; OrderD = [];
117: for (I = 0; I < length(V); I++) {
118: OrderX = append(OrderX, [V[I], 1]);
119: OrderD = append(OrderD, [strtov("d" + rtostr(V[I])), 1]);
120: }
121: Order = append(OrderX, OrderD);
122: #if _DEBUG_Dmodule_
123: print("bernstein filtration: ", 0); print(Order);
124: #endif
125: }
126:
127: def odmodule_calc_w(E, W) {
128: if (type(E) == 5) {
129: E = vtol(E);
130: }
131: if (type(W) == 5) {
132: W = vtol(W);
133: }
134: for (M = 0, I = 0; I < length(E); I++) {
135: M += E[I]*W[I];
136: }
137: return M;
138: }
139:
140: /* this function returns initial form of Poly with respect to weight W */
141: def odmodule_initial_form(Poly, W, V) {
142: if (Poly == 0) {
143: return 0;
144: }
145: Dpoly = dp_ptod(Poly, V);
146: MaxW = odmodule_calc_w(dp_etov(dp_ht(Dpoly)), W);
147: In = dp_dtop(dp_hm(Dpoly), V);
148: Dpoly -= dp_hm(Dpoly);
149: while (Dpoly != 0) {
150: M = odmodule_calc_w(dp_etov(dp_ht(Dpoly)), W);
151: if (MaxW < M) {
152: MaxW = M;
153: In = dp_dtop(dp_hm(Dpoly), V);
154: }
155: else if (MaxW == M) {
156: In += dp_dtop(dp_hm(Dpoly), V);
157: }
158: Dpoly -= dp_hm(Dpoly);
159: }
160: return In;
161: }
162:
163: def odmodule_min_form(Poly, W, V) {
164: return odmodule_initial_form(Poly, -matrix_ltov(W), V);
165: }
166:
167: /* a21*x^2*y+a11*x*y+a20*x^2+a01*y
168: -> [a21*x^2, a11*x*y+a20*x^2, a01*y] */
169: def odmodule_ptogp(Poly, W, V) {
170: GPoly = [];
171: do {
172: In = odmodule_initial_form(Poly, W, V);
173: GPoly = append(GPoly, [In]);
174: Poly -= In;
175: } while (Poly != 0);
176: return GPoly;
177: }
178:
179: /* D_ideal: asir form, list form */
180: /* V: [x1,x2,...] */
181: def odmodule_ch_ideal(D_ideal, V) {
182: Param = odiff_get_param(D_ideal, V);
183: #if _DEBUG_Dmodule_
184: print("generic parameter: ", 0); print(Param);
185: #endif
186: D_ideal = odiff_op_tosm1(D_ideal, V);
187: Gb = sm1.gb([ D_ideal, odmodule_var_tosm1(append(V,Param)),
188: [odmodule_order_filt(append(V,Param))] ]);
189: #if _DEBUG_Dmodule_
190: print("sm1.gb: ", 0); print(Gb);
191: #endif
192: return Gb[1];
193: }
194:
195: def odmodule_ch_ideal_appell1(A, B1, B2, C, V) {
196: return odmodule_ch_ideal(odiff_op_appell1(A, B1, B2, C, V), V);
197: }
198:
199: def odmodule_ch_ideal_appell2(A, B1, B2, C1, C2, V) {
200: return odmodule_ch_ideal(odiff_op_appell2(A, B1, B2, C1, C2, V), V);
201: }
202:
203: def odmodule_ch_ideal_appell3(A1, A2, B1, B2, C, V) {
204: return odmodule_ch_ideal(odiff_op_appell3(A1, A2, B1, B2, C, V), V);
205: }
206:
207: def odmodule_ch_ideal_appell4(A, B, C1, C2, V) {
208: return odmodule_ch_ideal(odiff_op_appell4(A, B, C1, C2, V), V);
209: }
210:
211: def odmodule_ch_ideal_selberg2(A, B, C, S, V) {
212: return odmodule_ch_ideal(odiff_op_selberg2(A, B, C, S, V), V);
213: }
214:
215: def odmodule_ch_ideal_selberg2_1(A, B, K1, K2, V) {
216: return odmodule_ch_ideal(odiff_op_selberg2_1(A, B, K1, K2, V), V);
217: }
218:
219: def odmodule_ch_ideal_gkz(A, B, V) {
220: return odmodule_ch_ideal(odiff_op_gkz(A, B, V), V);
221: }
222:
223: /* elimination in polynomial ring */
224: def odmodule_poly_elimination(Ideal, V, Elim) {
225: for (Var = [], I = 0; I < length(V); I++) {
226: if (!odmodule_lookup(V[I], Elim)) {
227: Var = append(Var, [V[I]]);
228: }
229: }
230: GG = gr(Ideal, append(Elim, Var), 2);
231: for (E_Ideal = [], I = 0; I < length(GG); I++) {
232: Vars = vars(GG[I]);
233: Flag = 1;
234: for (J = 0; J < length(Elim); J++) {
235: if (odmodule_lookup(Elim[J], Vars)) {
236: Flag = 0;
237: break;
238: }
239: }
240: if (Flag == 1) {
241: E_Ideal = append(E_Ideal, [GG[I]]);
242: }
243: }
244: return E_Ideal;
245: }
246:
247: /* this function returns singular locus of D-ideal. */
248: /* L_list: asir form, list form */
249: def odmodule_singular_locus(D_ideal, V) {
250: Ch_ideal = odmodule_ch_ideal(D_ideal, V);
251: #if _DEBUG_Dmodule_
252: print("characteristic ideal:",0);print(Ch_ideal);
253: #endif
254: Dv = odiff_make_dv(V);
255: UC_y = uc();
256: for (F = 0, I = 0; I < length(Dv); I++) {
257: F += UC_y^I*Dv[I];
258: }
259: UC_z = uc(); UC_w = uc();
260: Elim = append([UC_w,UC_y,UC_z], Dv);
261: Sing = odmodule_poly_elimination(append(Ch_ideal,[UC_z-F,1-UC_w*UC_z]),
262: append(V, Elim), Elim);
263: return Sing;
264: }
265:
266: def odmodule_krull_dim(Poly_ideal, V) {
267: }
268:
269: /* restriction to {t1=0,t2=0,...} */
270: /* D_ideal: asir form, list form */
271: /* Rest: [t1,t2,...] */
272: /* V: [x1,x2,...] */
273: def odmodule_restriction(D_ideal, V, Rest) {
274: /* check if D_ideal have generic parameter. */
275: Param = odiff_get_param(D_ideal, V);
276: #if _DEBUG_Dmodule_
277: print("generic parameter: ", 0); print(Param);
278: #endif
279: if (Param == []) {
280: return odmodule_restriction_no_generic(D_ideal, V, Rest);
281: }
282: else {
283: return odmodule_restriction_generic(D_ideal, Param, V, Rest);
284: }
285: }
286:
287: def odmodule_restriction_no_generic(D_ideal, V, Rest) {
288: D_ideal = odiff_op_tosm1(D_ideal, V);
289: D_ideal_str = "";
290: for (I = 0; I < length(D_ideal); I++) {
291: D_ideal_str += " (" + D_ideal[I] + ") ";
292: }
293: Rest_str = "";
294: for (I = 0; I < length(Rest); I++) {
295: Rest_str += " (" + rtostr(Rest[I]) + ") ";
296: }
297: V_str = "";
298: for (I = 0; I < length(V); I++) {
299: V_str += " (" + rtostr(V[I]) + ") ";
300: }
301: Cmd_str = "[ [" + D_ideal_str + "] [" + Rest_str + "] [[" + V_str + "] [ ]] 0 ] restriction";
302: #if _DEBUG_Dmodule_
303: print("sm1 command string: ", 0); print(Cmd_str);
304: #endif
1.2 ! takayama 305: sm1.sm1(odmodule_sm1_start(), Cmd_str);
1.1 takayama 306: return sm1.pop(odmodule_sm1_start());
307: }
308:
309: def odmodule_restriction_generic(D_ideal, Param, V, Rest) {
310: D_ideal = odiff_op_tosm1(D_ideal, V);
311: D_ideal_str = "";
312: for (I = 0; I < length(D_ideal); I++) {
313: D_ideal_str += " (" + D_ideal[I] + ") ";
314: }
315: Rest_str = "";
316: for (I = 0; I < length(Rest); I++) {
317: Rest_str += " (" + rtostr(Rest[I]) + ") ";
318: }
319: V_str = "";
320: for (I = 0; I < length(V); I++) {
321: V_str += " (" + rtostr(V[I]) + ") ";
322: }
323: for (I = 0; I < length(Param); I++) {
324: V_str += " (" + rtostr(Param[I]) + ") ";
325: }
326: Cmd_str = "[ [" + D_ideal_str + "] [" + Rest_str + "] [[" + V_str + "] [ ]] 0 ] restriction";
327: #if _DEBUG_Dmodule_
328: print("sm1 command string: ", 0); print(Cmd_str);
329: #endif
1.2 ! takayama 330: sm1.sm1(odmodule_sm1_start(), Cmd_str);
1.1 takayama 331: return sm1.pop(odmodule_sm1_start());
332: }
333:
334: def odmodule_restriction_appell1(A, B1, B2, C, V, Rest) {
335: return odmodule_restriction(odiff_op_appell1(A, B1, B2, C, V), V, Rest);
336: }
337:
338: def odmodule_restriction_appell2(A, B1, B2, C1, C2, V, Rest) {
339: return odmodule_restriction(odiff_op_appell2(A, B1, B2, C1, C2, V), V, Rest);
340: }
341:
342: def odmodule_restriction_appell3(A1, A2, B1, B2, C, V, Rest) {
343: return odmodule_restriction(odiff_op_appell3(A1, A2, B1, B2, C, V), V, Rest);
344: }
345:
346: def odmodule_restriction_appell4(A, B, C1, C2, V, Rest) {
347: return odmodule_restriction(odiff_op_appell4(A, B, C1, C2, V), V, Rest);
348: }
349:
350: def odmodule_restriction_selberg2(A, B, C, S, V, Rest) {
351: return odmodule_restriction(odiff_op_selberg2(A, B, C, S, V), V, Rest);
352: }
353:
354: def odmodule_restriction_selberg2_1(A, B, K1, K2, V, Rest) {
355: return odmodule_restriction(odiff_op_selberg2_1(A, B, K1, K2, V), V, Rest);
356: }
357:
358: def odmodule_restriction_gkz(A, B, V, Rest) {
359: return odmodule_restriction(odiff_op_gkz(A, B, V), V, Rest);
360: }
361:
362: def odmodule_lookup(X, List) {
363: return odiff_lookup(X, List);
364: }
365:
366: /* odmodule_assign0(Rat, [x,y,z]); -> x=0,y=0,z=0 */
367: def odmodule_assign0(Rat, V) {
368: if (type(Rat) > 3 || type(V) != 4) {
369: error("parameter type error.");
370: }
371: for (I = 0; I < length(V); I++) {
372: Rat = subst(Rat, V[I], 0);
373: }
374: return Rat;
375: }
376:
377: /* odmodule_assign(Rat, [x,y,z], [1,2]); <-> x=1,y=2,z=0 */
378: def odmodule_assign(Rat, V, Value) {
379: if (type(Rat) > 3 || type(V) != 4 || type(Value) != 4) {
380: error("parameter type error.");
381: }
382: for (I = 0; I < length(V); I++) {
383: if (I < length(Value)) {
384: Rat = subst(Rat, V[I], Value[I]);
385: }
386: else {
387: Rat = subst(Rat, V[I], 0);
388: }
389: }
390: return Rat;
391: }
392:
393: /* odmodule_elimination_order([x,y,z], [y,z])
394: -> [ [dy,1,dz,0,dx,0,y,0,z,0,x,0],
395: [dy,0,dz,1,dx,0,y,0,z,0,x,0],
396: [dy,0,dz,0,dx,1,y,0,z,0,x,0],
397: [dy,0,dz,0,dx,0,y,1,z,0,x,0],
398: [dy,0,dz,0,dx,0,y,0,z,1,x,0],
399: [dy,0,dz,0,dx,0,y,0,z,0,x,1] ] */
400: def odmodule_elimination_order(V, Elim) {
401: if (type(V) != 4 || type(Elim) != 4) {
402: error("parameter type error.");
403: }
404: Dv = odmodule_make_dv(V);
405: VarOrderX = Elim;
406: VarOrderD = odmodule_make_dv(Elim);
407: for (I = 0; I < length(V); I++) {
408: if (!odmodule_lookup(V[I], Elim)) {
409: VarOrderX = append(VarOrderX, [V[I]]);
410: VarOrderD = append(VarOrderD, [Dv[I]]);
411: }
412: }
413: VarOrder = append(VarOrderD, VarOrderX);
414: ElimOrder = [];
415: for (I = 0; I < length(VarOrder); I++) {
416: Filt = [];
417: for (J = 0; J < length(VarOrder); J++) {
418: if (J == I) {
419: Filt = append(Filt, [VarOrder[J], 1]);
420: }
421: else {
422: Filt = append(Filt, [VarOrder[J], 0]);
423: }
424: }
425: ElimOrder = append(ElimOrder, [Filt]);
426: }
427: #if _DEBUG_Dmodule_
428: print("elimination order :", 0); print(ElimOrder);
429: #endif
430: return ElimOrder;
431: }
432:
433: /* D_ideal: asir form, list form */
434: /* Elim: eliminated variables and values */
435: /* Elim: [[x1,...,xt],[a1,...,at]] -> restrict to {x1=a1,...,xt=at} */
436: def odmodule_elimination(D_ideal, V, Elim) {
437: /* check if D_ideal have generic parameter. */
438: Param = odiff_get_param(D_ideal, V);
439: #if _DEBUG_Dmodule_
440: print("generic parameter: ", 0); print(Param);
441: #endif
442: D_ideal = odiff_op_tosm1(D_ideal, V);
443: #if _DEBUG_Dmodule_
444: print("D-ideal: ", 0); print(D_ideal);
445: #endif
446: Gb1 = sm1.gb([ D_ideal, odmodule_var_tosm1(append(V, Param)),
447: odmodule_elimination_order(append(V, Param), Elim[0]) ]);
448: #if _DEBUG_Dmodule_
449: print("Gb1: ", 0); print(Gb1);
450: #endif
451: Gb2 = [];
452: D_Elim = odmodule_make_dv(Elim[0]);
453: for (I = 0; I < length(Gb1[0]); I++) {
454: Vars = vars(Gb1[0][I]);
455: Flag = 0;
456: for (J = 0; J < length(D_Elim); J++) {
457: if (odmodule_lookup(D_Elim[J], Vars)) {
458: Flag = 1;
459: break;
460: }
461: }
462: if (Flag == 0) {
463: Gb2 = append(Gb2, [Gb1[0][I]]);
464: }
465: }
466: #if _DEBUG_Dmodule_
467: print("Gb2: ", 0); print(Gb2);
468: #endif
469: R_Gb = [];
470: for (I = 0; I < length(Gb2); I++) {
471: if ((Poly = odmodule_assign(Gb2[I], Elim[0], Elim[1])) != 0) {
472: R_Gb = append(R_Gb, [Poly]);
473: }
474: }
475: #if _DEBUG_Dmodule_
476: print("elimination D-ideal: ", 0); print(R_Gb);
477: #endif
478: if (R_GB == []) {
479: return [0];
480: }
481: else {
482: return R_Gb;
483: }
484: }
485:
486: def odmodule_elimination_appell1(A, B1, B2, C, V, Elim) {
487: return odmodule_elimination(odiff_op_appell1(A, B1, B2, C, V), V, Elim);
488: }
489:
490: def odmodule_elimination_appell2(A, B1, B2, C1, C2, V, Elim) {
491: return odmodule_elimination(odiff_op_appell2(A, B1, B2, C1, C2, V), V, Elim);
492: }
493:
494: def odmodule_elimination_appell3(A1, A2, B1, B2, C, V, Elim) {
495: return odmodule_elimination(odiff_op_appell3(A1, A2, B1, B2, C, V), V, Elim);
496: }
497:
498: def odmodule_elimination_appell4(A, B, C1, C2, V, Elim) {
499: return odmodule_elimination(odiff_op_appell4(A, B, C1, C2, V), V, Elim);
500: }
501:
502: def odmodule_elimination_appell4s(R_A, R_B, R_C1, R_C2, V, Elim, Flag) {
503: Res_list = [];
504: for (A = R_A[0]; A <= R_A[1]; A += R_A[2]) {
505: for (B = R_B[0]; B <= R_B[1]; B += R_B[2]) {
506: for (C1= R_C1[0]; C1 <= R_C1[1]; C1 += R_C1[2]) {
507: for (C2= R_C2[0]; C2 <= R_C2[1]; C2 += R_C2[2]) {
508: Res = odmodule_elimination_appell4(A, B, C1, C2, V, Elim);
509: print([[A,B,C1,C2],[Res]]);
510: if (Flag) {
511: Res_list = append(Res_list, [ [[A, B, C1, C2],[Res]] ]);
512: }
513: }
514: }
515: }
516: }
517: return Res_list;
518: }
519:
520: def odmodule_elimination_selberg2(A, B, C, S, V, Elim) {
521: return odmodule_elimination(odiff_op_selberg2(A, B, C, S, V), V, Elim);
522: }
523:
524: def odmodule_elimination_selberg2_1(A, B, K1, K2, V, Elim) {
525: return odmodule_elimination(odiff_op_selberg2_1(A, B, K1, K2, V), V, Elim);
526: }
527:
528: def odmodule_elimination_gkz(A, B, V, Elim) {
529: return odmodule_elimination(odiff_op_gkz(A, B, V), V, Elim);
530: }
531:
532: /* (V[0] dV[0])^N -> V[0]^N dV[0]^N + ... */
533: def odmodule_euler2d(N, V) {
534: extern Odmodule_Euler2D;
535: if (N < 0) {
536: error("parameter range error.");
537: }
538: /* extent a table */
539: if (N >= length(Odmodule_Euler2D)) {
540: for (I = length(Odmodule_Euler2D); I <= N; I++) {
541: List = [0];
542: for (J = 1; J < I; J++) {
543: List = append(List, [Odmodule_Euler2D[I-1][J-1]+J*Odmodule_Euler2D[I-1][J]]);
544: }
545: List = append(List, [Odmodule_Euler2D[I-1][I-1]]);
546: Odmodule_Euler2D = append(Odmodule_Euler2D, [List]);
547: }
548: }
549: /* calculate by using a table */
550: Coef = Odmodule_Euler2D[N];
551: Dv = odmodule_make_dv(V);
552: D = 0;
553: for (I = 0; I < length(Coef); I++) {
554: D += Coef[I]*V[0]^I*Dv[0]^I;
555: }
556: return D;
557: }
558:
559: /* Param: List, [a,b,c] */
560: /* Return: [[a->a+1,a->a-1],[b->b+1,b->b-1],[c->c+1,c->c-1]] */
561: def odmodule_contiguity_hg1(Param, V) {
562: if (length(V) != 1) {
563: error("a length of List V is wrong.");
564: }
565: A = Param[0]; B = Param[1]; C = Param[2];
566: return [ [ [[V[0],[1]],[A,[0]]],[[V[0]*(1-V[0]),[1]],[C-A-B*V[0],[0]]] ],
567: [ [[V[0],[1]],[B,[0]]],[[V[0]*(1-V[0]),[1]],[C-B-A*V[0],[0]]] ],
568: [ [[1-V[0],[1]],[C-A-B,[0]]],[[V[0],[1]],[C-1,[0]]] ] ];
569: }
570:
571: def odmodule_contiguity_sol_hg1(Sol, Param, V) {
572: C = odmodule_contiguity_hg1(Param, V);
573: C_Sol = [ odiff_acts(C[0], Sol, V),
574: odiff_acts(C[1], Sol, V),
575: odiff_acts(C[2], Sol, V) ];
576: return C_Sol;
577: }
578:
579: def odmodule_contiguity_param_only(F,V) {
580: Dv = odmodule_make_dv(V);
581: if (deg(F,V[0]) != 0) return(0);
582: if (deg(F,V[1]) != 0) return(0);
583: if (deg(F,Dv[0]) != 0) return(0);
584: if (deg(F,Dv[1]) != 0) return(0);
585: return(F);
586: }
587:
588: def odmodule_contiguity_generic_appell4(Param, V) {
589: Dv = odmodule_make_dv(V);
590: Var = append(V, vars(Param));
591: Weight = [[Dv[0],1,Dv[1],1,V[0],1,V[1],1]];
592: D_list = odiff_op_toasir(odiff_op_appell4(Param[0],Param[1],Param[2],Param[3],V),V);
593: Cont_list = [];
594: D = [V[0]*Dv[0]+V[1]*Dv[1]+Param[0],
595: V[0]*Dv[0]+V[1]*Dv[1]+Param[1],
596: V[0]*Dv[0]+Param[2]-1,
597: V[1]*Dv[1]+Param[3]-1];
598:
599: for (II = 0; II < length(D); II++) {
600: F = append([D[II]],D_list);
601: G = sm1.syz([F,Var,Weight]);
602: Gb = map(first,G[1][0]);
603: Cont = G[1][1];
604: Ans = [ ];
605: for (I=0; I<length(Gb); I++) {
606: if (odmodule_contiguity_param_only(Gb[I],V) != 0) {
607: Ans = append(Ans,[ [Gb[I],Cont[I][0]] ]);
608: /* print(sm1.mul(C[I],F,[x,y,a,b,c,cp])); */ /* check ! */
609: }
610: }
611: Cont_list = append(Cont_list, [[D[II],Ans[0]]]);
612: }
613: return Cont_list;
614: }
615:
616: def odmodule_contiguity_appell4(Param, V) {
617: if (length(V) != 2) {
618: error("a length of List V is wrong.");
619: }
620: A = Param[0]; B = Param[1]; C1 = Param[2]; C2 = Param[3];
621: /* if (A == 0 || A == C1 || A == C2 || A == C1+C2-1) {
622: print("contiguity of A is not isomorphism.");
623: }
624: if (B == 0 || B == C1 || B == C2 || B == C1+C2-1) {
625: print("contiguity of B is not isomorphism.");
626: }
627: if (A == C1 || B == C1 || A == C1+C2-1 || B == C1+C2-1) {
628: print("contiguity of C1 is not isomorphism.");
629: }
630: if (A == C1 || B == C1 || A == C1+C2-1 || B == C1+C2-1) {
631: print("contiguity of C2 is not isomorphism.");
632: } */
633: Dv = odiff_make_dv(V);
634: D_A = [ /* A -> A+1 */ V[0]*Dv[0]+V[1]*Dv[1]+A,
635: /* A -> A-1 */ 4*V[1]*V[0]^2*Dv[0]^2+(((-8*(A-1)+4*C1+4*C2-8)*V[1]*V[0]^2+((8*(A-1)-4*C1-4*C2+16)*V[1]^2+(8*(A-1)-4*C1-4*C2+8)*V[1])*V[0])*Dv[1]+(4*(A-1)^2+(-4*C1-8*C2+12)*(A-1)+(4*C2-4)*C1+4*C2^2-12*C2+8)*V[0]^2+((12*(A-1)^2+(-12*C1-8*C2+32)*(A-1)+4*B+4*C1^2+(4*C2-16)*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C1+2*(C2+1)^2-7*(C2+1)+6)*B+(-(C2+1)+1)*C1^2+(-2*(C2+1)^2+6*(C2+1)-4)*C1-(C2+1)^3+5*(C2+1)^2-8*(C2+1)+4,
641: /* C2 -> C2-1 */ V[1]*Dv[1]+C2-1 ];
642: return [ odiff_op_fromasir(D_A, V),
643: odiff_op_fromasir(D_B, V),
644: odiff_op_fromasir(D_C1, V),
645: odiff_op_fromasir(D_C2, V) ];
646: }
647:
648: /* Sol(a,b,c1,c2)->[ [Sol(a+1,b,c1,c2),Sol(a-1,b,c1,c2)],
649: [Sol(a,b+1,c1,c2),Sol(a,b-1,c1,c2)],
650: [Sol(a,b,c1+1,c2),Sol(a,b,c1-1,c2)],
651: [Sol(a,b,c1,c2+1),Sol(a,b,c1,c2-1)] ] */
652: def odmodule_contiguity_sol_appell4(Sol, Param, V) {
653: C = odmodule_contiguity_appell4(Param, V);
654: C_Sol = [ odiff_acts(C[0], Sol, V),
655: odiff_acts(C[1], Sol, V),
656: odiff_acts(C[2], Sol, V),
657: odiff_acts(C[3], Sol, V) ];
658: return C_Sol;
659: }
660:
661: def odmodule_contiguity_selberg2(Param, V) {
662: if (length(V) != 2) {
663: error("a length of List V is wrong.");
664: }
665: A = Param[0]; B = Param[1]; C = Param[2]; S = Param[3];
666: }
667:
668: end$
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>