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