source: git/Tst/Long/primdecint.tst @ a8b44d

spielwiese
Last change on this file since a8b44d was f4a33e, checked in by Hans Schoenemann <hannes@…>, 13 years ago
test for tr. 303 git-svn-id: file:///usr/local/Singular/svn/trunk@14021 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100755
File size: 5.0 KB
Line 
1LIB "tst.lib";
2tst_init();
3
4LIB "primdecint.lib";
5
6proc 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
41proc compareI(ideal I, ideal J)
42{
43   return(string(I)>string(J));
44}
45
46
47ring R1 = integer,(a,b,c,d,e,f,g),dp;
48ideal 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;
51sortPDZ(primdecZ(I,1));
52sortPDZ(primdecZ(I,3));
53
54
55ring R3 = integer,(w,z,y,x),dp;
56ideal 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;
58sortPDZ(primdecZ(I,1));
59sortPDZ(primdecZ(I,3));
60
61ring R5 = integer,(x,y,z),dp;
62ideal 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;
64sortPDZ(primdecZ(I,1));
65sortPDZ(primdecZ(I,3));
66
67ring R7 = integer,(x,y,z),dp;
68ideal 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;
72sortPDZ(primdecZ(I,1));
73sortPDZ(primdecZ(I,2));
74sortPDZ(primdecZ(I,3));
75sortPDZ(primdecZ(I,4));
76
77ring R8 = integer,(x,y,z),dp;
78ideal 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;
82sortPDZ(primdecZ(I,1));
83sortPDZ(primdecZ(I,3));
84
85ring R9 = integer,(w,z,y,x),dp;
86ideal 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;
88sortPDZ(primdecZ(I,1));
89sortPDZ(primdecZ(I,3));
90
91ring R10 = integer,(w,z,y,x),dp;
92ideal 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;
95sortPDZ(primdecZ(I,1));
96sortPDZ(primdecZ(I,3));
97
98ring R11 = integer,(w,z,y,x),dp;
99ideal 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;
106sortPDZ(primdecZ(I,1));
107sortPDZ(primdecZ(I,2));
108sortPDZ(primdecZ(I,3));
109sortPDZ(primdecZ(I,4));
110
111ring R12 = integer,(w,z,y,x),dp;
112ideal 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;
116sortPDZ(primdecZ(I,1));
117sortPDZ(primdecZ(I,3));
118
119ring R14 = integer,(x(1),x(2),x(3),x(4)),dp;
120ideal 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);
123sortPDZ(primdecZ(I,1));
124sortPDZ(primdecZ(I,3));
125
126ring R15 = integer,(x,y,z),dp; 
127ideal 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;
135sortPDZ(primdecZ(I,1));
136sortPDZ(primdecZ(I,3));
137
138ring R16 = integer,(x(1),x(2),x(3),x(4),x(5)),dp;
139ideal 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);
145I = intersectZ(I,ideal(64*181,x(1)^2));
146I;
147sortPDZ(primdecZ(I,1));
148sortPDZ(primdecZ(I,2));
149sortPDZ(primdecZ(I,3));
150sortPDZ(primdecZ(I,4));
151
152ring R17 = integer,(x,y,z),dp;
153ideal 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;
159sortPDZ(primdecZ(I,1));
160sortPDZ(primdecZ(I,3));
161
162ring R24 = integer,(a,b,c,d,e,f,g,h,j),dp;
163ideal 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;
165sortPDZ(primdecZ(I,1));
166sortPDZ(primdecZ(I,3));
167
168ring R25 = integer,(s,r,b,u,v,w,x,y,z),dp;
169ideal 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;
171sortPDZ(primdecZ(I,1));
172sortPDZ(primdecZ(I,3));
173
174tst_status(1);$
Note: See TracBrowser for help on using the repository browser.