1 | // File: hnoether_l.tst |
---|
2 | // Intensive tests for hnoether lib |
---|
3 | LIB "tst.lib"; |
---|
4 | tst_init(); |
---|
5 | LIB "hnoether.lib"; |
---|
6 | // ------------ test of develop: ------------------- |
---|
7 | ring zuklein=0,x,dp; |
---|
8 | develop(x2+2x3); |
---|
9 | ring r=0,(x,y),ds; |
---|
10 | develop(x2+2x+3+y); |
---|
11 | develop(0); |
---|
12 | develop(x2+y2); |
---|
13 | develop(x2+y+y2); |
---|
14 | develop(2x2+3xy+4xy3-x2y); |
---|
15 | poly p_1 = y2+x3; |
---|
16 | poly p_2 = p_1^2 + x5y; |
---|
17 | poly p_3 = p_2^2 + x^10 *p_1; |
---|
18 | poly p_4 = p_3^2 + x^20 *p_2; |
---|
19 | poly p_5 = p_4^2 + x^40 *p_3; |
---|
20 | param(develop(p_2)); |
---|
21 | int z=timer; |
---|
22 | param(develop(p_4)); |
---|
23 | tst_ignore(timer-z,"time"); |
---|
24 | z=timer; |
---|
25 | list hne=develop(p_4,-1); |
---|
26 | tst_ignore(timer-z,"time"); |
---|
27 | print(extdevelop(hne,4)[1]); |
---|
28 | tst_ignore(timer-z,"time"); |
---|
29 | z=timer; |
---|
30 | print(develop(p_4,4)[1]); |
---|
31 | tst_ignore(timer-z,"time"); |
---|
32 | poly heme=xy8+y8+x4y6+4x3y6+2x5y5+6x6y4+4x8y3+x10y2+4x9y2+2x11y+x12; |
---|
33 | hne=develop(heme); |
---|
34 | print(hne[1]); |
---|
35 | ring R=32003,(x,y),dp; |
---|
36 | poly p_5=imap(r,p_5); |
---|
37 | z=timer; |
---|
38 | print(develop(p_5,-1)[1]); |
---|
39 | tst_ignore(timer-z,"time"); |
---|
40 | kill r; |
---|
41 | ring r=32003,(x,y),ls; |
---|
42 | poly p_5=fetch(R,p_5); |
---|
43 | z=timer; |
---|
44 | print(develop(p_5,-1)[1]); |
---|
45 | tst_ignore(timer-z,"time"); |
---|
46 | kill r,R; |
---|
47 | ring r=2,(x,y,t),ds; |
---|
48 | poly f=y2+x7y+x9+x8; |
---|
49 | param(develop(f)); |
---|
50 | kill r; |
---|
51 | ring r=7,(x,y),dp; |
---|
52 | poly f=2*(y-3x7)^14; |
---|
53 | develop(f+x12y14); |
---|
54 | develop(f+x7y14); |
---|
55 | kill r; |
---|
56 | ring r=(0,i),(a,b),dp; |
---|
57 | develop(a2+ib3); |
---|
58 | develop(a5+i2*a4+2i*a2b+b2); |
---|
59 | kill r; |
---|
60 | ring r=(0,i),(a,b),dp; |
---|
61 | minpoly=i2+1; |
---|
62 | develop(a2+ib3); |
---|
63 | develop(a5+i2*a4+2i*a2b+b2); |
---|
64 | develop((a+2b)^2+ib5); |
---|
65 | kill r; |
---|
66 | ring r=(7,i),(x,y),dp; |
---|
67 | develop(x+y); |
---|
68 | kill r; |
---|
69 | ring r=(7,i),(x,y),dp; |
---|
70 | minpoly=i2+1; |
---|
71 | develop(x); |
---|
72 | kill r; |
---|
73 | ring r=(49,k),(g,h),Dp; |
---|
74 | develop(g3+h4); |
---|
75 | develop((g2+2h)^7+h9); |
---|
76 | kill r; |
---|
77 | ring r=real,(x,y),dp; |
---|
78 | develop(x-y); |
---|
79 | kill r; |
---|
80 | ring r=(11,a,b,c),(d,e,f),ls; |
---|
81 | develop(ad2+a2b3e3+2bc4e4); |
---|
82 | kill r; |
---|
83 | |
---|
84 | // ------------ test of hnexpansion: ------------------- |
---|
85 | setring zuklein; |
---|
86 | hnexpansion(x); |
---|
87 | ring r=7,(a,b),dp; |
---|
88 | hnexpansion(a6+b4); |
---|
89 | kill r; |
---|
90 | ring r=0,(x,y),dp; |
---|
91 | hnexpansion(x6-y4); |
---|
92 | hnexpansion((x6-y4)*(y6-x4)); |
---|
93 | hnexpansion((y-x2+x3)*(y-x2-x3)); |
---|
94 | hnexpansion((x7-2x4y2+xy4-1y5)*(x7-4x4y2+4xy4-1y5)); |
---|
95 | hnexpansion((y2-x3)*(y2-x3-x4)); |
---|
96 | hnexpansion((y2-x3-x4)*(y2+x3+x4)); |
---|
97 | hnexpansion(((x2-y)^2+x5)*((2x2-y)^2+x5)); |
---|
98 | hnexpansion(x2+1+y3); |
---|
99 | hnexpansion(0); |
---|
100 | kill r; |
---|
101 | ring r=(49,i),(x,y),dp; |
---|
102 | def L=hnexpansion(x); |
---|
103 | def HNring = L[1]; setring HNring; displayHNE(hne); |
---|
104 | kill L,HNring,r; |
---|
105 | ring r=(7,i),(x,y),dp; |
---|
106 | list hne=hnexpansion(x3+y6); |
---|
107 | displayHNE(hne); |
---|
108 | kill hne; |
---|
109 | def L=hnexpansion((x2+y4)*(x+y4)); |
---|
110 | def HNring = L[1]; setring HNring; displayHNE(hne); |
---|
111 | setring r; |
---|
112 | kill L,HNring; |
---|
113 | hnexpansion(x2+y4); |
---|
114 | kill r; |
---|
115 | ring r=(0,e),(x,y),lp; |
---|
116 | hnexpansion(x2-y2); |
---|
117 | hnexpansion(x2-ey2); |
---|
118 | kill r; |
---|
119 | ring r=(32003,i),(x,y),dp; |
---|
120 | minpoly=i2+1; |
---|
121 | param(hnexpansion(x2+y4)); |
---|
122 | kill r; |
---|
123 | ring r=(32003,i),(x,y),dp; |
---|
124 | minpoly=i2+i+1; |
---|
125 | param(hnexpansion(x2+y4)); |
---|
126 | kill r; |
---|
127 | ring r=real,(x,y),dp; |
---|
128 | hnexpansion(x); |
---|
129 | kill r; |
---|
130 | ring r=(11,a,b,c),(d,e,f,g),dp; |
---|
131 | list L=hnexpansion(a2bd2+bce3+a2c3e4); |
---|
132 | displayHNE(L); |
---|
133 | kill r; |
---|
134 | ring r=(11,a,b,c),(d,e),Ds; |
---|
135 | hnexpansion(a2bd2+bce3+a2c3e4); |
---|
136 | kill r; |
---|
137 | ring r=(11,a),(x,y,z),wp(1,2,3); |
---|
138 | minpoly=a2+4; |
---|
139 | list L=hnexpansion(x2+ay3); |
---|
140 | param(L,1); |
---|
141 | kill r; |
---|
142 | ring F2=2,(x,y,t),ds; |
---|
143 | poly f=y2+x7y+x9+x8; |
---|
144 | def L=hnexpansion(f); |
---|
145 | def P=param(L[1],1); |
---|
146 | map phi=F2,P[1][1],P[1][2]; |
---|
147 | phi(f); |
---|
148 | kill L,P,phi,F2; |
---|
149 | |
---|
150 | //--------------- examples with change to ring extension |
---|
151 | ring R=32003,(x,y),dp; |
---|
152 | poly f=(x6+(y-x)^4)*(y+x); |
---|
153 | def L=hnexpansion(f); |
---|
154 | def HNring = L[1]; setring HNring; displayHNE(hne); |
---|
155 | setring R; |
---|
156 | kill HNring; |
---|
157 | f=x19-4x18+3x17+8x16y-1x16-10x15y-4x14y2+6x14y+10x13y2-16x12y2+26x10y3-5x9y4 |
---|
158 | -30x8y4+2x7y5+26x6y5-16x4y6+6x2y7-1y8; |
---|
159 | L=hnexpansion(f); |
---|
160 | def HNring = L[1]; setring HNring; displayHNE(hne); |
---|
161 | setring R; |
---|
162 | kill HNring; |
---|
163 | f=x29-6x28+14x27+12x26y-18x26-56x25y-6x24y2+13x25+110x24y+84x23y2-5x24 |
---|
164 | -108x23y-282x22y2-56x21y3+54x22y+396x21y2+390x20y3+14x19y4-266x20y2 |
---|
165 | -840x19y3-310x18y4+790x18y3+1134x17y4+138x16y5-1575x16y4-1008x15y5 |
---|
166 | -30x14y6+2220x14y5+588x13y6+2x12y7-2268x12y6-216x11y7+1692x10y7+45x9y8 |
---|
167 | -915x8y8-4x7y9+350x6y9-90x4y10+14x2y11-1y12; |
---|
168 | L=hnexpansion(f); |
---|
169 | def HNring = L[1]; setring HNring; displayHNE(hne); |
---|
170 | displayInvariants(hne); |
---|
171 | setring R; |
---|
172 | kill HNring; |
---|
173 | L=hnexpansion(xy6+x3y4-4x5y3+6x7y2-4x9y+x11,"ess"); |
---|
174 | def HNring = L[1]; setring HNring; displayHNE(hne); |
---|
175 | setring R; kill HNring; |
---|
176 | L=hnexpansion(y10-4x3y8+6x6y6-4x9y4+x12y2+x16,"ess"); |
---|
177 | L[2]; |
---|
178 | def HNring = L[1]; setring HNring; |
---|
179 | def P=param(hne[1]); |
---|
180 | map phi=HNring,P[1][1],P[1][2]; |
---|
181 | phi(f); |
---|
182 | kill P,phi; |
---|
183 | setring R; kill HNring; |
---|
184 | L=hnexpansion((y10-4x3y8+6x6y6-4x9y4+x12y2+x16)*(x6-y4),"ess"); |
---|
185 | L[2]; |
---|
186 | def HNring = L[1]; setring HNring; displayHNE(hne); |
---|
187 | ideal P; map phi; |
---|
188 | for (int i=1; i<=size(hne); i++) |
---|
189 | { |
---|
190 | P=param(hne[i]); |
---|
191 | phi=HNring,P[1],P[2]; |
---|
192 | phi(f); |
---|
193 | } |
---|
194 | kill i,P,phi,L,HNring,R; |
---|
195 | |
---|
196 | ring r=0,(x,y),ds; |
---|
197 | poly g=x12+y15+x13+x16; |
---|
198 | def L=hnexpansion(g,1); |
---|
199 | L[2]; |
---|
200 | def HNring = L[1]; setring HNring; displayHNE(hne); |
---|
201 | ideal P; map phi; |
---|
202 | for (int i=1; i<=size(hne); i++) |
---|
203 | { |
---|
204 | P=param(hne[i]); |
---|
205 | phi=HNring,P[1],P[2]; |
---|
206 | ord(phi(f)); |
---|
207 | } |
---|
208 | kill i,P,phi,L,HNring; |
---|
209 | setring r; |
---|
210 | poly f=(x2-y2)*(x2+y2)*(x2+y4); |
---|
211 | def L=hnexpansion(f,"ess"); |
---|
212 | L[2]; |
---|
213 | def HNring = L[1]; setring HNring; displayHNE(hne); |
---|
214 | setring r; kill HNring; |
---|
215 | f=(x2-y2)*(x2+y2)*(2y2+x4)*(y2-x7)*(2x2+y4); |
---|
216 | L=hnexpansion(f,"ess"); |
---|
217 | L[2]; |
---|
218 | def HNring = L[1]; setring HNring; displayHNE(hne); |
---|
219 | setring r; kill HNring; |
---|
220 | f=(y2+x2)*(x2-y3)*(x6-13y12); |
---|
221 | L=hnexpansion(f,1); |
---|
222 | L[2]; |
---|
223 | def HNring = L[1]; setring HNring; |
---|
224 | ideal P; map phi; |
---|
225 | for (int i=1; i<=size(hne); i++) |
---|
226 | { |
---|
227 | P=param(hne[i]); |
---|
228 | phi=HNring,P[1],P[2]; |
---|
229 | phi(f); |
---|
230 | } |
---|
231 | kill i,P,phi,HNring,L,r; |
---|
232 | ring r=(0,a),(x,y),ds; |
---|
233 | minpoly=a2-2; |
---|
234 | poly f=(x2-y2)*(x2+y2)*(2y2+x4)*(y2-x7)*(2x2+y4); |
---|
235 | def L=hnexpansion(f,1); |
---|
236 | L[2]; |
---|
237 | def HNring = L[1]; setring HNring; |
---|
238 | ideal P; map phi; |
---|
239 | for (int i=1; i<=size(hne); i++) |
---|
240 | { |
---|
241 | P=param(hne[i]); |
---|
242 | phi=HNring,P[1],P[2]; |
---|
243 | phi(f); |
---|
244 | } |
---|
245 | kill i,P,phi,HNring,L; |
---|
246 | |
---|
247 | //--------------- examples with more than one ring change |
---|
248 | ring F3=3,(x,y),dp; |
---|
249 | list L=hnexpansion((x3-xy2+y3)*(x2+y2)*(x4-x3y+xy3+y4)); |
---|
250 | def HNring = L[1]; setring HNring; |
---|
251 | map T; int i; |
---|
252 | for (i=1; i<=size(hne); i++) { |
---|
253 | T=basering,param(hne[i]); |
---|
254 | T(f); |
---|
255 | } |
---|
256 | displayHNE(hne); |
---|
257 | def displayRing=displayHNE(hne[3],1); |
---|
258 | setring displayRing; HNE; |
---|
259 | kill displayRing,HNring,i; |
---|
260 | setring F3; |
---|
261 | poly f=(x3-xy4+y6)*(x2+y2)*(x4-x3y+xy3+y4); |
---|
262 | L=hnexpansion(f,1); |
---|
263 | L[2]; |
---|
264 | def HNring = L[1]; setring HNring; |
---|
265 | map T; int i; |
---|
266 | for (i=1; i<=size(hne); i++) { |
---|
267 | T=basering,param(hne[i]); |
---|
268 | T(f); |
---|
269 | } |
---|
270 | kill HNring,i; |
---|
271 | setring F3; |
---|
272 | f=(x3-xy4+y6)*(x2+y6)*(x4-x3y4+xy12+y16); |
---|
273 | L=hnexpansion((x3-xy4+y6)*(x2+y6)*(x4-x3y4+xy12+y16)); |
---|
274 | def HNring = L[1]; setring HNring; |
---|
275 | map T; int i; |
---|
276 | for (i=1; i<=size(hne); i++) { |
---|
277 | T=basering,param(hne[i]); |
---|
278 | T(f); |
---|
279 | } |
---|
280 | kill L,HNring,i; |
---|
281 | |
---|
282 | ring r=199,(x,y),ds; |
---|
283 | poly g=y36+6x8y30-24x9y30+15x16y24-x17y24+20x24y18+41x18y24+42x25y18 |
---|
284 | +15x32y12+31x26y18-42x33y12-86x27y18+6x40y6+23x34y12+x41y6-75x35y12 |
---|
285 | +x48+31x42y6+59x36y12+24x49+75x43y6+41x50-64x44y6+86x51+25x45y6+59x52 |
---|
286 | -25x53-83x54; |
---|
287 | def L=hnexpansion(g); |
---|
288 | invariants(L); |
---|
289 | delta(L); |
---|
290 | delta(g); |
---|
291 | L=hnexpansion(g,1); |
---|
292 | L[2]; |
---|
293 | invariants(L); |
---|
294 | def HNring = L[1]; setring HNring; displayHNE(hne); |
---|
295 | kill L,r,HNring; |
---|
296 | |
---|
297 | // -------------- bigger examples with timings |
---|
298 | ring r=0,(x,y),dp; |
---|
299 | poly p_1 = y2+x3; |
---|
300 | poly p_2 = p_1^2 + x5y; |
---|
301 | poly p_3 = p_2^2 + x^10 *p_1; |
---|
302 | poly p_4 = p_3^2 + x^20 *p_2; |
---|
303 | poly p_5 = p_4^2 + x^40 *p_3; |
---|
304 | z=timer; |
---|
305 | list L=hnexpansion(p_1*p_2*p_3*p_4); |
---|
306 | tst_ignore(timer-z,"time"); |
---|
307 | tst_ignore(kmemory(),"memory"); |
---|
308 | print(L[3][1]); |
---|
309 | print(L[4][1]); |
---|
310 | displayInvariants(L); |
---|
311 | z=timer; |
---|
312 | L=hnexpansion(p_5); |
---|
313 | tst_ignore(timer-z,"time"); |
---|
314 | tst_ignore(kmemory(),"memory"); |
---|
315 | print(L[1][1]); |
---|
316 | displayInvariants(L); |
---|
317 | displayInvariants(L[1]); |
---|
318 | kill r; |
---|
319 | ring r=0,(x,y),ds; |
---|
320 | poly f=(x4-2y6)*(x10+y14+x16+y17)+x30+4x24y8+y32; |
---|
321 | z=timer; |
---|
322 | def L=hnexpansion(f); |
---|
323 | tst_ignore(timer-z,"time"); |
---|
324 | tst_ignore(kmemory(),"memory"); |
---|
325 | def HNring = L[1]; setring HNring; displayHNE(hne); |
---|
326 | kill L,HNring,r; |
---|
327 | |
---|
328 | ring r=32003,(x,y),ds; |
---|
329 | poly p_1 = y4+x6; |
---|
330 | poly p_2 = y7-2x14; |
---|
331 | poly p_3 = p_1^14 + p_2^10+x100+y83; |
---|
332 | z=timer; |
---|
333 | def L=hnexpansion(p_3,"ess"); |
---|
334 | tst_ignore(timer-z,"time"); |
---|
335 | tst_ignore(kmemory(),"memory"); |
---|
336 | L[2]; |
---|
337 | def HNring = L[1]; setring HNring; displayHNE(hne); |
---|
338 | kill r,L,HNring; |
---|
339 | |
---|
340 | // irreducible example with 3 Puiseux pairs over algebraic number field |
---|
341 | // (no field extension needed) |
---|
342 | ring r=(199,a),(x,y,t),ds; |
---|
343 | minpoly = 5+12a+3a2-4a3+3a4+a6; |
---|
344 | number I = 23-94a+94a2-38a3-81a4-91a5; // I^2 = -1 |
---|
345 | number sq = -23+95a-94a2+38a3+81a4+91a5; // sq^3 = 2 |
---|
346 | ideal J = x-t^12, |
---|
347 | y-I*t^16-sq*t^18-t^19; |
---|
348 | def f=eliminate(J,t)[1]; |
---|
349 | def L=hnexpansion(f); |
---|
350 | displayInvariants(L[1]); |
---|
351 | |
---|
352 | // Example with 1 field extension, 6 conjugate branches, 3 Puiseux pairs |
---|
353 | ring r=199,(x,y),ds; |
---|
354 | poly g=y48+24*x3y46+77*x6y44+34*x9y42+79*x12y40+56*x9y43-82*x15y38-93*x12y41 |
---|
355 | +72*x18y36+12*x15y39+43*x21y34+42*x18y37-6*x15y40-33*x24y32-99*x21y35 |
---|
356 | -96*x18y38+74*x27y30+56*x24y33-74*x21y36-88*x30y28-41*x27y31-70*x24y34 |
---|
357 | +87*x33y26+37*x30y29+36*x27y32+81*x24y35-55*x36y24-78*x33y27-27*x30y30 |
---|
358 | +91*x27y33+87*x39y22+88*x36y25-56*x33y28-87*x30y31-88*x42y20+32*x39y23 |
---|
359 | -87*x36y26+14*x33y29+15*x30y32+74*x45y18+42*x42y21-2*x39y24-92*x36y27 |
---|
360 | +44*x33y30-33*x48y16-86*x45y19-39*x42y22-17*x39y25+42*x36y28+43*x51y14 |
---|
361 | +58*x48y17+24*x45y20-27*x42y23-2*x39y26+72*x54y12-93*x51y15+40*x48y18 |
---|
362 | -28*x45y21+84*x42y24+45*x39y27-82*x57y10+80*x54y13+16*x51y16+18*x48y19 |
---|
363 | -21*x45y22-19*x42y25+79*x60y8+70*x57y11+20*x54y14+31*x51y17+85*x48y20 |
---|
364 | +99*x45y23+34*x63y6-9*x60y9-95*x57y12-97*x54y15+17*x51y18-33*x48y21 |
---|
365 | -20*x45y24+77*x66y4-88*x63y7-57*x60y10+86*x57y13+82*x54y16+64*x51y19 |
---|
366 | -58*x48y22+24*x69y2+83*x66y5-94*x63y8+25*x60y11-34*x57y14-59*x54y17 |
---|
367 | -50*x51y20+x72-16*x69y3-77*x66y6+77*x63y9+83*x60y12+62*x54y18+81*x72y |
---|
368 | +73*x69y4-25*x66y7+96*x63y10+27*x60y13+56*x57y16+13*x54y19+93*x72y2 |
---|
369 | +71*x69y5-46*x66y8+58*x63y11+38*x60y14-78*x57y17+77*x75+91*x72y3 |
---|
370 | -5*x69y6-65*x66y9-7*x63y12+93*x60y15-40*x75y-38*x72y4-11*x69y7+31*x66y10 |
---|
371 | +21*x63y13+15*x60y16+92*x75y2+29*x72y5+76*x69y8-84*x66y11+76*x63y14 |
---|
372 | -34*x78+65*x75y3-42*x72y6+4*x69y9+10*x66y12-83*x78y+62*x75y4-2*x72y7 |
---|
373 | +39*x69y10-48*x78y2+28*x75y5-23*x72y8+31*x69y11-41*x81+72*x78y3+14*x75y6 |
---|
374 | -21*x72y9+8*x81y+94*x78y4-87*x75y7+50*x81y2+74*x78y5-6*x75y8+61*x84 |
---|
375 | -79*x81y3-95*x78y6+58*x84y-35*x81y4+19*x84y2-81*x87-27*x84y3+77*x87y+x90; |
---|
376 | z=timer; |
---|
377 | list L=hnexpansion(g); |
---|
378 | tst_ignore(timer-z,"time"); |
---|
379 | tst_ignore(kmemory(),"memory"); |
---|
380 | def HNring = L[1]; setring HNring; displayHNE(hne); |
---|
381 | setring r; kill HNring; |
---|
382 | z=timer; |
---|
383 | L=hnexpansion(g,"ess"); |
---|
384 | tst_ignore(timer-z,"time"); |
---|
385 | tst_ignore(kmemory(),"memory"); |
---|
386 | L[2]; |
---|
387 | |
---|
388 | // ------------ test of extdevelop: ------------------- |
---|
389 | list hne=develop(x2+y3+y4-y5,-1); |
---|
390 | show(extdevelop(hne,2)); |
---|
391 | show(extdevelop(hne,4)); |
---|
392 | show(extdevelop(hne,10)); |
---|
393 | kill hne,r; |
---|
394 | ring r=(49,i),(x,y),ls; |
---|
395 | list hne=develop((x2+iy3)^7+x15); |
---|
396 | show(extdevelop(hne,8)); |
---|
397 | kill hne; |
---|
398 | // ------------ test of essdevelop: ------------------- |
---|
399 | setring F3; |
---|
400 | list L=essdevelop((x3-xy2+y3)*(x2+y2)*(x4-x3y+xy3+y4)); |
---|
401 | L[2]; |
---|
402 | def HNring = L[1]; setring HNring; displayHNE(hne); |
---|
403 | def rr=r; |
---|
404 | map T; int ii; |
---|
405 | for (ii=1; ii<=size(hne); ii++) { |
---|
406 | T=basering,param(hne[ii]); |
---|
407 | T(f); |
---|
408 | } |
---|
409 | kill T,f,ii; |
---|
410 | setring F3; |
---|
411 | kill HNring; |
---|
412 | L=essdevelop(x2+y3+xy4); |
---|
413 | L[2]; |
---|
414 | displayHNE(L[1]); |
---|
415 | displayHNE(develop(x2+y3+xy4)); |
---|
416 | setring r; |
---|
417 | kill F3; |
---|
418 | |
---|
419 | // ------------ more tests of hnexpansion: -------------------- |
---|
420 | list L=hnexpansion((x2+iy3)^7+x15); |
---|
421 | def HNring = L[1]; setring HNring; displayHNE(hne); |
---|
422 | show(extdevelop(hne[1],8)); // Fehler in factorize endlos! |
---|
423 | map T=basering,param(hne[1]); |
---|
424 | T(f); |
---|
425 | kill T; |
---|
426 | setring r; kill HNring; |
---|
427 | L=hnexpansion((x2+iy3)^6+x15); // Als Ersatz fuer die Zwischenzeit |
---|
428 | def HNring = L[1]; setring HNring; |
---|
429 | map T=basering,param(hne[1]); |
---|
430 | ord(T(f)); |
---|
431 | kill L,HNring,r; |
---|
432 | |
---|
433 | ring r=(0,i),(a,b),ds; |
---|
434 | minpoly=i2+1; |
---|
435 | list L=hnexpansion(a2+ib3-ia3b); |
---|
436 | show(L); |
---|
437 | kill r; |
---|
438 | ring r=0,(x,y),ds; |
---|
439 | displayHNE(hnexpansion((x3+3x2y-xy4+y10)*(x3-x2y+y8))); |
---|
440 | // ------------ more tests of param: ------------------------ |
---|
441 | param(develop(x+1+y2)); |
---|
442 | param(develop(x2+y3)); |
---|
443 | param(develop(y2+x3)); |
---|
444 | param(develop(x+y2-y3)); |
---|
445 | param(develop(x2+y3+y4)); |
---|
446 | param(develop((x-2y3)^2+x3)); |
---|
447 | param(develop(y+x2-y3)); |
---|
448 | param(develop((y-2x3)^2+x7)); |
---|
449 | param(develop((y-2x3)^2+x7),0); |
---|
450 | param(develop(x+y2-y3),0); |
---|
451 | param(develop(x2+y3+y4),"Fritz"); |
---|
452 | param(develop(y2+x3+x4),x); |
---|
453 | z=timer; |
---|
454 | param(develop((y-2x3)^2+y5)); |
---|
455 | tst_ignore(timer-z,"time"); |
---|
456 | kill r; |
---|
457 | ring r=(27,j),(k,l,t),lp; |
---|
458 | list hne=develop((k3-jl)^6+l7,9); |
---|
459 | param(hne); |
---|
460 | // ------------ test of displayHNE: ------------------- |
---|
461 | displayHNE(hne); |
---|
462 | kill r; |
---|
463 | ring r=3,(k,l,t),lp; |
---|
464 | list hne=develop((k3+l)^6+l7,9); |
---|
465 | displayHNE(hne); |
---|
466 | def RR=displayHNE(hne,1); |
---|
467 | setring RR; HNE; |
---|
468 | kill RR,r; |
---|
469 | ring r=0,(x,y),dp; |
---|
470 | displayHNE(develop(x)); |
---|
471 | displayHNE(develop(y)); |
---|
472 | displayHNE(develop(1)); |
---|
473 | // ------------ test of displayInvariants: ------------ |
---|
474 | list L=hnexpansion((x2+y3+y4)*(x+y2+y3-y4)*(x5+y7)); |
---|
475 | displayInvariants(L[1]); |
---|
476 | displayInvariants(L[2]); |
---|
477 | displayInvariants(L); |
---|
478 | // ------------ test of is_irred: --------------------- |
---|
479 | is_irred(x); |
---|
480 | is_irred(x2); |
---|
481 | is_irred((x+y)*(1+x+y)); // one HNE |
---|
482 | is_irred((x+y)*(x+y+xy)); // one of two HNEs found |
---|
483 | is_irred(x2+y2); // no HNE found |
---|
484 | is_irred(1+x+y); // unit |
---|
485 | // ---------------------------------------------------------------------------- |
---|
486 | // ------- test of invariants, delta, intersection, puiseux2generators, --- |
---|
487 | // ------- multiplicities, newtonpoly --- |
---|
488 | example delta; |
---|
489 | example invariants; |
---|
490 | poly f=(x2-y3+y5)*(x2+y3-y5); |
---|
491 | L=hnexpansion(f); |
---|
492 | delta(f); |
---|
493 | delta(L); |
---|
494 | intersection(L[1],L[2]); |
---|
495 | puiseux2generators(intvec(3,7,15,31,63,127),intvec(2,2,2,2,2,2)); |
---|
496 | example newtonpoly; |
---|
497 | // ------- test of getnm, T_Transform, T1_Transform, T2_Transform, koeff, ----- |
---|
498 | // ------------ redleit, squarefree, allsquarefree, referencepoly ---------- |
---|
499 | example getnm; |
---|
500 | T_Transform(y2+x3,1,2); |
---|
501 | T1_Transform(y-x2+x3,1,2); |
---|
502 | T2_Transform(y2+x3-x2y,-1,3,2,referencepoly(newtonpoly(y2+x3-x2y))); |
---|
503 | koeff(x2+2xy+3xy2-x2y-2y3,1,2); |
---|
504 | example redleit; |
---|
505 | example squarefree; |
---|
506 | ring R=(27,k),(x,y),dp; |
---|
507 | squarefree(x2); |
---|
508 | squarefree(y3); |
---|
509 | squarefree((x2+y)^3*(x-y)^2*(x+y)); |
---|
510 | |
---|
511 | example allsquarefree; |
---|
512 | // ------ Test multSequence (depends on numbering of branches): |
---|
513 | ring rr=0,(x,y),ls; |
---|
514 | poly f=x6y-3x4y4-x4y5+3x2y7-x4y6+2x2y8-y10+2x2y9-y11+x2y10-y12-y13; |
---|
515 | multsequence(f); |
---|
516 | |
---|
517 | tst_status(1);$ |
---|