source: git/Tst/Short/factorizep_s.tst @ fe969a

jengelh-datetimespielwiese
Last change on this file since fe969a was fe969a, checked in by Martin Lee <martinlee84@…>, 10 years ago
chg: added more test polys + the one from libsingular-devel
  • Property mode set to 100755
File size: 13.9 KB
Line 
1LIB "tst.lib";
2tst_init();
3
4proc testfactors (list l, poly f)
5{
6  poly g= 1;
7  for (int i= 1; i <= size (l[1]); i++)
8  {
9    g= g*(l[1][i]^l[2][i]);
10  }
11  g == f;
12  l;
13}
14
15
16
17// polys from L. Bernardin's thesis
18ring r= 17,(x,y),dp;
19list l;
20poly f;
21for (int n=2; n <= 700; n++)
22{
23  f= x^n*y^n+x^((n div 2)+1)*y^(n div 2)*(y+1)+x^2*y+(n+1)*x*y+(n^2+3)*x-2;
24  f;
25  l= factorize (f); testfactors (l, f);
26}
27tst_status();
28
29kill r;
30
31ring r= 31991,(z,w),dp;
32
33list l;
34
35poly f= 10582*w^3*z^4+21325*z^4+29620*w^4*z^3+23697*w*z^3+12439*w^6*z^2+3572*w^3*z^2+5463*z^2+16590*w*z+24885*w^3+31963;
36
37l= factorize (f); testfactors (l, f);
38
39kill r;
40
41ring r= 3, (s,t),dp;
42list l;
43
44poly f= s^85+(t)*s^84+(t^2)*s^83+(-1*t^18)*s^67+(-1*t^19)*s^66+(t^20)*s^65
45+(t^21)*s^64+(t^22)*s^63+(-1*t^24)*s^61+(-1*t^25)*s^60+(t^29)*s^56
46+(t^38)*s^47+(-1*t^39)*s^46+(-1*t^40)*s^45+(-1*t^42)*s^43+(-1*t^43)*s^42
47+(-1*t^45)*s^40+(-1*t^46)*s^39+(t^47)*s^38+(t^56)*s^29+(-1*t^60)*s^25
48+(-1*t^61)*s^24+(t^63)*s^22+(t^64)*s^21+(t^65)*s^20+(-1*t^66)*s^19
49+(-1*t^67)*s^18+(t^83)*s^2+(t^84)*s+(t^85);
50
51l= factorize (f); testfactors (l, f);
52
53kill r;
54
55ring r= 32003, (f,g,v,y,u,x), dp;
56list l;
57poly h= f^3*u^3-4*f^2*g*v*y*u^2 + (8*f^3*v^2*y+6*f^2*g*v^2*x+4*f*g^2*v^2*y^2)*u
58-8*f^3*v^3*x-4*f*g^2*v^3*x*y + g^3*v^3*x^2;
59
60l= factorize (h); testfactors (l, h);
61
62kill r;
63ring r= 32003, (a,b,c,f), dp;
64list l;
65poly h= a^3*b^3*f^4+186*a^2*b^4*c*f^3+11532*a*b^5*c^2*f^2+14307*b^6*c^3*f;
66
67l= factorize (h); testfactors (l, h);
68
69kill r;
70ring r= 32003,(x,y,z),dp;
71list l;
72poly f= x^25+y^23+z^18+x^4*y^10+x^8*y^5+2*x^5*y^8+x^5*y^5*z^3+x^6*y^6;
73
74l= factorize (f); testfactors (l, f);
75
76kill r;
77ring r= 32003, (x,y,z,w),dp;
78list l;
79poly f=
80-573002*x^10+240517*x^9*y+396389*x^8*y^2+535082*x^7*y^3+288429*x^6*y^4
81+763919*x^5*y^5+3766*x^4*y^6-649376*x^3*y^7-59851*x^2*y^8-542799*x*y^9+20979*y^10
82-461020*x^9*z-650459*x^8*y*z-944957*x^7*y^2*z+1677170*x^6*y^3*z+1666154*x^5*y^4*z
83-1232710*x^4*y^5*z+862729*x^3*y^6*z-618762*x^2*y^7*z-705768*x*y^8*z-187036*y^9*z-741032*x^8*z^2
84+1446654*x^7*y*z^2-643320*x^6*y^2*z^2-1635676*x^5*y^3*z^2-189420*x^4*y^4*z^2+682529*x^3*y^5*z^2
85-450284*x^2*y^6*z^2-327970*x*y^7*z^2+66106*y^8*z^2+386688*x^7*z^3+198264*x^6*y*z^3-757313*x^5*y^2*z^3+2008508*x^4*y^3*z^3-675589*x^3*y^4*z^3-2338517*x^2*y^5*z^3+413997*x*y^6*z^3+150157*y^7*z^3
86+115299*x^6*z^4+1838075*x^5*y*z^4-821489*x^4*y^2*z^4-772496*x^3*y^3*z^4+94982*x^2*y^4*z^4
87+552427*x*y^5*z^4+894534*y^6*z^4-173749*x^5*z^5-1322895*x^4*y*z^5+545850*x^3*y^2*z^5
88+1506535*x^2*y^3*z^5+31641*x*y^4*z^5+858761*y^5*z^5+188464*x^4*z^6+676365*x^3*y*z^6
89-1175321*x^2*y^2*z^6-94611*x*y^3*z^6+365391*y^4*z^6-300517*x^3*z^7-74262*x^2*y*z^7
90+756469*x*y^2*z^7+702099*y^3*z^7+651058*x^2*z^8+261997*x*y*z^8+70610*y^2*z^8-493574*x*z^9
91+129784*y*z^9+265065*z^10-532141*x^9*w-285474*x^8*y*w-1300132*x^7*y^2*w+908974*x^6*y^3*w
92-1966687*x^5*y^4*w-127968*x^4*y^5*w+58220*x^3*y^6*w+41679*x^2*y^7*w+479035*x*y^8*w+466832*y^9*w
93+1566035*x^8*z*w+1817709*x^7*y*z*w-688806*x^6*y^2*z*w-748313*x^5*y^3*z*w-1930577*x^4*y^4*z*w
94-957911*x^3*y^5*z*w+81915*x^2*y^6*z*w+133232*x*y^7*z*w+980198*y^8*z*w-110745*x^7*z^2*w
95-1370738*x^6*y*z^2*w-1182195*x^5*y^2*z^2*w+3215028*x^4*y^3*z^2*w-2006230*x^3*y^4*z^2*w
96+2364130*x^2*y^5*z^2*w+1457270*x*y^6*z^2*w+1484168*y^7*z^2*w+1648545*x^6*z^3*w+772215*x^5*y*z^3*w
97+554722*x^4*y^2*z^3*w+667926*x^3*y^3*z^3*w+375356*x^2*y^4*z^3*w+3601160*x*y^5*z^3*w
98+625131*y^6*z^3*w-2510503*x^5*z^4*w-2729919*x^4*y*z^4*w+1243946*x^3*y^2*z^4*w
99+2503349*x^2*y^3*z^4*w+1909123*x*y^4*z^4*w+588366*y^5*z^4*w+94641*x^4*z^5*w+1274333*x^3*y*z^5*w
100+1615834*x^2*y^2*z^5*w-1286036*x*y^3*z^5*w-491438*y^4*z^5*w-864129*x^3*z^6*w+96287*x^2*y*z^6*w
101-1641596*x*y^2*z^6*w-479951*y^3*z^6*w+865513*x^2*z^7*w+37697*x*y*z^7*w-425879*y^2*z^7*w
102-246899*x*z^8*w-1043521*y*z^8*w-615277*z^9*w-353183*x^8*w^2+1903124*x^7*y*w^2+307847*x^6*y^2*w^2
103+153254*x^5*y^3*w^2+4494*x^4*y^4*w^2+775116*x^3*y^5*w^2+84747*x^2*y^6*w^2+1970329*x*y^7*w^2
104+248796*y^8*w^2-200676*x^7*z*w^2-1283772*x^6*y*z*w^2+312236*x^5*y^2*z*w^2+258350*x^4*y^3*z*w^2
105+899318*x^3*y^4*z*w^2+879951*x^2*y^5*z*w^2-197099*x*y^6*z*w^2+1027373*y^7*z*w^2
106-939408*x^6*z^2*w^2+1231368*x^5*y*z^2*w^2+811932*x^4*y^2*z^2*w^2+136753*x^3*y^3*z^2*w^2
107-1060314*x^2*y^4*z^2*w^2-373787*x*y^5*z^2*w^2-419717*y^6*z^2*w^2-602528*x^5*z^3*w^2
108-279785*x^4*y*z^3*w^2+140803*x^3*y^2*z^3*w^2+1245653*x^2*y^3*z^3*w^2+611906*x*y^4*z^3*w^2
109-1166551*y^5*z^3*w^2-878201*x^4*z^4*w^2+597628*x^3*y*z^4*w^2-220458*x^2*y^2*z^4*w^2
110-3038116*x*y^3*z^4*w^2-2785259*y^4*z^4*w^2-425903*x^3*z^5*w^2-316206*x^2*y*z^5*w^2
111-3764903*x*y^2*z^5*w^2-2194636*y^3*z^5*w^2-185521*x^2*z^6*w^2+419827*x*y*z^6*w^2
112-70946*y^2*z^6*w^2+561958*x*z^7*w^2-513594*y*z^7*w^2-487215*z^8*w^2-902070*x^7*w^3
113+260239*x^6*y*w^3-1618965*x^5*y^2*w^3+1123916*x^4*y^3*w^3-1107669*x^3*y^4*w^3-1433250*x^2*y^5*w^3
114+665446*x*y^6*w^3-1463775*y^7*w^3+778712*x^6*z*w^3-80174*x^5*y*z*w^3-93922*x^4*y^2*z*w^3
115+1249290*x^3*y^3*z*w^3+1272307*x^2*y^4*z*w^3+513673*x*y^5*z*w^3-322676*y^6*z*w^3
116-634533*x^5*z^2*w^3-1875741*x^4*y*z^2*w^3-2698209*x^3*y^2*z^2*w^3+937176*x^2*y^3*z^2*w^3
117-2883756*x*y^4*z^2*w^3-1430757*y^5*z^2*w^3+485806*x^4*z^3*w^3+731831*x^3*y*z^3*w^3
118+2196178*x^2*y^2*z^3*w^3-1491104*x*y^3*z^3*w^3-1456373*y^4*z^3*w^3-206031*x^3*z^4*w^3+314576*x^2*y*z^4*w^3-225867*x*y^2*z^4*w^3-2750466*y^3*z^4*w^3-1087247*x^2*z^5*w^3+2172840*x*y*z^5*w^3
119-541045*y^2*z^5*w^3+624945*x*z^6*w^3+1085162*y*z^6*w^3+565094*z^7*w^3-457315*x^6*w^4
120+342040*x^5*y*w^4-681000*x^4*y^2*w^4+297164*x^3*y^3*w^4+689*x^2*y^4*w^4+529745*x*y^5*w^4
121-1310613*y^6*w^4-786298*x^5*z*w^4-1023635*x^4*y*z*w^4-2098764*x^3*y^2*z*w^4+1733995*x^2*y^3*z*w^4
122+1561806*x*y^4*z*w^4+133720*y^5*z*w^4-240204*x^4*z^2*w^4+1124674*x^3*y*z^2*w^4
123+2411690*x^2*y^2*z^2*w^4-600532*x*y^3*z^2*w^4-71275*y^4*z^2*w^4+128215*x^3*z^3*w^4
124+567626*x^2*y*z^3*w^4+973911*x*y^2*z^3*w^4-562780*y^3*z^3*w^4-894759*x^2*z^4*w^4
125+1265582*x*y*z^4*w^4+509433*y^2*z^4*w^4-671007*x*z^5*w^4+345729*y*z^5*w^4+80717*z^6*w^4
126+1144765*x^5*w^5+137320*x^4*y*w^5+390809*x^3*y^2*w^5+207350*x^2*y^3*w^5+65943*x*y^4*w^5
127-1283191*y^5*w^5-109804*x^4*z*w^5+951743*x^3*y*z*w^5-154107*x^2*y^2*z*w^5-394628*x*y^3*z*w^5
128-3201737*y^4*z*w^5+2307230*x^3*z^2*w^5-1082386*x^2*y*z^2*w^5-240669*x*y^2*z^2*w^5
129-1274548*y^3*z^2*w^5-1768397*x^2*z^3*w^5-2788826*x*y*z^3*w^5+1689141*y^2*z^3*w^5
130-1051474*x*z^4*w^5+126201*y*z^4*w^5-789876*z^5*w^5-288558*x^4*w^6-697110*x^3*y*w^6
131+659535*x^2*y^2*w^6-1659535*x*y^3*w^6+371290*y^4*w^6-1605798*x^3*z*w^6+63599*x^2*y*z*w^6
132+273476*x*y^2*z*w^6-774681*y^3*z*w^6-113162*x^2*z^2*w^6+861980*x*y*z^2*w^6
133+1824646*y^2*z^2*w^6-275200*x*z^3*w^6+1083821*y*z^3*w^6+803980*z^4*w^6
134+912560*x^3*w^7-373953*x^2*y*w^7+635559*x*y^2*w^7+2023871*y^3*w^7-252773*x^2*z*w^7
135-1013176*x*y*z*w^7-356255*y^2*z*w^7+412544*x*z^2*w^7-199680*y*z^2*w^7+190561*z^3*w^7
136+33346*x^2*w^8-1189055*x*y*w^8+246983*y^2*w^8-220965*x*z*w^8-273745*y*z*w^8-493392*z^2*w^8
137+411602*x*w^9+853400*y*w^9+1110886*z*w^9-580548*w^10;
138
139l= factorize (f); testfactors (l, f);
140
141kill r;
142ring r= 31991,(x,y,z,w),dp;
143list l;
144poly f= (-15*y^2*z^16+29*w^4*x^12*y^12*z^3+21*x^3*z^2+3*w^15*y^20)*(-1*z^31-w^12*z^20+y^18-y^14+x^2*y^2+x^21+w^2);
145
146l= factorize (f); testfactors (l, f);
147
148f= (w^4*z^3-x*y^2*z^2-w^4*x^5*y^6-w^2*x^3*y)*(-1*x^5-z^3+y*z+x^2*y^3)*(w^4*z^6+y^2*z^3-w^2*x^2*y^2*z^2+x^5*z-x^4*y^2-w^3*x^3*y);
149
150l= factorize (f); testfactors (l, f);
151
152kill r;
153ring r= 2,(x,y),dp;
154list l;
155poly f= x*(x+y)*(x^2+x+y^2)*(x^2+x+y+1)*(x^2+x+y^2+1)*(x^3+x+y^3)*(x^3+x+y+1)*(x^3+x+y^3+1)*(x^3+x+y^3+y+1)*(x^3+x+y^3+y^2+1);
156
157l= factorize (f); testfactors (l, f);
158
159f= x*(x+y)*(x^2+x+y^2)*(x^2+x+y+1)*(x^2+x+y^2+1);
160
161l= factorize (f); testfactors (l, f);
162
163f= (x+y^2)*(x^2+y)*(x+y^4)*(x^4+y);
164
165l= factorize (f); testfactors (l, f);
166
167f= (x+y^2)*(x^2+y);
168
169l= factorize (f); testfactors (l, f);
170
171kill r;
172
173ring r= 3,(x,y),dp;
174list l;
175poly f= (x+y^2)*(x^2+y)*(x+y^4)*(x^4+y);
176
177l= factorize (f); testfactors (l, f);
178
179f= x^3 - y^3;
180
181l= factorize (f); testfactors (l, f);
182
183kill r;
184
185ring r= 5,(x,y,z),dp;
186
187list l;
188
189poly f= (x*z+y+30)*(y*z+x+20)*(z+x*y+10);
190
191l= factorize (f); testfactors (l, f);
192
193f= (x+y^2)*(x^2+y)*(x+y^4)*(x^4+y);
194
195l= factorize (f); testfactors (l, f);
196
197f= x^10 - y^4;
198
199l= factorize (f); testfactors (l, f);
200
201kill r;
202ring r= 101, (a,b,c,d), dp;
203list l;
204poly f= (a-b)*(a^4-7*b* c-4)*(a^5-b+c-11*d^3+1);
205
206l= factorize (f); testfactors (l, f);
207
208kill r;
209ring r= 31991, (x,y,z,w,u,v,s,t), dp;
210list l;
211poly f= x^6*y^3*z^2*(3*z^3+2*w*z-8*x*y^2+14*w^2*y^2-y^2+18*x^3*y)*(w^2*z^3-12*w^2*x*y*z^3+3*x*y^2+29*x-w^2);
212
213l= factorize (f); testfactors (l, f);
214
215f= (22*y^5-18*x^4*y^5-26*x^3*y^4-38*x^2*y^4+29*x^2*y^3-41*x^4*y^2+37*x^4)*(33*x^5*y^6+11*y^2+35*x^3*y-22*x^4);
216
217l= factorize (f); testfactors (l, f);
218
219f= (3*z^3+2*w*z-9*y^3-y^2+45*x^3)*(w^2*z^3+47*x*y-w^2);
220
221l= factorize (f); testfactors (l, f);
222
223f= (z+y+x-3)*(z+y+x-3)*(z+y+x-3);
224
225l= factorize (f); testfactors (l, f);
226
227f= (z+y+x-3)*(z+y+x-3)*(z+y+x-3)*(z+y+x-2)*(z+y+x-2);
228
229l= factorize (f); testfactors (l, f);
230
231f= (z^2+x^3*y^4+u^2)*((y^2+x)*z^2 + 3*u^2*x^3*y^4*z+19*y^2)*(u^2*y^4*z^2+x^2*z+5);
232
233l= factorize (f); testfactors (l, f);
234
235f= (z^2-x^3*y+3)*(z^2+x^3*y^4)*(y^4*z^2+x^2*z+5);
236
237l= factorize (f); testfactors (l, f);
238
239f= (y*z^3+x*y*z+y^2+x^3)*(x*(z^4+1)+z+x^3*y^2);
240
241l= factorize (f); testfactors (l, f);
242
243f= (x^3*(z+y)+z-11)*(x^2*(z^2+y^2)+y+90);
244
245l= factorize (f); testfactors (l, f);
246
247f= x^10 - y^4;
248
249l= factorize (f); testfactors (l, f);
250
251f= (x*z^2+2*x*z*w+x*w^2+z^2+w+2*z*w)*(x*z^2+2*x*z*w+x*w^2+z);
252
253l= factorize (f); testfactors (l, f);
254
255f= (x^2-x*z+z*y+2)*(x^2+3*x-y^2-15);
256
257l= factorize (f); testfactors (l, f);
258
259f= (z^3+x*y*z+y^2+x^3)*(x*(z^4+1)+z+x^3*y^2);
260
261l= factorize (f); testfactors (l, f);
262
263f= (x^2*y+x*y+1)*(x^2*y+2*x*y+3)*(2*x^2*y+3*x*y+5)*(3*x^2*y+4*x*y+7);
264
265l= factorize (f); testfactors (l, f);
266
267f= w^2*x^7*y^6*12*z^5+31962*z^2*y^5*x^7+87*z^5*y^3*x^7+31967*z^2*y^7*x^8+31759*z^2*y^5*x^8+31988*z^2*y^7*x^7+54*z^2*y^6*x^10+522*z^2*y^4*x^10+9*z^5*y^5*x^7+z^2*y^5*x^6*w^2+3*z^8*y^3*x^6*w^2+2*z^6*y^3*x^6*w^3+31989*z^3*y^3*x^6*w^3+31977*z^2*y^5*x^6*w^4+31988*z^5*y^3*x^6*w^2+414*z^2*y^5*x^7*w^2+42*z^2*y^7*x^7*w^2+14*z^5*y^5*x^6*w^4+31990*z^5*y^5*x^6*w^2+31973*z^2*y^4*x^9*w^2+58*z^3*y^3*x^7*w+31955*z^8*y^4*x^7*w^2+6*z^3*y^5*x^7*w+31967*z^6*y^4*x^7*w^3+96*z^5*y^6*x^8*w^2+31983*z^5*y^5*x^7*w^2+31823*z^5*y^6*x^7*w^4+31775*z^5*y^5*x^10*w^2+18*z^5*y^4*x^9*w^2;
268
269l= factorize (f); testfactors (l, f);
270
271f= (z+x*y+10)*(x*z+y+30)*(y*z+x+20);
272
273l= factorize (f); testfactors (l, f);
274
275f= (x^3*y+x^3*z+z-11)*(x^2*z^2+x^2*y^2+y+90);
276
277l= factorize (f); testfactors (l, f);
278
279f= (x-w)*(y-w)*(x-y)*(z-w)*(x-z)*(y-z);
280
281l= factorize (f); testfactors (l, f);
282
283f= (10*y+x^3+9)*(6*x*y^2+x+y+x^3+15);
284
285l= factorize (f); testfactors (l, f);
286
287f= (3*z^3+2*w*z-10*y^2+45*x^3)*(w^2*z^3+47*x*y-w^2);
288
289l= factorize (f); testfactors (l, f);
290
291f= (x^2-10748*y*x+y^2)*(y^2+x^2)*(x^2+10748*y*x+y^2);
292
293l= factorize (f); testfactors (l, f);
294
295f= (y*z-x*z+x^2+2)*(z^3-y^2+x^2+3*x-15);
296
297l= factorize (f); testfactors (l, f);
298
299f= (x+y+z)*(z-y+x)*(x-z-y);
300
301l= factorize (f); testfactors (l, f);
302
303f= (y*z+x*y^2+9)*(y*z+x*z+x^2*y);
304
305l= factorize (f); testfactors (l, f);
306
307f= (3*z^2+2*y^2+x^2)*(4*z^2-3*y^2+2*x^2);
308
309l= factorize (f); testfactors (l, f);
310
311f= x^4 + y^3 + z^5;
312
313l= factorize (f); testfactors (l, f);
314
315f= -9944*(x^2-5265*x+14343)*(x^2+5943*x-3555)*(x-8995)*(x-15035);
316
317l= factorize (f); testfactors (l, f);
318
319f= x^8 + x +1 ;
320
321l= factorize (f); testfactors (l, f);
322
323f= x^14-1;
324
325l= factorize (f); testfactors (l, f);
326
327kill r;
328
329ring r = (2,a),(x,y),dp;
330minpoly = a^2 + a + 1;
331poly f=(a + 1)*x^145*y^84 + (a + 1)*x^205*y^17 + x^32*y^112 + x^92*y^45;
332poly g = x7y11+xy17+(a)*x7y10+(a)*xy16+(a)*x8y8+(a+1)*x8y7+(a)*y12+(a+1)*x8y3+(a+1)*x2y9+(a+1)*y11+x9+xy4;
333list l;
334for (int i= 1; i < 33002; i= i+33)
335{
336  system ("--random", i);
337  l= factorize (f);
338  if (size (l[1]) != 5)
339  {
340    l;
341    break;
342  }
343  system ("--random", i);
344  l= factorize (g);
345  testfactors (l,g);
346}
347
348ring r = 2,(x,y),dp;
349poly f=x^6 + y^5 + x^5 + y^4;
350poly g=x^6 + y^6 + x^5 + x^3 + x + 1;
351poly h=x^6 + x*y^5 + y^5 + y^4 + x*y^2 + y^3 + 1;
352list l1, l2, l3;
353for (int i= 1; i < 33002; i= i+33)
354{
355  system ("--random", i);
356  l1= factorize (f);
357  l2= factorize (g);
358  l3= factorize (h);
359  l1;
360  l2;
361  l3;
362  if (size (l1[1]) != 2)
363  {
364    l1;
365    break;
366  }
367  if (size (l2[1]) != 3)
368  {
369    l2;
370    break;
371  }
372  if (size (l3[1]) != 3)
373  {
374    l3;
375    break;
376  }
377}
378
379// tr. 440
380kill r;
381ring r=7,(x,y),dp;
382poly f = y^5*x^4 - y^2*x^7 - y^3 + x^3;
383list l=factorize(f);
384size (l[1]) < 6;
385testfactors (l,f);
386
387
388kill r;
389ring r=2,(x,y),dp;
390poly f= (x^6*y+x^4*y^2+x^5+x^2*y^2+x^2*y+y^2+x)*(x^6*y^2+y^7+x^3*y^3+x^4+y);
391list l= factorize (f);
392testfactors (l, f);
393
394f= (x^3*y^2+y^3+x^2+1)*(x^2*y^6+x^4*y^2+y^4+y^3+x*y+x+1);
395l= factorize (f);
396testfactors (l, f);
397
398
399f= (x^3*y^4+y^3+x+1)*(x*y^7+y^6+x^2*y^2+x^3+x*y+y);
400l= factorize (f);
401testfactors (l, f);
402
403
404f= (x^4*y^3+x^2*y^4+x^5+x*y^2+1)*(x^2*y^6+x*y^5+x*y^4+x^2*y^2+x^2*y+y);
405l= factorize (f);
406testfactors (l, f);
407
408
409f= (x^5+x*y^2+y)*(x^4*y^2+x^3+x*y+1);
410l= factorize (f);
411testfactors (l, f);
412
413
414f= (x^2*y^3+y^3+x^2+x)*(x^7+x^5*y+x^2*y^3+y^3+1);
415l= factorize (f);
416testfactors (l, f);
417
418
419f= (x^3*y+x*y+1)*(x^5*y+x*y^4+x^2*y^2+y^2+y+1);
420l= factorize (f);
421testfactors (l, f);
422
423
424f= (x^4*y^2+x^3*y+x*y+1)*(x*y^5+y^5+x^2*y+x*y+x+1);
425l= factorize (f);
426testfactors (l, f);
427
428
429
430f= (y^6+x^5+y^3+x)*(x^2*y^3+y^4+y);
431l= factorize (f);
432testfactors (l, f);
433
434
435f= (x*y^3+x*y^2+1)*(x^3*y^3+x^4*y+1);
436l= factorize (f);
437testfactors (l, f);
438
439
440f= (x^4*y^2+x^3*y^2+x*y+1)*(x^6+y^5);
441l= factorize (f);
442testfactors (l, f);
443
444
445f= (x^5*y+x^2*y^3+x*y^3+x^2+y+1)*(x*y^5+x^2);
446l= factorize (f);
447testfactors (l, f);
448
449
450f= (x^2*y^3+x*y^2+x+1)*(x^5+x*y^2+x*y+1);
451l= factorize (f);
452testfactors (l, f);
453
454
455f= (x^6+x*y^2+x^2+y)*(y^5+x^3*y+y+1);
456l= factorize (f);
457testfactors (l, f);
458
459
460f= (y^6+x*y^4+y^4+y^3+1)*(y^6+x^5+x^2*y^2+x^2*y+x*y+1);
461l= factorize (f);
462testfactors (l, f);
463
464
465f= (x^5+y^3+x)*(x*y^5+x^3*y+x^2+y);
466l= factorize (f);
467testfactors (l, f);
468
469
470f=x^2*y^5+x^4*y^2+x^2*y^4+x^4*y+x^3*y^2+x*y^4+x^2*y^2+y^3+x^2+x*y+x+1;
471l= factorize (f);
472testfactors (l,f);
473
474
475kill r;
476// from P. Zimmermann via libsingular-devel
477ring r = 2,(y,t),dp;
478poly f = y*t^8 + y^5*t^2 + y*t^6 + t^7 + y^6 + y^5*t + y^2*t^4 + y^2*t^2 +
479y^2*t + t^3 + y^2 + t^2;
480def l=factorize (f);
481testfactors (l, f);
482tst_status(1);$
Note: See TracBrowser for help on using the repository browser.