1 | LIB "tst.lib"; |
---|
2 | tst_init(); |
---|
3 | |
---|
4 | //////////////////////////////////////////////////////////////////////////////// |
---|
5 | // Examples |
---|
6 | // FFT (First Fundamental Theorem, not: Fast Fourier Transform) |
---|
7 | //////////////////////////////////////////////////////////////////////////////// |
---|
8 | |
---|
9 | |
---|
10 | LIB "matrix.lib"; |
---|
11 | LIB "invar.lib"; |
---|
12 | |
---|
13 | "EXAMPLE 1:"; |
---|
14 | SL(2); // Take the group SL_2 |
---|
15 | matrix m=dsum(SLrep,SLrep,SLrep,SLrep); |
---|
16 | // 4 copies of the standard representation |
---|
17 | invar(m); // empirical evidence for FFT |
---|
18 | setring Invar::polyring; |
---|
19 | // The reynolds operator is computed using the Omega process. |
---|
20 | Invar::reynolds(x(1)*x(4)); |
---|
21 | |
---|
22 | setring Invar::group; |
---|
23 | |
---|
24 | "EXAMPLE 2:"; |
---|
25 | SL(3); // Take the group SL_3 |
---|
26 | matrix m=dsum(SLrep,SLrep,SLrep,SLrep); |
---|
27 | // 4 copies of the standard representation |
---|
28 | invar(m); // more empirical evidence for FFT |
---|
29 | |
---|
30 | ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
---|
31 | // Examples |
---|
32 | // some arbitrary SL_2 example |
---|
33 | //////////////////////////////////////////////////////////////////////////////// |
---|
34 | |
---|
35 | |
---|
36 | SL(2); |
---|
37 | |
---|
38 | matrix m=dsum(sympower(SLrep,2),SLrep,SLrep); |
---|
39 | // binary forms of degree 2, plus 2 copies |
---|
40 | // of the standard representation |
---|
41 | invar(m); |
---|
42 | ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
---|
43 | // Examples |
---|
44 | // Tori |
---|
45 | //////////////////////////////////////////////////////////////////////////////// |
---|
46 | |
---|
47 | "EXAMPLE 1:"; |
---|
48 | |
---|
49 | torus(1); // Take the 1-dimensional torus, the |
---|
50 | // multiplicative group. |
---|
51 | list weights=-2,-3,7; // 3-dimensial action with weights -2,-3,7 |
---|
52 | matrix m=torusrep(weights); // compute the matrix of the representation |
---|
53 | invar(m); // compute the invariant ring |
---|
54 | |
---|
55 | "EXAMPLE 2:"; |
---|
56 | |
---|
57 | setring Invar::group; |
---|
58 | weights=-4,-3,-2,1,1,2,3,4; // a harder example |
---|
59 | matrix m=torusrep(weights); |
---|
60 | invar(m); |
---|
61 | |
---|
62 | "EXAMPLE 3:"; |
---|
63 | |
---|
64 | torus(2); // 2-dimensional torus |
---|
65 | intvec w1=1,2; // (inspired by the jumping of a knight |
---|
66 | intvec w2=-1,2; // on a chess board) |
---|
67 | intvec w3=1,-2; // it takes some time |
---|
68 | intvec w4=-1,-2; |
---|
69 | intvec w5=2,1; |
---|
70 | intvec w6=2,-1; |
---|
71 | intvec w7=-2,1; |
---|
72 | intvec w8=2,-1; |
---|
73 | list weights=w1,w2,w3,w4,w5,w6,w7,w8; |
---|
74 | matrix m=torusrep(weights); |
---|
75 | invar(m); |
---|
76 | // The invariant x(2)^3*x(4)^5*x(5)^4 says that |
---|
77 | // 3*(-1,2)+4*(2,1)+5*(-1,-2)=(0,0) |
---|
78 | // All invariants define cyclic knight-paths. |
---|
79 | |
---|
80 | |
---|
81 | ///////////////////////////////////////////// |
---|
82 | //////////////////////////////////////////////////////////////////////////////// |
---|
83 | // Examples |
---|
84 | // Finite groups |
---|
85 | //////////////////////////////////////////////////////////////////////////////// |
---|
86 | |
---|
87 | "EXAMPLE 1:"; |
---|
88 | finite(6); // The symmetric group S_3 |
---|
89 | matrix id=unitmat(3); // identity matrix |
---|
90 | matrix m3[3][3]=0,1,0,0,0,1,1,0,0; // corresponds with (1 2 3) |
---|
91 | matrix m2[3][3]=0,1,0,1,0,0,0,0,1; // corresponds with (1 2) |
---|
92 | list a=id,m3,m3*m3,m2,m2*m3,m2*m3*m3; // all elements of S_3 |
---|
93 | matrix rep=finiterep(a); // compute matrix of standard repr. |
---|
94 | invar(rep); // compute the invariant ring |
---|
95 | |
---|
96 | "EXAMPLE 2:"; |
---|
97 | finite(4); // Cyclic group of order 4 |
---|
98 | matrix id=unitmat(4); |
---|
99 | matrix m4[4][4]=0,1,0,0,0,0,1,0,0,0,0,1,1,0,0,0; |
---|
100 | // matrix of (1 2 3 4) |
---|
101 | list a=id,m4,m4*m4,m4*m4*m4; // all elements of the cyclic group |
---|
102 | matrix rep=finiterep(a); // compute matrix of regular repr. |
---|
103 | invar(rep); // compute the invariant ring |
---|
104 | |
---|
105 | |
---|
106 | ///////////////////////////////// |
---|
107 | |
---|
108 | |
---|
109 | //////////////////////////////////////////////////////////////////////////////// |
---|
110 | // Examples |
---|
111 | // Binary forms |
---|
112 | //////////////////////////////////////////////////////////////////////////////// |
---|
113 | |
---|
114 | "EXAMPLE 1:"; |
---|
115 | SL(2); // set the current group to SL_2 |
---|
116 | invar(SLrep); // invariants of the standard representation |
---|
117 | // (of course there are no invariants) |
---|
118 | |
---|
119 | "EXAMPLE 2:"; |
---|
120 | setring Invar::group; // 'invar' changed the basering into 'polyring' |
---|
121 | // now we need the ring 'group' again (because |
---|
122 | // SLrep is defined there) |
---|
123 | matrix bin2=sympower(SLrep,2); // Let m be the matrix of the second symmetric |
---|
124 | // power of the standard representation |
---|
125 | // (binary forms of degree 2) |
---|
126 | invar(bin2); // compute the invariant(s) |
---|
127 | // (only one: the discriminant) |
---|
128 | // OK, let's try some more binary forms: |
---|
129 | |
---|
130 | "EXAMPLE 3:"; |
---|
131 | setring Invar::group; |
---|
132 | matrix bin3=sympower(SLrep,3); |
---|
133 | invar(bin3); |
---|
134 | |
---|
135 | "EXAMPLE 4:"; |
---|
136 | setring Invar::group; |
---|
137 | matrix bin4=sympower(SLrep,4); |
---|
138 | invar(bin4); |
---|
139 | |
---|
140 | // for binary forms of degree 5 you'll need |
---|
141 | // a day or so ... |
---|
142 | |
---|
143 | |
---|
144 | /////////////////////////////////////// |
---|
145 | tst_status(1);$ |
---|
146 | |
---|