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 | develop((x2+y3)*(x2+y3+xy2)); |
---|
11 | poly p_1 = y2+x3; |
---|
12 | poly p_2 = p_1^2 + x5y; |
---|
13 | poly p_3 = p_2^2 + x^10 *p_1; |
---|
14 | param(develop(p_1)); |
---|
15 | param(develop(p_3)); |
---|
16 | develop(p_3,-1); |
---|
17 | develop(p_3,4); |
---|
18 | poly heme=xy8+y8+x4y6+4x3y6+2x5y5+6x6y4+4x8y3+x10y2+4x9y2+2x11y+x12; |
---|
19 | list hne=develop(heme); |
---|
20 | print(hne[1]); |
---|
21 | kill r; |
---|
22 | ring r=2,(x,y,t),ds; |
---|
23 | poly f=y2+x7y+x9+x8; |
---|
24 | param(develop(f)); |
---|
25 | kill r; |
---|
26 | // ------------ test of reddevelop: ------------------- |
---|
27 | ring r=0,(x,y),dp; |
---|
28 | reddevelop(x6-y4); |
---|
29 | setring r; |
---|
30 | kill HNEring; |
---|
31 | list hne=reddevelop((y-x2+x3)*(y-x2-x3)); |
---|
32 | setring r; |
---|
33 | kill HNEring; |
---|
34 | reddevelop((x7-2x4y2+xy4-1y5)*(x7-4x4y2+4xy4-1y5)); |
---|
35 | kill HNEring; |
---|
36 | //--------------- examples with change to ring extension |
---|
37 | ring R=32003,(x,y),dp; |
---|
38 | reddevelop(x6+y4); |
---|
39 | kill HNEring; |
---|
40 | ring F2=2,(x,y),dp; |
---|
41 | reddevelop(y2+x7y+x9+x8); |
---|
42 | kill HNEring; |
---|
43 | //--------------- example with more than one ring change |
---|
44 | ring F3=3,(x,y),dp; |
---|
45 | list hne=reddevelop((x3-xy2+y3)*(x2+y2)*(x4-x3y+xy3+y4)); |
---|
46 | map T; int i; |
---|
47 | poly f=(x3-xy2+y3)*(x2+y2)*(x4-x3y+xy3+y4); |
---|
48 | for (i=1; i<=size(hne); i++) { |
---|
49 | T=basering,param(hne[i]); |
---|
50 | T(f); |
---|
51 | } |
---|
52 | kill HNEring; |
---|
53 | // ------------ test of extdevelop: ------------------- |
---|
54 | setring r; |
---|
55 | list hne=develop(x2+y3+y4-y5,-1); |
---|
56 | extdevelop(hne,2); |
---|
57 | extdevelop(hne,4); |
---|
58 | extdevelop(hne,10); |
---|
59 | kill hne; |
---|
60 | // ------------ test of essdevelop: ------------------ |
---|
61 | setring R; |
---|
62 | essdevelop(x6+y4); |
---|
63 | kill HNEring; |
---|
64 | setring r; |
---|
65 | // ------------ test of param: ------------------------ |
---|
66 | param(develop(x2+y3)); |
---|
67 | param(develop(y2+x3+x4)); |
---|
68 | param(develop(y2+x3+x4),0); |
---|
69 | // ------------ test of displayHNE: ------------------- |
---|
70 | example displayHNE; |
---|
71 | // ---------------------------------------------------------------------------- |
---|
72 | // ------- test of invariants, displayInvariants, intersection, stripHNE, --- |
---|
73 | // ---- puiseux2generators, multiplicities, newtonpoly, is_irred, HNdevelop --- |
---|
74 | example invariants; |
---|
75 | example displayInvariants; |
---|
76 | list hne=reddevelop((x2-y3)*(x2+y3)); |
---|
77 | intersection(hne[1],hne[2]); |
---|
78 | example stripHNE; |
---|
79 | puiseux2generators(intvec(3,7,15,31,63,127),intvec(2,2,2,2,2,2)); |
---|
80 | setring r; |
---|
81 | multiplicities(develop(x5+y7)); |
---|
82 | example newtonpoly; |
---|
83 | example is_irred; |
---|
84 | is_irred((x2+y3)*(x2+y3+xy2)); |
---|
85 | example HNdevelop; |
---|
86 | // ------- test of getnm, T_Transform, T1_Transform, T2_Transform, koeff, ----- |
---|
87 | // ------------ redleit, squarefree, allsquarefree, referencepoly ---------- |
---|
88 | example getnm; |
---|
89 | T_Transform(y2+x3,1,2); |
---|
90 | T1_Transform(y-x2+x3,1,2); |
---|
91 | T2_Transform(y2+x3,-1,3,2,y2+x3); |
---|
92 | example referencepoly; |
---|
93 | koeff(x2+2xy+3xy2-x2y-2y3,1,2); |
---|
94 | example redleit; |
---|
95 | example squarefree; |
---|
96 | example allsquarefree; |
---|
97 | list L=list(poly(x-y),ideal(x,y)); |
---|
98 | // --------------- additions: ----------------------------- |
---|
99 | example further_hn_proc; |
---|
100 | example leit; |
---|
101 | example testreducible; |
---|
102 | example T_Transform; |
---|
103 | example T1_Transform; |
---|
104 | example T2_Transform; |
---|
105 | example koeff; |
---|
106 | example multiplicities; |
---|
107 | example puiseux2generators; |
---|
108 | example intersection; |
---|
109 | example multsequence; |
---|
110 | example displayMultsequence; |
---|
111 | example separateHNE; |
---|
112 | example charPoly; |
---|
113 | example find_in_list; |
---|
114 | example get_last_divisor; |
---|
115 | example extdevelop; |
---|
116 | example factorfirst; |
---|
117 | example essdevelop; |
---|
118 | example factorlist; |
---|
119 | example develop; |
---|
120 | example param; |
---|
121 | example reddevelop; |
---|
122 | example hnexpansion; |
---|
123 | example sethnering; |
---|
124 | example delta; |
---|
125 | example is_NND; |
---|
126 | |
---|
127 | tst_status(1);$ |
---|