1 | // $Id$ |
---|
2 | // (anne, last modified 27.11.2001) |
---|
3 | ///////////////////////////////////////////////////////////////////////////// |
---|
4 | // LIBRARY HEADER |
---|
5 | ///////////////////////////////////////////////////////////////////////////// |
---|
6 | |
---|
7 | version="$Id$"; |
---|
8 | info=" |
---|
9 | LIBRARY: KVequiv.lib PROCEDURES RELATED TO K_V-EQUIVALENCE |
---|
10 | AUTHOR: Anne Fruehbis-Krueger, anne@mathematik.uni-kl.de |
---|
11 | |
---|
12 | OVERVIEW: |
---|
13 | Let (V,0) be a complete intersection singularity in (C^p,0) and |
---|
14 | f_0:(C^n,0) --> (C^p,0) an analytic map germ, which is viewed as a |
---|
15 | section ov V so that the singularity V_0=f_0^-1(V) is a pullback. |
---|
16 | K_V equivalence is then given by the group |
---|
17 | K_V={g | g(C^n x V) (subset) C^n x V} (subset) K, |
---|
18 | where K is the contact group of Mather. This library provides |
---|
19 | functionality for computing K_V tangent space, K_V normal space |
---|
20 | and liftable vector fields. |
---|
21 | A more detailed introduction to K_V equivalence can e.g. be found |
---|
22 | in [Damon,J.: On the legacy of free divisors, Amer.J.Math. 120,453-492] |
---|
23 | |
---|
24 | PROCEDURES: |
---|
25 | derlogV(iV); derlog(V(iV)) |
---|
26 | KVtangent(I,rname,dername,k) K_V tangent space to given singularity |
---|
27 | KVversal(KVtan,I,rname,idname) K_V versal family |
---|
28 | KVvermap(KVtan,I) section inducing K_V versal family |
---|
29 | lft_vf(I,rname,idname) liftable vector fields |
---|
30 | |
---|
31 | REMARKS: |
---|
32 | * monomial ordering should be of type (c,...) |
---|
33 | * monomial ordering should be local on the original (2) rings |
---|
34 | |
---|
35 | SEE ALSO: sing_lib, deform_lib, spcurve_lib |
---|
36 | "; |
---|
37 | //////////////////////////////////////////////////////////////////////////// |
---|
38 | // REQUIRED LIBRARIES |
---|
39 | //////////////////////////////////////////////////////////////////////////// |
---|
40 | |
---|
41 | // first the ones written in Singular |
---|
42 | LIB "poly.lib"; |
---|
43 | |
---|
44 | // then the ones written in C/C++ |
---|
45 | LIB("loctriv.so"); |
---|
46 | |
---|
47 | //////////////////////////////////////////////////////////////////////////// |
---|
48 | // PROCEDURES |
---|
49 | //////////////////////////////////////////////////////////////////////////// |
---|
50 | |
---|
51 | proc derlogV(ideal iV) |
---|
52 | "USAGE: @code{derlogV(iV)}; @code{iV} ideal |
---|
53 | RETURN: matrix whose columns generate derlog(V(iV)), |
---|
54 | i.e. the module of vector fields on (C^p,0) tangent to V |
---|
55 | EXAMPLE: @code{example derlogV}; shows an example |
---|
56 | " |
---|
57 | { |
---|
58 | //-------------------------------------------------------------------------- |
---|
59 | // Compute jacobian matrix of iV and add all iV[i]*gen(j) as extra columns |
---|
60 | //-------------------------------------------------------------------------- |
---|
61 | int j; |
---|
62 | def jiV=jacob(iV); |
---|
63 | module mmV=jiV; |
---|
64 | for(int i=1;i<=size(iV);i++) |
---|
65 | { |
---|
66 | for(j=1;j<=size(iV);j++) |
---|
67 | { |
---|
68 | mmV=mmV,iV[i]*gen(j); |
---|
69 | } |
---|
70 | } |
---|
71 | //-------------------------------------------------------------------------- |
---|
72 | // The generators of derlog(V) are given by the part of the syzygy matrix |
---|
73 | // of mmV which deals with the jacobian matrix |
---|
74 | //-------------------------------------------------------------------------- |
---|
75 | def smmV=syz(mmV); |
---|
76 | matrix smaV=matrix(smmV); |
---|
77 | matrix smV[nvars(basering)][ncols(smaV)]= |
---|
78 | smaV[1..nvars(basering),1..ncols(smaV)]; |
---|
79 | return(smV); |
---|
80 | } |
---|
81 | example |
---|
82 | { "EXAMPLE:";echo=2; |
---|
83 | ring r=0,(a,b,c,d,e,f),ds; |
---|
84 | ideal i=ad-bc,af-be,cf-de; |
---|
85 | def dV=derlogV(i); |
---|
86 | print(dV); |
---|
87 | } |
---|
88 | //////////////////////////////////////////////////////////////////////////// |
---|
89 | |
---|
90 | proc KVtangent(ideal mapi,string rname,string dername,list #) |
---|
91 | "USAGE: @code{KVtangent(I,rname,dername[,k])}; @code{I} ideal |
---|
92 | @code{rname,dername} strings |
---|
93 | @code{[k]} int |
---|
94 | RETURN: K_V tangent space to a singularity given as a section of a |
---|
95 | model singularity |
---|
96 | NOTE: The model singularity lives in the ring given by rname and |
---|
97 | its derlog(V) is given by dername in that ring. The section is |
---|
98 | specified by the generators of mapi. If k is given, the first k |
---|
99 | variables are used as variables, the remaining ones as parameters |
---|
100 | EXAMPLE: @code{example KVtangent}; shows an example |
---|
101 | " |
---|
102 | { |
---|
103 | //-------------------------------------------------------------------------- |
---|
104 | // Sanity Checks |
---|
105 | //-------------------------------------------------------------------------- |
---|
106 | if(size(#)==0) |
---|
107 | { |
---|
108 | int k=nvars(basering); |
---|
109 | } |
---|
110 | else |
---|
111 | { |
---|
112 | if(typeof(#[1])=="int") |
---|
113 | { |
---|
114 | int k=#[1]; |
---|
115 | } |
---|
116 | else |
---|
117 | { |
---|
118 | int k=nvars(basering); |
---|
119 | } |
---|
120 | } |
---|
121 | def baser=basering; |
---|
122 | string teststr="setring " + rname + ";"; |
---|
123 | execute(teststr); |
---|
124 | if(nameof(basering)!=rname) |
---|
125 | { |
---|
126 | ERROR("rname not name of a ring"); |
---|
127 | } |
---|
128 | teststr="string typeder=typeof(" + dername + ");"; |
---|
129 | execute(teststr); |
---|
130 | if((typeder!="matrix")&&(typeder!="module")) |
---|
131 | { |
---|
132 | ERROR("dername not name of a matrix or module in rname"); |
---|
133 | } |
---|
134 | setring(baser); |
---|
135 | if((k > nvars(basering))||(k < 1)) |
---|
136 | { |
---|
137 | ERROR("k should be between 1 and the number of variables"); |
---|
138 | } |
---|
139 | //-------------------------------------------------------------------------- |
---|
140 | // Define the map giving the section and use it for substituting the |
---|
141 | // variables of the ring rname by the entries of mapi in the matrix |
---|
142 | // given by dername |
---|
143 | //-------------------------------------------------------------------------- |
---|
144 | setring baser; |
---|
145 | string mapstr="map f0=" + rname + ","; |
---|
146 | for(int i=1;i<ncols(mapi);i++) |
---|
147 | { |
---|
148 | mapstr=mapstr + string(mapi[i]) + ","; |
---|
149 | } |
---|
150 | mapstr=mapstr + string(mapi[ncols(mapi)]) + ";"; |
---|
151 | execute(mapstr); |
---|
152 | string derstr="def derim=f0(" + dername + ");"; |
---|
153 | execute(derstr); |
---|
154 | //--------------------------------------------------------------------------- |
---|
155 | // Form the derivatives of mapi by the first k variables |
---|
156 | //--------------------------------------------------------------------------- |
---|
157 | matrix jmapi[ncols(mapi)][k]; |
---|
158 | for(i=1;i<=k;i++) |
---|
159 | { |
---|
160 | jmapi[1..nrows(jmapi),i]=diff(mapi,var(i)); |
---|
161 | } |
---|
162 | //--------------------------------------------------------------------------- |
---|
163 | // Put everything together to get the tangent space |
---|
164 | //--------------------------------------------------------------------------- |
---|
165 | string nvstr="int nvmodel=nvars(" + rname + ");"; |
---|
166 | execute(nvstr); |
---|
167 | matrix M[nrows(derim)][ncols(derim)+k]; |
---|
168 | M[1..nrows(M),1..ncols(derim)]=derim[1..nrows(derim),1..ncols(derim)]; |
---|
169 | M[1..nrows(M),(ncols(derim)+1)..ncols(M)]= |
---|
170 | jmapi[1..nrows(M),1..k]; |
---|
171 | return(M); |
---|
172 | } |
---|
173 | example |
---|
174 | { "EXAMPLE:";echo=2; |
---|
175 | ring ry=0,(a,b,c,d),ds; |
---|
176 | ideal idy=ab,cd; |
---|
177 | def dV=derlogV(idy); |
---|
178 | echo=1; export ry; export dV; echo=2; |
---|
179 | ring rx=0,(x,y,z),ds; |
---|
180 | ideal mi=x-z+2y,x+y-z,y-x-z,x+2z-3y; |
---|
181 | def M=KVtangent(mi,"ry","dV"); |
---|
182 | print(M); |
---|
183 | M[1,5]; |
---|
184 | echo=1; kill ry; |
---|
185 | } |
---|
186 | ///////////////////////////////////////////////////////////////////////////// |
---|
187 | |
---|
188 | proc KVversal(matrix KVtan, ideal mapi, string rname, string idname) |
---|
189 | "USAGE: @code{KVversal(KVtan,I,rname,idname)}; @code{KVtan} matrix |
---|
190 | @code{I} ideal |
---|
191 | @code{rname,idname} strings |
---|
192 | RETURN: list; The first entry of the list is the new ring in which the |
---|
193 | K_V versal family lives, the second is the name of the ideal |
---|
194 | describing a K_V versal family of a singularity given as section |
---|
195 | of a model singularity (which was specified as idname in rname) |
---|
196 | NOTE: The section is given by the generators of I, KVtan is the matrix |
---|
197 | describing the K_V tangent space to the singularity (as returned |
---|
198 | by KVtangent). rname denotes the ring in which the model |
---|
199 | singularity lives, and idname is the name of the ideal in this ring |
---|
200 | defining the singularity. |
---|
201 | EXAMPLE: @code{example KVversal}; shows an example |
---|
202 | " |
---|
203 | { |
---|
204 | //--------------------------------------------------------------------------- |
---|
205 | // Sanity checks |
---|
206 | //--------------------------------------------------------------------------- |
---|
207 | def baser=basering; |
---|
208 | string teststr="setring " + rname + ";"; |
---|
209 | execute(teststr); |
---|
210 | if(nameof(basering)!=rname) |
---|
211 | { |
---|
212 | ERROR("rname not name of a ring"); |
---|
213 | } |
---|
214 | teststr="string typeid=typeof(" + idname + ");"; |
---|
215 | execute(teststr); |
---|
216 | if(typeid!="ideal") |
---|
217 | { |
---|
218 | ERROR("idname not name of an ideal in rname"); |
---|
219 | } |
---|
220 | setring baser; |
---|
221 | //--------------------------------------------------------------------------- |
---|
222 | // Find a monomial basis of the K_V normal space |
---|
223 | // and check whether we can define new variables A(i) |
---|
224 | //--------------------------------------------------------------------------- |
---|
225 | module KVt=KVtan; |
---|
226 | module KVts=std(KVt); |
---|
227 | module kbKVt=kbase(KVts); |
---|
228 | for(int i=1; i<=size(kbKVt); i++) |
---|
229 | { |
---|
230 | if(rvar(A(i))) |
---|
231 | { |
---|
232 | int jj=-1; |
---|
233 | break; |
---|
234 | } |
---|
235 | } |
---|
236 | if (defined(jj)>1) |
---|
237 | { |
---|
238 | if (jj==-1) |
---|
239 | { |
---|
240 | ERROR("Your ring contains a variable A(i)!"); |
---|
241 | } |
---|
242 | } |
---|
243 | //--------------------------------------------------------------------------- |
---|
244 | // Extend our current ring by adjoining the correct number of variables |
---|
245 | // A(i) for the parameters and copy our objects to this ring |
---|
246 | //--------------------------------------------------------------------------- |
---|
247 | def rbas=basering; |
---|
248 | ring rtemp=0,(A(1..size(kbKVt))),(c,dp); |
---|
249 | def rpert=rbas + rtemp; |
---|
250 | setring rpert; |
---|
251 | def mapi=imap(rbas,mapi); |
---|
252 | def kbKVt=imap(rbas,kbKVt); |
---|
253 | matrix mapv[ncols(mapi)][1]=mapi; // I hate the conversion from ideal |
---|
254 | vector mapV=mapv[1]; // to vector |
---|
255 | //--------------------------------------------------------------------------- |
---|
256 | // Build up the map of the perturbed section and apply it to the ideal |
---|
257 | // idname |
---|
258 | //--------------------------------------------------------------------------- |
---|
259 | for(i=1;i<=size(kbKVt);i++) |
---|
260 | { |
---|
261 | mapV=mapV+A(i)*kbKVt[i]; |
---|
262 | } |
---|
263 | |
---|
264 | string mapstr="map fpert=" + rname + ","; |
---|
265 | for(int i=1;i<size(mapV);i++) |
---|
266 | { |
---|
267 | mapstr=mapstr + string(mapV[i]) + ","; |
---|
268 | } |
---|
269 | mapstr=mapstr + string(mapV[size(mapV)]) + ";"; |
---|
270 | execute(mapstr); |
---|
271 | string idstr="ideal Ipert=fpert(" + idname + ");"; |
---|
272 | execute(idstr); |
---|
273 | //--------------------------------------------------------------------------- |
---|
274 | // Return our new ring and the name of the perturbed ideal |
---|
275 | //--------------------------------------------------------------------------- |
---|
276 | export Ipert; |
---|
277 | list retlist=rpert,"Ipert"; |
---|
278 | return(retlist); |
---|
279 | } |
---|
280 | example |
---|
281 | { "EXAMPLE:";echo=2; |
---|
282 | ring ry=0,(a,b,c,d),ds; |
---|
283 | ideal idy=ab,cd; |
---|
284 | def dV=derlogV(idy); |
---|
285 | echo=1; |
---|
286 | export ry; export dV; export idy; echo=2; |
---|
287 | ring rx=0,(x,y,z),ds; |
---|
288 | ideal mi=x-z+2y,x+y-z,y-x-z,x+2z-3y; |
---|
289 | def M=KVtangent(mi,"ry","dV"); |
---|
290 | list li=KVversal(M,mi,"ry","idy"); |
---|
291 | def rnew=li[1]; |
---|
292 | setring rnew; |
---|
293 | `li[2]`; |
---|
294 | echo=1; |
---|
295 | setring ry; kill idy; kill dV; setring rx; kill ry; |
---|
296 | } |
---|
297 | ///////////////////////////////////////////////////////////////////////////// |
---|
298 | |
---|
299 | proc KVvermap(matrix KVtan, ideal mapi) |
---|
300 | "USAGE: @code{KVvermap(KVtan,I)}; @code{KVtan} matrix, @code{I} ideal |
---|
301 | RETURN: list; The first entry of the list is the new ring in which the |
---|
302 | versal object lives, the second specifies a map describing the |
---|
303 | section which yields a K_V versal family of the original |
---|
304 | singularity which was given as section of a model singularity |
---|
305 | NOTE: The section is given by the generators of I, KVtan is the matrix |
---|
306 | describing the K_V tangent space to the singularity (as returned |
---|
307 | by KVtangent). |
---|
308 | EXAMPLE: @code{example KVvermap}; shows an example |
---|
309 | " |
---|
310 | { |
---|
311 | //--------------------------------------------------------------------------- |
---|
312 | // Find a monomial basis of the K_V normal space |
---|
313 | // and check whether we can define new variables A(i) |
---|
314 | //--------------------------------------------------------------------------- |
---|
315 | module KVt=KVtan; |
---|
316 | module KVts=std(KVt); |
---|
317 | module kbKVt=kbase(KVts); |
---|
318 | for(int i=1; i<=size(kbKVt); i++) |
---|
319 | { |
---|
320 | if(rvar(A(i))) |
---|
321 | { |
---|
322 | int jj=-1; |
---|
323 | break; |
---|
324 | } |
---|
325 | } |
---|
326 | if (defined(jj)>1) |
---|
327 | { |
---|
328 | if (jj==-1) |
---|
329 | { |
---|
330 | ERROR("Your ring contains a variable A(i)!"); |
---|
331 | } |
---|
332 | } |
---|
333 | //--------------------------------------------------------------------------- |
---|
334 | // Extend our current ring by adjoining the correct number of variables |
---|
335 | // A(i) for the parameters and copy our objects to this ring |
---|
336 | //--------------------------------------------------------------------------- |
---|
337 | def rbas=basering; |
---|
338 | ring rtemp=0,(A(1..size(kbKVt))),(c,dp); |
---|
339 | def rpert=rbas + rtemp; |
---|
340 | setring rpert; |
---|
341 | def mapi=imap(rbas,mapi); |
---|
342 | def kbKVt=imap(rbas,kbKVt); |
---|
343 | matrix mapv[ncols(mapi)][1]=mapi; |
---|
344 | vector mapV=mapv[1]; |
---|
345 | //--------------------------------------------------------------------------- |
---|
346 | // Build up the map of the perturbed section |
---|
347 | //--------------------------------------------------------------------------- |
---|
348 | for(i=1;i<=size(kbKVt);i++) |
---|
349 | { |
---|
350 | mapV=mapV+A(i)*kbKVt[i]; |
---|
351 | } |
---|
352 | ideal mappert=mapV[1..size(mapV)]; |
---|
353 | //--------------------------------------------------------------------------- |
---|
354 | // Return the new ring and the name of an ideal describing the perturbed map |
---|
355 | //--------------------------------------------------------------------------- |
---|
356 | export mappert; |
---|
357 | list retlist=basering,"mappert"; |
---|
358 | return(retlist); |
---|
359 | } |
---|
360 | example |
---|
361 | { "EXAMPLE:";echo=2; |
---|
362 | ring ry=0,(a,b,c,d),ds; |
---|
363 | ideal idy=ab,cd; |
---|
364 | def dV=derlogV(idy); |
---|
365 | echo=1; |
---|
366 | export ry; export dV; export idy; echo=2; |
---|
367 | ring rx=0,(x,y,z),ds; |
---|
368 | ideal mi=x-z+2y,x+y-z,y-x-z,x+2z-3y; |
---|
369 | def M=KVtangent(mi,"ry","dV"); |
---|
370 | list li=KVvermap(M,mi); |
---|
371 | def rnew=li[1]; |
---|
372 | setring rnew; |
---|
373 | `li[2]`; |
---|
374 | echo=1; |
---|
375 | setring ry; kill idy; kill dV; setring rx; kill ry; |
---|
376 | } |
---|
377 | ///////////////////////////////////////////////////////////////////////////// |
---|
378 | |
---|
379 | proc lft_vf(ideal mapi, string rname, string idname, intvec wv, int b, list #) |
---|
380 | "USAGE: @code{lft_vf(I,rname,iname,wv,b[,any])} |
---|
381 | @code{I} ideal |
---|
382 | @code{wv} intvec |
---|
383 | @code{b} int |
---|
384 | @code{rname,iname} strings |
---|
385 | @code{[any]} def |
---|
386 | RETURN: list |
---|
387 | [1]: ring in which objects specified by the strings [2] and [3] live |
---|
388 | [2]: name of ideal describing the liftable vector fields - |
---|
389 | computed up to order b in the parameters |
---|
390 | [3]: name of basis of the K_V-normal space of the original singularity |
---|
391 | [4]: (if 6th argument is given) |
---|
392 | ring in which the reduction of the liftable vector fields has |
---|
393 | taken place. |
---|
394 | [5]: name of liftable vector fields in ring [4] |
---|
395 | [6]: name of ideal we are using for reduction of [5] in [4] |
---|
396 | ASSUME: input is assumed to be quasihomogeneous in the following sense: |
---|
397 | there are weights for the variables in the current basering |
---|
398 | such that, after plugging in mapi[i] for the i-th variable of the |
---|
399 | ring rname in the ideal idname, the resulting expression is |
---|
400 | quasihomogeneous; wv specifies the weight vector of the ring rname. |
---|
401 | b is the degree bound up in the perturbation parameters up to which |
---|
402 | computations are performed. |
---|
403 | NOTE: the original ring should not contain any variables of name |
---|
404 | A(i) or e(j) |
---|
405 | EXAMPLE:@code{example lft_vf;} gives an example |
---|
406 | " |
---|
407 | { |
---|
408 | //--------------------------------------------------------------------------- |
---|
409 | // Sanity checks |
---|
410 | //--------------------------------------------------------------------------- |
---|
411 | def baser=basering; |
---|
412 | def qid=maxideal(1); |
---|
413 | string teststr="setring " + rname + ";"; |
---|
414 | execute(teststr); |
---|
415 | if(nameof(basering)!=rname) |
---|
416 | { |
---|
417 | ERROR("rname not name of a ring"); |
---|
418 | } |
---|
419 | def ry=basering; |
---|
420 | teststr="string typeid=typeof(" + idname + ");"; |
---|
421 | execute(teststr); |
---|
422 | if(typeid!="ideal") |
---|
423 | { |
---|
424 | ERROR("idname not name of an ideal in rname"); |
---|
425 | } |
---|
426 | setring baser; |
---|
427 | for(int i=1; i<=ncols(mapi); i++) |
---|
428 | { |
---|
429 | if(rvar(e(i))) |
---|
430 | { |
---|
431 | int jj=-1; |
---|
432 | break; |
---|
433 | } |
---|
434 | } |
---|
435 | if (defined(jj)>1) |
---|
436 | { |
---|
437 | if (jj==-1) |
---|
438 | { |
---|
439 | ERROR("Your ring contains a variable e(j)!"); |
---|
440 | } |
---|
441 | } |
---|
442 | setring ry; |
---|
443 | //--------------------------------------------------------------------------- |
---|
444 | // first prepare derlog(V) for the model singularity |
---|
445 | // and set the correct weights |
---|
446 | //--------------------------------------------------------------------------- |
---|
447 | def @dV=derlogV(`idname`); |
---|
448 | export(@dV); |
---|
449 | setring baser; |
---|
450 | map maptemp=`rname`,mapi; |
---|
451 | def tempid=maptemp(`idname`); |
---|
452 | intvec ivm=qhweight(tempid); |
---|
453 | string ringstr="ring baserw=" + charstr(baser) + ",(" + varstr(baser) + |
---|
454 | "),(c,ws(" + string(ivm) + "));"; |
---|
455 | execute(ringstr); |
---|
456 | def mapi=imap(baser,mapi); |
---|
457 | //--------------------------------------------------------------------------- |
---|
458 | // compute the unperturbed K_V tangent space |
---|
459 | // and check K_V codimension |
---|
460 | //--------------------------------------------------------------------------- |
---|
461 | def KVt=KVtangent(mapi,rname,"@dV",nvars(basering)); |
---|
462 | def sKVt=std(KVt); |
---|
463 | if(dim(sKVt)>0) |
---|
464 | { |
---|
465 | ERROR("K_V-codimension not finite"); |
---|
466 | } |
---|
467 | //--------------------------------------------------------------------------- |
---|
468 | // Construction of the versal family |
---|
469 | //--------------------------------------------------------------------------- |
---|
470 | list lilit=KVvermap(KVt,mapi); |
---|
471 | def rpert=lilit[1]; |
---|
472 | setring rpert; |
---|
473 | def mapipert=`lilit[2]`; |
---|
474 | def KVt=imap(baserw,KVt); |
---|
475 | def mapi=imap(baserw,mapi); |
---|
476 | def KVtpert=KVtangent(mapipert,rname,"@dV",nvars(baser)); |
---|
477 | //--------------------------------------------------------------------------- |
---|
478 | // put the unperturbed and the perturbed tangent space into a module |
---|
479 | // (1st component unperturbed) and run a groebner basis computation |
---|
480 | // which only considers spolys with non-vanishing first component |
---|
481 | //--------------------------------------------------------------------------- |
---|
482 | def rxa=basering; |
---|
483 | string rchange="ring rexa=" + charstr(basering) + ",(e(1.." + |
---|
484 | string(ncols(mapi)) + ")," + varstr(basering) + |
---|
485 | "),(c,ws(" + string((-1)*wv) + "," + string(ivm) + "),dp);"; |
---|
486 | execute(rchange); |
---|
487 | def mapi=imap(rxa,mapi); |
---|
488 | ideal eid=e(1..ncols(mapi)); // for later use |
---|
489 | def KVt=imap(rxa,KVt); |
---|
490 | def KVtpert=imap(rxa,KVtpert); |
---|
491 | intvec iv=1..ncols(mapi); |
---|
492 | ideal KVti=mod2id(KVt,iv); |
---|
493 | //---------------------------------------------------------------------------- |
---|
494 | // small intermezzo (here because we did not have all input any earlier) |
---|
495 | // get kbase of KVti for later use and determine an |
---|
496 | // integer l such that m_x^l*(e_1,\dots,e_r) lies in KVt |
---|
497 | //---------------------------------------------------------------------------- |
---|
498 | ideal sKVti=std(KVti); |
---|
499 | ideal lsKVti=lead(sKVti); |
---|
500 | module tmpmo=id2mod(lsKVti,iv); |
---|
501 | setring baser; |
---|
502 | def tmpmo=imap(rexa,tmpmo); |
---|
503 | attrib(tmpmo,"isSB",1); |
---|
504 | module kbKVt=kbase(tmpmo); |
---|
505 | setring rexa; |
---|
506 | def kbKVt=imap(baser,kbKVt); |
---|
507 | ideal kbKVti=mod2id(kbKVt,iv); |
---|
508 | def qid=imap(baser,qid); |
---|
509 | intvec qiv; |
---|
510 | for(i=1;i<=ncols(qid);i++) |
---|
511 | { |
---|
512 | qiv[rvar(qid[i])]=1; |
---|
513 | } |
---|
514 | int counter=1; |
---|
515 | while(size(reduce(lsKVti,std(jet(lsKVti,i,qiv))))!=0) |
---|
516 | { |
---|
517 | counter++; |
---|
518 | } |
---|
519 | //---------------------------------------------------------------------------- |
---|
520 | // end of intermezzo |
---|
521 | // proceed to the previously announced Groebner basis computation |
---|
522 | //---------------------------------------------------------------------------- |
---|
523 | ideal KVtpi=mod2id(KVtpert,iv); |
---|
524 | export(KVtpi); |
---|
525 | matrix Eing[2][ncols(KVti)]=KVti,KVtpi; |
---|
526 | module EinMo=Eing; |
---|
527 | EinMo=EinMo,eid^2*gen(1),eid^2*gen(2); |
---|
528 | module Ausg=Loctriv::kstd(EinMo,1); |
---|
529 | //--------------------------------------------------------------------------- |
---|
530 | // * collect those elements of Ausg for which the first component is non-zero |
---|
531 | // into mx and the others into mt |
---|
532 | // * cut off the first component |
---|
533 | // * find appropriate weights for the reduction |
---|
534 | //--------------------------------------------------------------------------- |
---|
535 | intvec eiv; |
---|
536 | for(i=1;i<=ncols(eid);i++) |
---|
537 | { |
---|
538 | eiv[rvar(eid[i])]=1; |
---|
539 | } |
---|
540 | if(size(reduce(var(nvars(basering)),std(eid)))!=0) |
---|
541 | { |
---|
542 | eiv[nvars(basering)]=0; |
---|
543 | } |
---|
544 | module Aus2=jet(Ausg,1,eiv); |
---|
545 | Aus2=simplify(Aus2,2); |
---|
546 | ideal mx; |
---|
547 | ideal mt; |
---|
548 | int ordmax,ordmin; |
---|
549 | int ordtemp; |
---|
550 | for (i=1;i<=size(Aus2);i++) |
---|
551 | { |
---|
552 | if(Aus2[1,i]!=0) |
---|
553 | { |
---|
554 | mx=mx,Aus2[2,i]; |
---|
555 | ordtemp=ord(lead(Aus2[1,i])); |
---|
556 | if(ordtemp>ordmax) |
---|
557 | { |
---|
558 | ordmax=ordtemp; |
---|
559 | } |
---|
560 | else |
---|
561 | { |
---|
562 | if(ordtemp<ordmin) |
---|
563 | { |
---|
564 | ordmin=ordtemp; |
---|
565 | } |
---|
566 | } |
---|
567 | } |
---|
568 | else |
---|
569 | { |
---|
570 | mt=mt,Aus2[2,i]; |
---|
571 | } |
---|
572 | } |
---|
573 | //--------------------------------------------------------------------------- |
---|
574 | // * change weights of the A(i) such that Aus2[1,i] and Aus2[2,i] have the |
---|
575 | // same leading term, if the first one is non-zero |
---|
576 | // * reduce mt by mx |
---|
577 | // * find l such that (x_1,...,x_n)^l * eid can be used instead of noether |
---|
578 | // which we have to avoid because we are playing with the weights |
---|
579 | //--------------------------------------------------------------------------- |
---|
580 | intvec oiv; |
---|
581 | for(i=1;i<=(nvars(basering)-nvars(baser)-size(eid));i++) |
---|
582 | { |
---|
583 | oiv[i]=2*(abs(ordmax)+abs(ordmin)); |
---|
584 | } |
---|
585 | mx=jet(mx,counter*(b+1),qiv); |
---|
586 | rchange="ring rexaw=" + charstr(basering) + ",(" + varstr(basering) + |
---|
587 | "),(c,ws(" + string((-1)*wv) + "," + string(ivm) + |
---|
588 | "," + string(oiv) + "));"; |
---|
589 | execute(rchange); |
---|
590 | ideal qid=imap(rexa,qid); |
---|
591 | def eid=imap(rexa,eid); |
---|
592 | def mx=imap(rexa,mx); |
---|
593 | attrib(mx,"isSB",1); |
---|
594 | def mto=imap(rexa,mt); |
---|
595 | ideal Aid=A(1..size(oiv)); |
---|
596 | intvec Aiv; |
---|
597 | for(i=1;i<=ncols(Aid);i++) |
---|
598 | { |
---|
599 | Aiv[rvar(Aid[i])]=1; |
---|
600 | } |
---|
601 | intvec riv=(b+1)*qiv+(b+2)*counter*Aiv; |
---|
602 | def mt=mto; |
---|
603 | for(i=1;i<=counter+1;i++) |
---|
604 | { |
---|
605 | mt=mt,mto*qid^i; |
---|
606 | } |
---|
607 | mt=jet(mt,(b+1)*(b+2)*counter,riv); |
---|
608 | mt=jet(mt,1,eiv); |
---|
609 | mt=simplify(mt,10); |
---|
610 | module mmx=module(mx); |
---|
611 | attrib(mmx,"isSB",1); |
---|
612 | for(i=1;i<=ncols(mt);i++) |
---|
613 | { |
---|
614 | if(defined(watchProgress)) |
---|
615 | { |
---|
616 | "reducing mt[i], i="+string(i); |
---|
617 | } |
---|
618 | mt[i]=system("locNF",vector(mt[i]),mmx, |
---|
619 | (b+1)*(b+2)*counter,riv)[1][1,1]; |
---|
620 | } |
---|
621 | mt=simplify(mt,10); |
---|
622 | //---------------------------------------------------------------------------- |
---|
623 | // return the results by returning the ring and the names of the desired |
---|
624 | // modules in the ring |
---|
625 | // (if the list # is not empty, then we want to return this ring as well) |
---|
626 | //---------------------------------------------------------------------------- |
---|
627 | if(size(#)!=0) |
---|
628 | { |
---|
629 | export mt; |
---|
630 | export mx; |
---|
631 | } |
---|
632 | setring rexa; |
---|
633 | def mtout=imap(rexaw,mt); |
---|
634 | kbKVti=jet(kbKVti,1,eiv); |
---|
635 | kbKVti=simplify(kbKVti,2); |
---|
636 | intvec rediv; |
---|
637 | int j=1; |
---|
638 | for(i=1;i<=size(qiv);i++) |
---|
639 | { |
---|
640 | if(qiv[i]!=0) |
---|
641 | { |
---|
642 | rediv[j]=i; |
---|
643 | j++; |
---|
644 | } |
---|
645 | } |
---|
646 | list templi=subrInterred(kbKVti,mtout,rediv); |
---|
647 | mtout=jet(templi[3],b+1,Aiv); |
---|
648 | export mtout; |
---|
649 | export kbKVti; |
---|
650 | list result; |
---|
651 | result[1]=rexa; |
---|
652 | result[2]="mtout"; |
---|
653 | result[3]="kbKVti"; |
---|
654 | if(size(#)!=0) |
---|
655 | { |
---|
656 | result[4]=rexaw; |
---|
657 | result[5]="mt"; |
---|
658 | result[6]="mx"; |
---|
659 | } |
---|
660 | export rexa; |
---|
661 | keepring rexa; |
---|
662 | return(result); |
---|
663 | } |
---|
664 | example |
---|
665 | { "EXAMPLE:";echo=2; |
---|
666 | ring ry=0,(a,b,c,d),ds; |
---|
667 | ideal idy=ab,cd; |
---|
668 | def dV=derlogV(idy); |
---|
669 | echo=1; |
---|
670 | export ry; export dV; export idy; echo=2; |
---|
671 | ring rx=0,(x,y,z),ds; |
---|
672 | ideal mi=x-z+2y,x+y-z,y-x-z,x+2z-3y; |
---|
673 | intvec wv=1,1,1,1; |
---|
674 | def M=KVtangent(mi,"ry","dV"); |
---|
675 | list li=lft_vf(mi,"ry","idy",wv,5); |
---|
676 | def rr=li[1]; |
---|
677 | setring rr; |
---|
678 | `li[2]`; |
---|
679 | `li[3]`; |
---|
680 | echo=1; |
---|
681 | setring ry; kill idy; kill dV; setring rx; kill ry; |
---|
682 | } |
---|
683 | ////////////////////////////////////////////////////////////////////////////// |
---|
684 | // STATIC PROCEDURES |
---|
685 | ////////////////////////////////////////////////////////////////////////////// |
---|
686 | static |
---|
687 | proc abs(int c) |
---|
688 | "absolute value |
---|
689 | " |
---|
690 | { |
---|
691 | if(c>=0){ return(c);} |
---|
692 | else{ return(-c);} |
---|
693 | } |
---|
694 | //////////////////////////////////////////////////////////////////////////// |
---|