[e36ae54] | 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); |
---|
[7b8ea42] | 10 | develop((x2+y3)*(x2+y3+xy2)); |
---|
[e36ae54] | 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; |
---|
[935bf64] | 19 | list Hne=develop(heme); |
---|
| 20 | print(Hne[1]); |
---|
[e36ae54] | 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; |
---|
[3373f84] | 26 | // ------------ test of hnexpansion: ------------------- |
---|
[e36ae54] | 27 | ring r=0,(x,y),dp; |
---|
[3373f84] | 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 | |
---|
[e36ae54] | 37 | //--------------- examples with change to ring extension |
---|
| 38 | ring R=32003,(x,y),dp; |
---|
[3373f84] | 39 | def L=hnexpansion(x6+y4); |
---|
| 40 | def HNring = L[1]; setring HNring; displayHNE(hne); |
---|
| 41 | kill L,HNring; |
---|
| 42 | |
---|
[e36ae54] | 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); |
---|
[3373f84] | 46 | list L=hnexpansion(f); |
---|
| 47 | def HNring = L[1]; setring HNring; displayHNE(hne); |
---|
| 48 | map T; int i; |
---|
[935bf64] | 49 | for (i=1; i<=size(hne); i++) |
---|
| 50 | { |
---|
[e36ae54] | 51 | T=basering,param(hne[i]); |
---|
| 52 | T(f); |
---|
| 53 | } |
---|
[3373f84] | 54 | kill hne,HNring,F3,L; |
---|
| 55 | |
---|
[e36ae54] | 56 | // ------------ test of extdevelop: ------------------- |
---|
| 57 | setring r; |
---|
[935bf64] | 58 | list Hne=develop(x2+y3+y4-y5,-1); |
---|
| 59 | extdevelop(Hne,2); |
---|
| 60 | extdevelop(Hne,4); |
---|
| 61 | extdevelop(Hne,10); |
---|
| 62 | kill Hne; |
---|
[6c2401] | 63 | // ------------ test of essdevelop: ------------------ |
---|
| 64 | setring R; |
---|
[3373f84] | 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; |
---|
[6c2401] | 69 | setring r; |
---|
[e36ae54] | 70 | // ------------ test of param: ------------------------ |
---|
| 71 | param(develop(x2+y3)); |
---|
| 72 | param(develop(y2+x3+x4)); |
---|
[6c2401] | 73 | param(develop(y2+x3+x4),0); |
---|
[e36ae54] | 74 | // ------------ test of displayHNE: ------------------- |
---|
| 75 | example displayHNE; |
---|
| 76 | // ---------------------------------------------------------------------------- |
---|
[81fb58d] | 77 | // ------- test of invariants, displayInvariants, intersection, stripHNE, --- |
---|
[7b8ea42] | 78 | // ---- puiseux2generators, multiplicities, newtonpoly, is_irred, HNdevelop --- |
---|
[e36ae54] | 79 | example invariants; |
---|
| 80 | example displayInvariants; |
---|
[3373f84] | 81 | list L=hnexpansion((x2-y3)*(x2+y3)); |
---|
| 82 | intersection(L[1],L[2]); |
---|
| 83 | kill L; |
---|
[e36ae54] | 84 | example stripHNE; |
---|
| 85 | puiseux2generators(intvec(3,7,15,31,63,127),intvec(2,2,2,2,2,2)); |
---|
| 86 | setring r; |
---|
[3373f84] | 87 | multsequence(develop(x5+y7)); |
---|
[e36ae54] | 88 | example newtonpoly; |
---|
[7b8ea42] | 89 | example is_irred; |
---|
| 90 | is_irred((x2+y3)*(x2+y3+xy2)); |
---|
[e36ae54] | 91 | // ------- test of getnm, T_Transform, T1_Transform, T2_Transform, koeff, ----- |
---|
[7b8ea42] | 92 | // ------------ redleit, squarefree, allsquarefree, referencepoly ---------- |
---|
[e36ae54] | 93 | example getnm; |
---|
| 94 | T_Transform(y2+x3,1,2); |
---|
| 95 | T1_Transform(y-x2+x3,1,2); |
---|
[81fb58d] | 96 | T2_Transform(y2+x3,-1,3,2,y2+x3); |
---|
| 97 | example referencepoly; |
---|
[e36ae54] | 98 | koeff(x2+2xy+3xy2-x2y-2y3,1,2); |
---|
| 99 | example redleit; |
---|
| 100 | example squarefree; |
---|
| 101 | example allsquarefree; |
---|
[3373f84] | 102 | |
---|
[267f72c] | 103 | // --------------- additions: ----------------------------- |
---|
| 104 | example further_hn_proc; |
---|
| 105 | example leit; |
---|
| 106 | example testreducible; |
---|
[b2d5b9] | 107 | example T_Transform; |
---|
[267f72c] | 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; |
---|
[a35862] | 123 | example develop; |
---|
| 124 | example param; |
---|
[b2d5b9] | 125 | example hnexpansion; |
---|
| 126 | example delta; |
---|
| 127 | example is_NND; |
---|
[46976a6] | 128 | tst_status(1);$ |
---|