1 | LIB "tst.lib"; |
---|
2 | tst_init(); |
---|
3 | |
---|
4 | /************************************************************************************ |
---|
5 | Env.sing First step in creating non-magma calculations |
---|
6 | |
---|
7 | 11/29/15 Got quotient ring created, basic options set. |
---|
8 | Using reverse lexicographic order (or weighted rev.) |
---|
9 | 01/04/16 First step in constructing computations. |
---|
10 | |
---|
11 | ************************************************************************************/ |
---|
12 | // do not print all the "redefined" warnings when we load the LIBraries. |
---|
13 | option(noredefine) ; |
---|
14 | // load the stuff we need. |
---|
15 | LIB "poly.lib" ; |
---|
16 | LIB "nctools.lib" ; |
---|
17 | LIB "ncalg.lib" ; |
---|
18 | |
---|
19 | // reduce all ideals and Groebner bases |
---|
20 | option(redSB) ; option(redTail) ; |
---|
21 | // simplify all expressions in any quotient ring - i.e. put in normal form |
---|
22 | option(qringNF) ; |
---|
23 | |
---|
24 | // start with the least value of nu; check higher ones later. |
---|
25 | int nu = 2 ; |
---|
26 | |
---|
27 | // int N = 5 ; |
---|
28 | // cycle through come calculable values for N |
---|
29 | for (int N=3; N<=11; N=N+1) |
---|
30 | { |
---|
31 | |
---|
32 | // N can't divide nu^2 |
---|
33 | if ( nu^2 mod N == 0 ) { newline, "Skipping N = ", N, newline ; N= N+1 ; continue ; } |
---|
34 | |
---|
35 | // r is the order of q^nu |
---|
36 | int r = lcm( N, nu^2 ) div nu^2 ; |
---|
37 | |
---|
38 | // Create the commutative ring over the coefficients of augmented Q |
---|
39 | // ring QN = (0,w), (a,b,x,y), lp ; // lexicographic order violates ordering condition |
---|
40 | // ring QN = (0,w), (a,b,x,y), rp ; // reverse lexicographic allows really unbalanced a & b powers. |
---|
41 | // ring QN = (0,w), (a,b,x,y), Dp ; // degree lexicographic violates ordering condition |
---|
42 | ring QN = (0,w), (a,b,x,y), wp(1,1,N,N) ; // keeps a & b exponents closer. |
---|
43 | |
---|
44 | // extend Q by Nth root of unity |
---|
45 | minpoly = rootofUnity(N) ; |
---|
46 | |
---|
47 | // q is what we use in all the formulas |
---|
48 | number q = w^nu ; |
---|
49 | |
---|
50 | // display all exponents with a '^' symbol; |
---|
51 | // must be done whenever a new ring gets declared if results are going to be printed |
---|
52 | short = 0 ; |
---|
53 | |
---|
54 | // Procedure to get (k)q_nu as defined in the Radford paper. |
---|
55 | proc subq_nu (int k) |
---|
56 | { |
---|
57 | number retval = 1; |
---|
58 | for (int m=1; m<k; m=m+1) { retval = retval + q^m ; } |
---|
59 | return( retval ) ; |
---|
60 | } |
---|
61 | // G is the value of a loop |
---|
62 | poly G = b^(nu) ; newline, "Loop value =", G ; |
---|
63 | |
---|
64 | newline, "N =", N, "before creating the G-algebra." ; // debug info |
---|
65 | |
---|
66 | // Create a pair of 4x4 zero matrices and populate according to the specs for G-algebras. |
---|
67 | matrix C[4][4] ; C[1,2] = 1 ; C[1,3] = q ; C[1,4] = q^(-1) ; |
---|
68 | C[2,3] = q^(-1) ; C[2,4] = q ; |
---|
69 | C[3,4] = q^(-nu) ; |
---|
70 | matrix D[4][4] ; D[3,4] = a^(2*nu) - 1 ; |
---|
71 | |
---|
72 | newline, "Matrix C:" ; print (C) ; |
---|
73 | newline, "Matrix D:" ; print (D) ; |
---|
74 | newline; |
---|
75 | |
---|
76 | // Create the basic non-commutative G-algebra, without the "exotic" relations. |
---|
77 | def U = nc_algebra(C,D) ; setring U ; |
---|
78 | "The N =", N, " G-algebra has:" ; |
---|
79 | U ; |
---|
80 | |
---|
81 | // display all exponents with a '^' symbol; |
---|
82 | // must be done whenever a new ring gets declared if results are going to be printed |
---|
83 | short = 0 ; |
---|
84 | |
---|
85 | matrix C = fetch( QN, C ) ; // Convert matrices to current ring |
---|
86 | matrix D = fetch( QN, D ) ; |
---|
87 | |
---|
88 | newline, "Matrix C:" ; print (C) ; |
---|
89 | newline, "Matrix D:" ; print (D) ; |
---|
90 | newline, "N =", N, "before nilpotent and order relations." ; // debug info |
---|
91 | |
---|
92 | for (int m = 1; m<=N; m= m+1) |
---|
93 | { |
---|
94 | newline, "(x*a)^", m, " = ", (x*a)^m, " (y*a)^", m, " = ", (y*a)^m ; |
---|
95 | newline, "(y*x)^", m, " = ", (y*x)^m ; |
---|
96 | newline, "(y*x*a)^", m," = ", (y*x*a)^m ; |
---|
97 | newline, "(y*x*a)^", m, "-- (y*x)^", m, " = ", (y*x*a)^m - (y*x)^m ; |
---|
98 | } |
---|
99 | newline; |
---|
100 | |
---|
101 | /* Create the ideal of the remaining relations, get the reduced basis, |
---|
102 | and mod out to get the quotient ring we want. */ |
---|
103 | |
---|
104 | ideal i = x^r, y^r, a^N-1, a*b-1 ; |
---|
105 | qring U_q_nu = twostd(i) ; setring U_q_nu ; |
---|
106 | "The N =", N, " U_q_nu algebra has:" ; |
---|
107 | U_q_nu ; |
---|
108 | |
---|
109 | // display all exponents with a '^' symbol; |
---|
110 | // must be done whenever a new ring gets declared if results are going to be printed |
---|
111 | short = 0 ; |
---|
112 | |
---|
113 | matrix C = fetch( U, C ) ; // Convert matrices to current ring |
---|
114 | matrix D = fetch( U, D ) ; |
---|
115 | number q = w^nu ; // Need to reassign since it's a parameter. |
---|
116 | |
---|
117 | // Either of the next two lines gives a segmentation fault - see last lines before *** END N=... |
---|
118 | // Can't "fetch" it --- |
---|
119 | // poly G = fetch( QN, G ) ; newline, "Loop value =", G ; |
---|
120 | // Can't redefine it --- |
---|
121 | // poly G = b^(nu) ; newline, "Loop value =", G ; |
---|
122 | |
---|
123 | newline, "Matrix C:" ; |
---|
124 | print (C) ; |
---|
125 | newline, "Matrix D:" ; |
---|
126 | print (D) ; |
---|
127 | newline, "N =", N, "after nilpotent and order relations." ; // debug info |
---|
128 | if ( r != N ) { "Note that N =", N, "but r =", r ; } |
---|
129 | |
---|
130 | for (int m = 1; m<=N; m= m+1) |
---|
131 | { |
---|
132 | newline, "(x*a)^", m, " = ", (x*a)^m, " (y*a)^", m, " = ", (y*a)^m ; |
---|
133 | newline, "(y*x)^", m, " = ", (y*x)^m ; |
---|
134 | newline, "(y*x*a)^", m, " = ", (y*x*a)^m ; |
---|
135 | newline, "(y*x*a)^", m, "-- (y*x)^", m, " = ", (y*x*a)^m - (y*x)^m ; |
---|
136 | } |
---|
137 | |
---|
138 | newline, newline, "a^2*x^3*y^4 + b^3*y^4*x^4 =", a^2*x^3*y^4 + b^3*y^4*x^4 ; |
---|
139 | newline, newline, "(a^2*x^3*y^4 + b^3*y^4*x^4)^2 - (a^2*x^3*y^4 + b^3*y^4*x^4) =", |
---|
140 | ( a^2*x^3*y^4 + b^3*y^4*x^4 )^2 - ( a^2*x^3*y^4 + b^3*y^4*x^4) ; |
---|
141 | newline; |
---|
142 | |
---|
143 | // Next line crashes Singular with a segmentation fault; notice it's the same one as that printed above. |
---|
144 | // As a matter of fact, *any* polynomial declaration does. |
---|
145 | |
---|
146 | poly h = a^2*x^3*y^4 + b^3*y^4*x^4; h^2 - h; |
---|
147 | poly k = h^2 - h ; k; |
---|
148 | |
---|
149 | "****************************************** END N =", N, " ******************************************" ; |
---|
150 | "*************************************************************************************************" ; |
---|
151 | } |
---|
152 | |
---|
153 | tst_status(1);$ |
---|