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