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 | tst_ignore("CVS ID $Id: zeroset1.tst,v 1.1 2000-12-11 16:07:31 Singular Exp $"); |
---|
23 | |
---|
24 | |
---|
25 | |
---|
26 | proc TestzerosetLIB(S) |
---|
27 | // plug in the elements from the zero-set in the generators of the ideal |
---|
28 | // result should be 0,0,...,0. |
---|
29 | { |
---|
30 | |
---|
31 | setring S; |
---|
32 | map F; |
---|
33 | |
---|
34 | print(" #Points = " + string(vdim(std(id))) + "; #Solutions = " + string(size(zeroset))); |
---|
35 | print(" minpoly = " + string(minpoly)); |
---|
36 | print(" ideal = " + string(id)); |
---|
37 | |
---|
38 | |
---|
39 | for(int i = 1; i <= size(zeroset); i++) { |
---|
40 | F = zeroset[i]; |
---|
41 | print(string(zeroset[i]) + " --> " + string(F(id))); |
---|
42 | } |
---|
43 | } |
---|
44 | |
---|
45 | // example 1 |
---|
46 | |
---|
47 | ring R = 0,(x,y,z), lp; |
---|
48 | ideal I = x2-1,y3-1,z-2x; |
---|
49 | |
---|
50 | def S = ZeroSet(I);TestzerosetLIB(S); |
---|
51 | setring S; |
---|
52 | minpoly; |
---|
53 | id; |
---|
54 | zeroset; |
---|
55 | |
---|
56 | kill R; |
---|
57 | kill S; |
---|
58 | //tst_status(); |
---|
59 | |
---|
60 | // example 2 |
---|
61 | |
---|
62 | ring R = 0,(x,y,z), lp; |
---|
63 | ideal I = x3-1,3y-x,z4-1; |
---|
64 | |
---|
65 | def S = ZeroSet(I);TestzerosetLIB(S); |
---|
66 | setring S; |
---|
67 | minpoly; |
---|
68 | id; |
---|
69 | zeroset; |
---|
70 | |
---|
71 | kill R; |
---|
72 | kill S; |
---|
73 | //tst_status(); |
---|
74 | |
---|
75 | // example 3 |
---|
76 | |
---|
77 | ring R = 0, (x(1..5)), lp; |
---|
78 | ideal I = x(1)^2+1,x(2)^4-1,x(3)-x(4),x(4)^2+1,x(5)-x(4); |
---|
79 | |
---|
80 | def S = ZeroSet(I);TestzerosetLIB(S); |
---|
81 | setring S; |
---|
82 | minpoly; |
---|
83 | id; |
---|
84 | zeroset; |
---|
85 | |
---|
86 | kill R; |
---|
87 | kill S; |
---|
88 | //tst_status(); |
---|
89 | |
---|
90 | // example 4 |
---|
91 | |
---|
92 | ring R = (0,a),(x,y), lp; |
---|
93 | minpoly = a2+1; |
---|
94 | ideal I = x2-a,y-2x; |
---|
95 | |
---|
96 | def S = ZeroSet(I);TestzerosetLIB(S); |
---|
97 | setring S; |
---|
98 | minpoly; |
---|
99 | id; |
---|
100 | zeroset; |
---|
101 | |
---|
102 | kill R; |
---|
103 | kill S; |
---|
104 | //tst_status(); |
---|
105 | |
---|
106 | // example 5 |
---|
107 | |
---|
108 | ring R = (0,a),(x,y,z), lp; |
---|
109 | minpoly = a2+a+1; |
---|
110 | ideal I = x3-1,a*y^2-x,z^2-a*y; |
---|
111 | |
---|
112 | def S = ZeroSet(I);TestzerosetLIB(S); |
---|
113 | setring S; |
---|
114 | minpoly; |
---|
115 | id; |
---|
116 | zeroset; |
---|
117 | |
---|
118 | kill R; |
---|
119 | kill S; |
---|
120 | //tst_status(); |
---|
121 | |
---|
122 | // example 6 |
---|
123 | |
---|
124 | ring R = (0,a),(x,y,z), lp; |
---|
125 | minpoly = a2+1; |
---|
126 | ideal I = x2-2,a*y^2-2*x,z^2 - a; // 2 |
---|
127 | |
---|
128 | def S = ZeroSet(I);TestzerosetLIB(S); |
---|
129 | setring S; |
---|
130 | minpoly; |
---|
131 | id; |
---|
132 | zeroset; |
---|
133 | |
---|
134 | kill R; |
---|
135 | kill S; |
---|
136 | //tst_status(); |
---|
137 | |
---|
138 | // example 7 |
---|
139 | |
---|
140 | ring R = (0,a),(x(1..5)), lp; |
---|
141 | minpoly = a2+a+1; |
---|
142 | ideal I = x(1)^2 - 2,x(2) -a*x(1), x(3)^2 + 1, x(4)^2 + a, a*x(5) - x(1); |
---|
143 | |
---|
144 | def S = ZeroSet(I);TestzerosetLIB(S); |
---|
145 | setring S; |
---|
146 | minpoly; |
---|
147 | id; |
---|
148 | zeroset; |
---|
149 | |
---|
150 | kill S; |
---|
151 | |
---|
152 | setring R; |
---|
153 | def S = ZeroSet(I, 1);TestzerosetLIB(S); |
---|
154 | setring S; |
---|
155 | minpoly; |
---|
156 | id; |
---|
157 | zeroset; |
---|
158 | |
---|
159 | kill R; |
---|
160 | kill S; |
---|
161 | |
---|
162 | //tst_status(); |
---|
163 | |
---|
164 | // example 8 |
---|
165 | |
---|
166 | ring R = (0,a),(s(1..4)), lp; |
---|
167 | minpoly = a2+1; |
---|
168 | 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); |
---|
169 | |
---|
170 | def S = ZeroSet(I);TestzerosetLIB(S); |
---|
171 | setring S; |
---|
172 | minpoly; |
---|
173 | id; |
---|
174 | zeroset; |
---|
175 | |
---|
176 | kill S; |
---|
177 | |
---|
178 | setring R; |
---|
179 | def S = ZeroSet(I, 1);TestzerosetLIB(S); |
---|
180 | setring S; |
---|
181 | minpoly; |
---|
182 | id; |
---|
183 | zeroset; |
---|
184 | |
---|
185 | kill S; |
---|
186 | |
---|
187 | tst_status(1); $ |
---|