1 | LIB "tst.lib"; |
---|
2 | tst_init(); |
---|
3 | |
---|
4 | LIB "primdecint.lib"; |
---|
5 | |
---|
6 | proc sortPDZ(list l) |
---|
7 | { |
---|
8 | int i,j,notReady; |
---|
9 | list K; |
---|
10 | intvec save_opt=option(get); |
---|
11 | option(redSB,redTail); |
---|
12 | for(i=1;i<=size(l);i++){l[i][1]=std(l[i][1]);l[i][2]=std(l[i][2]);} |
---|
13 | option(set,save_opt); |
---|
14 | notReady=1; |
---|
15 | while(notReady) |
---|
16 | { |
---|
17 | notReady=0; |
---|
18 | i=0; |
---|
19 | while(i<size(l)-1) |
---|
20 | { |
---|
21 | i++; |
---|
22 | j=i; |
---|
23 | while(j<size(l)) |
---|
24 | { |
---|
25 | j++; |
---|
26 | if(compareI(l[i][2],l[j][2])) |
---|
27 | { |
---|
28 | notReady=1; |
---|
29 | K=l[i]; |
---|
30 | l[i]=l[j]; |
---|
31 | l[j]=K; |
---|
32 | i--; |
---|
33 | break; |
---|
34 | } |
---|
35 | } |
---|
36 | } |
---|
37 | } |
---|
38 | return(l); |
---|
39 | } |
---|
40 | |
---|
41 | proc compareI(ideal I, ideal J) |
---|
42 | { |
---|
43 | return(string(I)>string(J)); |
---|
44 | } |
---|
45 | |
---|
46 | |
---|
47 | ring R1 = integer,(a,b,c,d,e,f,g),dp; |
---|
48 | ideal I = 2*3,a2+2de+2cf+2bg+a, 2ab+e2+2df+2cg+b, |
---|
49 | b2+2ac+2ef+2dg+c, 2bc+2ad+f2+2eg+d, |
---|
50 | c2+2bd+2ae+2fg+e, 2cd+2be+2af+g2+f, d2+2ce+2bf+2ag+g; |
---|
51 | sortPDZ(primdecZ(I,1)); |
---|
52 | sortPDZ(primdecZ(I,3)); |
---|
53 | |
---|
54 | |
---|
55 | ring R3 = integer,(w,z,y,x),dp; |
---|
56 | ideal I = 2*3*181*32003, xzw+(-y^2+y)*z^2, (-x^2+x)*w^2+yzw, |
---|
57 | ((y^4-2*y^3+y^2)*x-y^4+y^3)*z^3,y2z2w+(-y*4+2*y^3-y^2)*z3; |
---|
58 | sortPDZ(primdecZ(I,1)); |
---|
59 | sortPDZ(primdecZ(I,3)); |
---|
60 | |
---|
61 | ring R5 = integer,(x,y,z),dp; |
---|
62 | ideal I = 2*13*181*32003, x2-y2-z2, xy-z2, y3+xz2-yz2+2z3+xy-z2, |
---|
63 | -y2z2+2z4+x2-y2+z2, y3z9+3y2z10+3yz11+z12-y2z2+2z4; |
---|
64 | sortPDZ(primdecZ(I,1)); |
---|
65 | sortPDZ(primdecZ(I,3)); |
---|
66 | |
---|
67 | ring R7 = integer,(x,y,z),dp; |
---|
68 | ideal I = 2^4*3*5*7*11*13*17, x2-y2-(z+2)^2, xy-(z+2)^2, |
---|
69 | y3+x*(z+2)^2-y*(z+2)^2+2*(z+2)^3+xy-(z+2)^2, |
---|
70 | -y^2*(z+2)^2+2*(z+2)^4+x2-y2+(z+2)^2, |
---|
71 | y3z9+3y2z10+3yz11+z12-y2z2+2z4; |
---|
72 | sortPDZ(primdecZ(I,1)); |
---|
73 | sortPDZ(primdecZ(I,2)); |
---|
74 | sortPDZ(primdecZ(I,3)); |
---|
75 | sortPDZ(primdecZ(I,4)); |
---|
76 | |
---|
77 | ring R8 = integer,(x,y,z),dp; |
---|
78 | ideal I = x2-y2-(z+2)^2, xy-(z+2)^2, |
---|
79 | y3+x*(z+2)^2-y*(z+2)^2+2*(z+2)^3+xy-(z+2)^2, |
---|
80 | -y^2*(z+2)^2+2*(z+2)^4+x2-y2+(z+2)^2, |
---|
81 | y3z9+3y2z10+3yz11+z12-y2z2+2z4; |
---|
82 | sortPDZ(primdecZ(I,1)); |
---|
83 | sortPDZ(primdecZ(I,3)); |
---|
84 | |
---|
85 | ring R9 = integer,(w,z,y,x),dp; |
---|
86 | ideal I = 2*3*5*630, ((y^2-y)*x-y^3+y^2)*z^2, (x-y)*zw, |
---|
87 | (x-y^2)*zw+(-y^2+y)*z^2, (-x^2+x)*w^2+(-yx+y)*zw; |
---|
88 | sortPDZ(primdecZ(I,1)); |
---|
89 | sortPDZ(primdecZ(I,3)); |
---|
90 | |
---|
91 | ring R10 = integer,(w,z,y,x),dp; |
---|
92 | ideal I = 2*3*5*1260, -yxzw+(-y^2+y)*z^2, (-x^2+x)*w^2-yxzw, |
---|
93 | ((-y^2+y)*x-y^3+2*y^2-y)*z^3, |
---|
94 | (y^2-y)*z^2*w+(-y^2+y)*z^2*w+(-y^2+y)*z^3; |
---|
95 | sortPDZ(primdecZ(I,1)); |
---|
96 | sortPDZ(primdecZ(I,3)); |
---|
97 | |
---|
98 | ring R11 = integer,(w,z,y,x),dp; |
---|
99 | ideal I = (4*y^2*x^2+(4*y^3+4*y^2-y)*x-y^2-y)*z^2, |
---|
100 | (x+y+1)*zw+(-4*y^2*x-4*y^3-4*y^2)*z^2, |
---|
101 | (-x-2*y^2 - 2*y - 1)*zw + (8*y^3*x + 8*y^4 + 8*y^3 + 2*y^2+y)*z^2, |
---|
102 | ((y^3 + y^2)*x - y^2 - y)*z^2, |
---|
103 | (y +1)*zw + (-y^3 -y^2)*z^2, |
---|
104 | (x + 1)*zw +(- y^2 -y)*z^2, |
---|
105 | (x^2 +x)*w^2 + (-yx - y)*zw; |
---|
106 | sortPDZ(primdecZ(I,1)); |
---|
107 | sortPDZ(primdecZ(I,2)); |
---|
108 | sortPDZ(primdecZ(I,3)); |
---|
109 | sortPDZ(primdecZ(I,4)); |
---|
110 | |
---|
111 | ring R12 = integer,(w,z,y,x),dp; |
---|
112 | ideal I = 2*3*181*72, |
---|
113 | ((y^3 + y^2)*x - y^2 - y)*z^2, |
---|
114 | (y + 1)*zw + (-y^3 -y^2)*z^2, |
---|
115 | (x + 1)*zw + (-y^2 -y)*z^2, (x^2 + x)*w^2 + (-yx - y)*zw; |
---|
116 | sortPDZ(primdecZ(I,1)); |
---|
117 | sortPDZ(primdecZ(I,3)); |
---|
118 | |
---|
119 | ring R14 = integer,(x(1),x(2),x(3),x(4)),dp; |
---|
120 | ideal I = 181*49^2, x(4)^4, x(1)*x(4)^3, x(1)*x(2)*x(4)^2, |
---|
121 | x(2)^2*x(4)^2, x(2)^2*x(3)*x(4), x(1)*x(2)*x(3)*x(4), |
---|
122 | x(1)*x(3)^2*x(4), x(3)^3*x(4); |
---|
123 | sortPDZ(primdecZ(I,1)); |
---|
124 | sortPDZ(primdecZ(I,3)); |
---|
125 | |
---|
126 | ring R15 = integer,(x,y,z),dp; |
---|
127 | ideal I = 32003*181*64, |
---|
128 | ((z^2-z)*y^2 + (z^2 -z)*y)*x, |
---|
129 | (z*y^3 + z*y^2)*x, |
---|
130 | (y^4 - y^2)*x, |
---|
131 | (z^2 - z)*y*x^2, |
---|
132 | (y^3 - y^2)*x^2, |
---|
133 | (z^3 - z^2)*x^4 + (2*z^3 -2*z^2)*x^3 + (z^3 -z^2)*x^2, |
---|
134 | z*y^2*x^2; |
---|
135 | sortPDZ(primdecZ(I,1)); |
---|
136 | sortPDZ(primdecZ(I,3)); |
---|
137 | |
---|
138 | ring R16 = integer,(x(1),x(2),x(3),x(4),x(5)),dp; |
---|
139 | ideal I = x(5)^5, x(1)*x(5)^4, x(1)*x(2)*x(5)^3, x(2)^2*x(5)^3, |
---|
140 | x(2)^2*x(3)*x(5)^2, x(1)*x(2)*x(3)*x(5)^2, x(1)*x(3)^2*x(5)^2, |
---|
141 | x(3)^3*x(5)^2, x(3)^3*x(4)*x(5), x(1)*x(3)^2*x(4)*x(5), |
---|
142 | x(1)*x(2)*x(3)*x(4)*x(5), x(2)^2*x(3)*x(4)*x(5), |
---|
143 | x(2)^2*x(4)^2*x(5), x(1)*x(2)*x(4)^2*x(5), x(1)*x(4)^3*x(5), |
---|
144 | x(4)^4*x(5); |
---|
145 | I = intersectZ(I,ideal(64*181,x(1)^2)); |
---|
146 | I; |
---|
147 | sortPDZ(primdecZ(I,1)); |
---|
148 | sortPDZ(primdecZ(I,2)); |
---|
149 | sortPDZ(primdecZ(I,3)); |
---|
150 | sortPDZ(primdecZ(I,4)); |
---|
151 | |
---|
152 | ring R17 = integer,(x,y,z),dp; |
---|
153 | ideal I = 374, (z+2)^8-140z6+2622*(z+2)^4-1820*(z+2)^2+169, |
---|
154 | 17y*(z+2)^4-374*y*(z+2)^2+221y+2z7-281z5+5240z3-3081z, |
---|
155 | 204y2+136yz3-3128yz+z6-149z4+2739z2+117, |
---|
156 | 17xz4-374xz2+221x+2z7-281z5+5240z3-3081z, |
---|
157 | 136xy-136xz-136yz+2z6-281z4+5376z2-3081, |
---|
158 | 204x2+136xz3-3128xz+z6-149z4+2739z2+117; |
---|
159 | sortPDZ(primdecZ(I,1)); |
---|
160 | sortPDZ(primdecZ(I,3)); |
---|
161 | |
---|
162 | ring R24 = integer,(a,b,c,d,e,f,g,h,j),dp; |
---|
163 | ideal I = 2*3*5*7*11*13*17, a+2b+c-d+g, f2gh-a, efg-c, fg2j-b, |
---|
164 | a+b+c+f+g-1, 3ad+3bd+2cd+df+dg-a-2b-c-g; |
---|
165 | sortPDZ(primdecZ(I,1)); |
---|
166 | sortPDZ(primdecZ(I,3)); |
---|
167 | |
---|
168 | ring R25 = integer,(s,r,b,u,v,w,x,y,z),dp; |
---|
169 | ideal I = 2*3*5*7*11*13*17*19*23, su+bv, ru+bw, rv+sw, sx+by, rx+bz, |
---|
170 | ry+sz, vx+uy, wx+uz, wy+vz; |
---|
171 | sortPDZ(primdecZ(I,1)); |
---|
172 | sortPDZ(primdecZ(I,3)); |
---|
173 | |
---|
174 | tst_status(1);$ |
---|