1 | // last change: 17.01.2001 |
---|
2 | /////////////////////////////////////////////////////////////////////////////// |
---|
3 | version="$Id: paramet.lib,v 1.12 2001-08-27 14:47:57 Singular Exp $"; |
---|
4 | category="Visualization"; |
---|
5 | info=" |
---|
6 | LIBRARY: paramet.lib Parametrization of Varieties |
---|
7 | AUTHOR: Thomas Keilen, keilen@mathematik.uni-kl.de |
---|
8 | SEE ALSO: normal_lib, primdec_lib, hnoether_lib |
---|
9 | |
---|
10 | PROCEDURES: |
---|
11 | parametrize(I); parametrizes a prime ideal via the normalization |
---|
12 | parametrizepd(I); calculates the prim.dec. and parametrizes the components |
---|
13 | parametrizesing(f); parametrizes an isolated plane curve singularity |
---|
14 | |
---|
15 | OVERVIEW: |
---|
16 | A library to compute parametrizations of algebraic varieties (if possible) |
---|
17 | with the aid of a normalization, or a primary decomposition, resp. to compute |
---|
18 | a parametrization of a plane curve singularity with the aid of a |
---|
19 | Hamburger-Noether expansion. |
---|
20 | "; |
---|
21 | /////////////////////////////////////////////////////////////////////////////// |
---|
22 | LIB "normal.lib"; |
---|
23 | LIB "hnoether.lib"; |
---|
24 | /////////////////////////////////////////////////////////////////////////////// |
---|
25 | |
---|
26 | proc parametrize(ideal I) |
---|
27 | "USAGE: parametrize(I); I ideal in an arbitrary number of variables, |
---|
28 | whose radical is prime, in a ring with global ordering |
---|
29 | CREATE: If the parametrization is successful, the basering will be changed to |
---|
30 | the parametrization ring, that is to the ring PR=0,(s,t),dp; |
---|
31 | respectively PR=0,t(1..d),dp;, depending on the dimension of the |
---|
32 | parametrized variety. |
---|
33 | RETURN: a list containing the parametrization ideal resp. the original ideal, |
---|
34 | the number of variables needed for the parametrization resp. 0, and |
---|
35 | 1 resp. 0 depending on whether the parametrization was successful |
---|
36 | or not |
---|
37 | SEE ALSO: primdecGTZ, normal, radical, parametrizepd |
---|
38 | KEYWORDS: parametrization; normalization |
---|
39 | EXAMPLE: example parametrize; shows an example" |
---|
40 | { |
---|
41 | intvec ov=option(get); |
---|
42 | option(noredefine); |
---|
43 | def BAS=basering; |
---|
44 | ideal newI=radical(std(I)); |
---|
45 | int d=dim(std(newI)); |
---|
46 | if (size(primdecGTZ(newI))==1) |
---|
47 | { |
---|
48 | list nor=normal(newI); |
---|
49 | def N=nor[1]; |
---|
50 | if (d<=2) |
---|
51 | { |
---|
52 | ring PR=0,(s,t),dp; |
---|
53 | } |
---|
54 | else |
---|
55 | { |
---|
56 | ring PR=0,t(1..d),dp; |
---|
57 | } |
---|
58 | setring N; |
---|
59 | // If the ideal is zero dimensional, the procedure works as well in good |
---|
60 | // cases. |
---|
61 | if ((size(norid)==0) or (d==0)) |
---|
62 | { |
---|
63 | // Map the parametrization to the parametrization basering PR. |
---|
64 | setring PR; |
---|
65 | map p=N,maxideal(1); |
---|
66 | ideal para=p(normap); |
---|
67 | export para; |
---|
68 | // The i-th list component contains the parametrization, the |
---|
69 | // number of necessary variables, and the information, if |
---|
70 | // the parametrization was successful. |
---|
71 | list param=para,d,1; |
---|
72 | // if (d==0) |
---|
73 | // { |
---|
74 | // Include sometimes a test, whether the maximal ideal I is of the form |
---|
75 | // (x-a,y-b,z-c), since only then normap=(a,b,c). |
---|
76 | // } |
---|
77 | setring BAS; |
---|
78 | export(PR); |
---|
79 | keepring(PR); |
---|
80 | } |
---|
81 | else |
---|
82 | { |
---|
83 | setring BAS; |
---|
84 | list param=I,0,0; |
---|
85 | } |
---|
86 | } |
---|
87 | else |
---|
88 | { |
---|
89 | setring BAS; |
---|
90 | list param=I,0,0; |
---|
91 | } |
---|
92 | option(set,ov); |
---|
93 | return(param); |
---|
94 | } |
---|
95 | example |
---|
96 | { "EXAMPLE:";echo = 2; |
---|
97 | ring RING=0,(x,y,z),dp; |
---|
98 | ideal I=z2-y2x2+x3; |
---|
99 | parametrize(I); |
---|
100 | } |
---|
101 | /////////////////////////////////////////////////////////////////////////////// |
---|
102 | |
---|
103 | proc parametrizepd(ideal I) |
---|
104 | "USAGE: parametrizepd(I); I ideal in a polynomial ring with global ordering |
---|
105 | CREATE: If the parametrization is successful, the basering will be changed to |
---|
106 | the parametrization ring, that is to the ring PR=0,(s,t),dp; |
---|
107 | respectively PR=0,t(1..d),dp;, depending on the dimension of the |
---|
108 | parametrized variety. |
---|
109 | RETURN: a list of lists, where each entry contains the parametrization |
---|
110 | of a primary component of I resp. 0, the number of variables |
---|
111 | resp. 0, and 1 resp. 0 depending on whether the parametrization |
---|
112 | of the component was successful or not |
---|
113 | SEE ALSO: primdecGTZ, normal, parametrize |
---|
114 | KEYWORDS: parametrization; normalization |
---|
115 | EXAMPLE: example parametrizepd; shows an example" |
---|
116 | { |
---|
117 | intvec ov=option(get); |
---|
118 | option(noredefine); |
---|
119 | list primary,no,nor,para,param; |
---|
120 | def BAS=basering; |
---|
121 | int d=dim(std(I)); |
---|
122 | if (d<=2) |
---|
123 | { |
---|
124 | ring PR=0,(s,t),dp; |
---|
125 | } |
---|
126 | else |
---|
127 | { |
---|
128 | ring PR=0,t(1..d),dp; |
---|
129 | } |
---|
130 | ideal max=maxideal(1); |
---|
131 | setring BAS; |
---|
132 | primary=primdecGTZ(I); |
---|
133 | for (int ii=1; ii<=size(primary); ii=ii+1) |
---|
134 | { |
---|
135 | no=normal(std(primary[ii][2])); |
---|
136 | nor[ii]=no[1]; |
---|
137 | def N=nor[ii]; |
---|
138 | setring N; |
---|
139 | d=dim(std(norid)); |
---|
140 | // Test if the normalization is K, K[s] or K[s,t]. |
---|
141 | // Then give back the parametrization. |
---|
142 | if (size(norid)==0) |
---|
143 | { |
---|
144 | setring PR; |
---|
145 | map p=N,max; |
---|
146 | para[ii]=p(normap); |
---|
147 | // export para[ii]; |
---|
148 | // list inter=para[ii],nvars(N),1; |
---|
149 | list inter=para[ii],d,1; |
---|
150 | // if (d==0) |
---|
151 | // { |
---|
152 | // Include sometime a test, whether the maximal ideal I is of the form |
---|
153 | // (x-a,y-b,z-c), since only then normap=(a,b,c). |
---|
154 | // } |
---|
155 | param[ii]=inter; |
---|
156 | kill inter; |
---|
157 | setring BAS; |
---|
158 | } |
---|
159 | else |
---|
160 | { |
---|
161 | setring PR; |
---|
162 | list inter=0,0,0; |
---|
163 | param[ii]=inter; |
---|
164 | kill inter; |
---|
165 | setring BAS; |
---|
166 | } |
---|
167 | } |
---|
168 | export nor; |
---|
169 | setring PR; |
---|
170 | export PR; |
---|
171 | keepring PR; |
---|
172 | option(set,ov); |
---|
173 | return(param); |
---|
174 | } |
---|
175 | example |
---|
176 | { "EXAMPLE:";echo = 2; |
---|
177 | ring RING=0,(x,y,z),dp; |
---|
178 | ideal I=(x2-y2z2+z3)*(x2-z2-z3),(x2-y2z2+z3)*yz; |
---|
179 | parametrizepd(I); |
---|
180 | } |
---|
181 | ///////////////////////////////////////////////////////////////////////////// |
---|
182 | |
---|
183 | proc parametrizesing(poly f) |
---|
184 | "USAGE: parametrizesing(f); f a polynomial in two variables, ordering ls or ds |
---|
185 | CREATE: If the parametrization is successful, the basering will be changed to |
---|
186 | the parametrization ring, that is to the ring 0,(x,y),ls; |
---|
187 | RETURN: a list containing the parametrizations of the different branches of the |
---|
188 | singularity at the origin resp. 0, if f was not of the desired kind |
---|
189 | SEE ALSO: hnoether_lib, reddevelop |
---|
190 | KEYWORDS: parametrization; curve singularities |
---|
191 | EXAMPLE: example parametrizesing; shows an example" |
---|
192 | { |
---|
193 | intvec ov=option(get); |
---|
194 | option(noredefine); |
---|
195 | list hn,para; |
---|
196 | if (nvars(basering)==2 and |
---|
197 | (find(ordstr(basering), "ls") > 0 || |
---|
198 | find(ordstr(basering), "ds") > 0 || |
---|
199 | find(ordstr(basering), "lp") > 0)) |
---|
200 | { |
---|
201 | hn = reddevelop(f); |
---|
202 | for (int ii=1; ii<=size(hn); ii++) |
---|
203 | { |
---|
204 | para[ii]=param(hn[ii]); |
---|
205 | } |
---|
206 | } |
---|
207 | else |
---|
208 | { |
---|
209 | para[1]=0; |
---|
210 | } |
---|
211 | keepring basering; |
---|
212 | option(set,ov); |
---|
213 | return(para); |
---|
214 | } |
---|
215 | example |
---|
216 | { "EXAMPLE:";echo = 2; |
---|
217 | ring RING=0,(x,y),ls; |
---|
218 | poly f=(x^2-y^3)*(x^2-y^2-y^3); |
---|
219 | parametrizesing(f); |
---|
220 | } |
---|