1 | // Test File for 'zeroset.lib" |
---|
2 | // |
---|
3 | // Implementation by : Thomas Bayer |
---|
4 | // Curretn Adress: |
---|
5 | // Institut fuer Informatik, Technische Universitaet Muenchen |
---|
6 | // www: http://wwwmayr.informatik.tu-muenchen.de/personen/bayert/ |
---|
7 | // email : bayert@in.tum.de |
---|
8 | // |
---|
9 | // Last change 10.12.2000 |
---|
10 | // |
---|
11 | // written in the frame of the diploma thesis (advisor: Prof. Gert-Martin Greuel) |
---|
12 | // "Computations of moduli spaces of semiquasihomogenous singularities and an |
---|
13 | // implementation in Singular" |
---|
14 | // Arbeitsgruppe Algebraische Geometrie, Fachbereich Mathematik, |
---|
15 | // Universitaet Kaiserslautern |
---|
16 | /////////////////////////////////////////////////////////////////////////////// |
---|
17 | |
---|
18 | LIB "tst.lib"; |
---|
19 | LIB "zeroset.lib"; |
---|
20 | |
---|
21 | tst_init(); |
---|
22 | |
---|
23 | |
---|
24 | |
---|
25 | proc TestzerosetLIB(S) |
---|
26 | // plug in the elements from the zero-set in the generators of the ideal |
---|
27 | // result should be 0,0,...,0. |
---|
28 | { |
---|
29 | |
---|
30 | setring S; |
---|
31 | map F; |
---|
32 | |
---|
33 | print(" #Points = " + string(vdim(std(id))) + "; #Solutions = " + string(size(theZeroset))); |
---|
34 | print(" minpoly = " + string(minpoly)); |
---|
35 | print(" ideal = " + string(id)); |
---|
36 | |
---|
37 | |
---|
38 | for(int i = 1; i <= size(theZeroset); i++) { |
---|
39 | F = theZeroset[i]; |
---|
40 | print(string(theZeroset[i]) + " --> " + string(F(id))); |
---|
41 | } |
---|
42 | } |
---|
43 | |
---|
44 | // example 1 |
---|
45 | |
---|
46 | ring R = 0,(x,y,z), lp; |
---|
47 | ideal I = x2-1,y3-1,z-2x; |
---|
48 | |
---|
49 | def S = zeroSet(I);TestzerosetLIB(S); |
---|
50 | setring S; |
---|
51 | minpoly; |
---|
52 | id; |
---|
53 | theZeroset; |
---|
54 | |
---|
55 | kill R; |
---|
56 | kill S; |
---|
57 | //tst_status(); |
---|
58 | |
---|
59 | // example 2 |
---|
60 | |
---|
61 | ring R = 0,(x,y,z), lp; |
---|
62 | ideal I = x3-1,3y-x,z4-1; |
---|
63 | |
---|
64 | def S = zeroSet(I);TestzerosetLIB(S); |
---|
65 | setring S; |
---|
66 | minpoly; |
---|
67 | id; |
---|
68 | theZeroset; |
---|
69 | |
---|
70 | kill R; |
---|
71 | kill S; |
---|
72 | //tst_status(); |
---|
73 | |
---|
74 | // example 3 |
---|
75 | |
---|
76 | ring R = 0, (x(1..5)), lp; |
---|
77 | ideal I = x(1)^2+1,x(2)^4-1,x(3)-x(4),x(4)^2+1,x(5)-x(4); |
---|
78 | |
---|
79 | def S = zeroSet(I);TestzerosetLIB(S); |
---|
80 | setring S; |
---|
81 | minpoly; |
---|
82 | id; |
---|
83 | theZeroset; |
---|
84 | |
---|
85 | kill R; |
---|
86 | kill S; |
---|
87 | //tst_status(); |
---|
88 | |
---|
89 | // example 4 |
---|
90 | |
---|
91 | ring R = (0,a),(x,y), lp; |
---|
92 | minpoly = a2+1; |
---|
93 | ideal I = x2-a,y-2x; |
---|
94 | |
---|
95 | def S = zeroSet(I);TestzerosetLIB(S); |
---|
96 | setring S; |
---|
97 | minpoly; |
---|
98 | id; |
---|
99 | theZeroset; |
---|
100 | |
---|
101 | kill R; |
---|
102 | kill S; |
---|
103 | //tst_status(); |
---|
104 | |
---|
105 | // example 5 |
---|
106 | |
---|
107 | ring R = (0,a),(x,y,z), lp; |
---|
108 | minpoly = a2+a+1; |
---|
109 | ideal I = x3-1,a*y^2-x,z^2-a*y; |
---|
110 | |
---|
111 | def S = zeroSet(I);TestzerosetLIB(S); |
---|
112 | setring S; |
---|
113 | minpoly; |
---|
114 | id; |
---|
115 | theZeroset; |
---|
116 | |
---|
117 | kill R; |
---|
118 | kill S; |
---|
119 | //tst_status(); |
---|
120 | |
---|
121 | // example 6 |
---|
122 | |
---|
123 | ring R = (0,a),(x,y,z), lp; |
---|
124 | minpoly = a2+1; |
---|
125 | ideal I = x2-2,a*y^2-2*x,z^2 - a; // 2 |
---|
126 | |
---|
127 | def S = zeroSet(I);TestzerosetLIB(S); |
---|
128 | setring S; |
---|
129 | minpoly; |
---|
130 | id; |
---|
131 | theZeroset; |
---|
132 | |
---|
133 | kill R; |
---|
134 | kill S; |
---|
135 | //tst_status(); |
---|
136 | |
---|
137 | // example 7 |
---|
138 | |
---|
139 | ring R = (0,a),(x(1..5)), lp; |
---|
140 | minpoly = a2+a+1; |
---|
141 | ideal I = x(1)^2 - 2,x(2) -a*x(1), x(3)^2 + 1, x(4)^2 + a, a*x(5) - x(1); |
---|
142 | |
---|
143 | def S = zeroSet(I);TestzerosetLIB(S); |
---|
144 | setring S; |
---|
145 | minpoly; |
---|
146 | id; |
---|
147 | theZeroset; |
---|
148 | |
---|
149 | kill S; |
---|
150 | |
---|
151 | setring R; |
---|
152 | def S = zeroSet(I, 1);TestzerosetLIB(S); |
---|
153 | setring S; |
---|
154 | minpoly; |
---|
155 | id; |
---|
156 | theZeroset; |
---|
157 | |
---|
158 | kill R; |
---|
159 | kill S; |
---|
160 | |
---|
161 | //tst_status(); |
---|
162 | |
---|
163 | // example 8 |
---|
164 | |
---|
165 | ring R = (0,a),(s(1..4)), lp; |
---|
166 | minpoly = a2+1; |
---|
167 | ideal I = s(3)*s(4),s(2)*s(4),s(1)*s(3),s(1)*s(2),s(3)^8+s(4)^8-1,s(2)^8+s(4)^8-1,s(1)^8-s(4)^8,s(4)^9-s(4),s(1)*s(4)^8-s(1); |
---|
168 | |
---|
169 | def S = zeroSet(I);TestzerosetLIB(S); |
---|
170 | setring S; |
---|
171 | minpoly; |
---|
172 | id; |
---|
173 | theZeroset; |
---|
174 | |
---|
175 | kill S; |
---|
176 | |
---|
177 | setring R; |
---|
178 | def S = zeroSet(I, 1);TestzerosetLIB(S); |
---|
179 | setring S; |
---|
180 | minpoly; |
---|
181 | id; |
---|
182 | theZeroset; |
---|
183 | |
---|
184 | kill S; |
---|
185 | |
---|
186 | tst_status(1); $ |
---|