1 | // File: hnoether_s.tst |
---|
2 | // Short tests for hnoether lib |
---|
3 | LIB "tst.lib"; |
---|
4 | tst_init(); |
---|
5 | LIB "hnoether.lib"; |
---|
6 | // ------------ test of develop: ------------------- |
---|
7 | ring r=0,(x,y),ds; |
---|
8 | develop(x2+y2); |
---|
9 | develop(x2+y+y2); |
---|
10 | poly p_1 = y2+x3; |
---|
11 | poly p_2 = p_1^2 + x5y; |
---|
12 | poly p_3 = p_2^2 + x^10 *p_1; |
---|
13 | param(develop(p_1)); |
---|
14 | param(develop(p_3)); |
---|
15 | develop(p_3,-1); |
---|
16 | develop(p_3,4); |
---|
17 | poly heme=xy8+y8+x4y6+4x3y6+2x5y5+6x6y4+4x8y3+x10y2+4x9y2+2x11y+x12; |
---|
18 | list hne=develop(heme); |
---|
19 | print(hne[1]); |
---|
20 | kill r; |
---|
21 | ring r=2,(x,y,t),ds; |
---|
22 | poly f=y2+x7y+x9+x8; |
---|
23 | param(develop(f)); |
---|
24 | kill r; |
---|
25 | // ------------ test of reddevelop: ------------------- |
---|
26 | ring r=0,(x,y),dp; |
---|
27 | reddevelop(x6-y4); |
---|
28 | setring r; |
---|
29 | kill HNEring; |
---|
30 | list hne=reddevelop((y-x2+x3)*(y-x2-x3)); |
---|
31 | setring r; |
---|
32 | kill HNEring; |
---|
33 | reddevelop((x7-2x4y2+xy4-1y5)*(x7-4x4y2+4xy4-1y5)); |
---|
34 | kill HNEring; |
---|
35 | //--------------- examples with change to ring extension |
---|
36 | ring R=32003,(x,y),dp; |
---|
37 | reddevelop(x6+y4); |
---|
38 | kill HNEring; |
---|
39 | ring F2=2,(x,y),dp; |
---|
40 | reddevelop(y2+x7y+x9+x8); |
---|
41 | kill HNEring; |
---|
42 | //--------------- example with more than one ring change |
---|
43 | ring F3=3,(x,y),dp; |
---|
44 | list hne=reddevelop((x3-xy2+y3)*(x2+y2)*(x4-x3y+xy3+y4)); |
---|
45 | map T; int i; |
---|
46 | poly f=(x3-xy2+y3)*(x2+y2)*(x4-x3y+xy3+y4); |
---|
47 | for (i=1; i<=size(hne); i++) { |
---|
48 | T=basering,param(hne[i]); |
---|
49 | T(f); |
---|
50 | } |
---|
51 | kill HNEring; |
---|
52 | // ------------ test of extdevelop: ------------------- |
---|
53 | setring r; |
---|
54 | list hne=develop(x2+y3+y4-y5,-1); |
---|
55 | extdevelop(hne,2); |
---|
56 | extdevelop(hne,4); |
---|
57 | extdevelop(hne,10); |
---|
58 | kill hne; |
---|
59 | // ------------ test of param: ------------------------ |
---|
60 | param(develop(x2+y3)); |
---|
61 | param(develop(y2+x3+x4)); |
---|
62 | // ------------ test of displayHNE: ------------------- |
---|
63 | example displayHNE; |
---|
64 | // ---------------------------------------------------------------------------- |
---|
65 | // ------- test of invariants, displayInvariants, generators, intersection, --- |
---|
66 | // ------- stripHNE, puiseux2generators, multiplicities, newtonpoly --- |
---|
67 | example invariants; |
---|
68 | example displayInvariants; |
---|
69 | example generators; |
---|
70 | list hne=reddevelop((x2-y3)*(x2+y3)); |
---|
71 | intersection(hne[1],hne[2]); |
---|
72 | example stripHNE; |
---|
73 | puiseux2generators(intvec(3,7,15,31,63,127),intvec(2,2,2,2,2,2)); |
---|
74 | setring r; |
---|
75 | multiplicities(develop(x5+y7)); |
---|
76 | example newtonpoly; |
---|
77 | // ------- test of getnm, T_Transform, T1_Transform, T2_Transform, koeff, ----- |
---|
78 | // ------- redleit, squarefree, allsquarefree, set_list ----- |
---|
79 | example getnm; |
---|
80 | T_Transform(y2+x3,1,2); |
---|
81 | T1_Transform(y-x2+x3,1,2); |
---|
82 | T2_Transform(y2+x3,-1,3,2); |
---|
83 | koeff(x2+2xy+3xy2-x2y-2y3,1,2); |
---|
84 | example redleit; |
---|
85 | example squarefree; |
---|
86 | example allsquarefree; |
---|
87 | list L=list(poly(x-y),ideal(x,y)); |
---|
88 | set_list(L,intvec(2,1),x2+y7); |
---|
89 | $ |
---|